eive-obsw/bsp_hosted/comIF/ArduinoCookie.h

23 lines
529 B
C
Raw Normal View History

2020-10-01 02:06:39 +02:00
#ifndef MISSION_ARDUINO_ARDUINOCOOKIE_H_
#define MISSION_ARDUINO_ARDUINOCOOKIE_H_
#include <fsfw/devicehandlers/CookieIF.h>
2022-01-17 13:48:55 +01:00
#include <vector>
2020-10-01 02:06:39 +02:00
2022-01-17 13:48:55 +01:00
class ArduinoCookie : public CookieIF {
public:
enum Protocol_t : uint8_t { INVALID, SPI, I2C };
2020-10-01 02:06:39 +02:00
2022-01-17 13:48:55 +01:00
ArduinoCookie(Protocol_t protocol, uint8_t address, const size_t maxReplySize);
2020-10-01 02:06:39 +02:00
2022-01-17 13:48:55 +01:00
Protocol_t protocol;
uint8_t command;
uint8_t address;
std::vector<uint8_t> replyBuffer;
size_t receivedDataLen = 0;
size_t maxReplySize;
2020-10-01 02:06:39 +02:00
};
#endif /* MISSION_ARDUINO_ARDUINOCOOKIE_H_ */