eive-obsw/mission/devices/devicedefinitions/SCEXDefinitions.h

24 lines
596 B
C
Raw Normal View History

2022-02-04 17:48:05 +01:00
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_SCEXDEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_SCEXDEFINITIONS_H_
#include <cstdint>
// Definitions for the Solar Cell Experiment
namespace scex {
2022-04-09 01:00:42 +02:00
enum ScexCmds: uint8_t {
PING = 0b00111,
ONE_CELL = 0b00110
};
static constexpr uint8_t IDLE_BIT_0_DEF_STATE = 0;
static constexpr uint8_t IDLE_BIT_1_DEF_STATE = 1;
uint8_t createCmdByte(ScexCmds cmd, bool tempCheck) {
return (IDLE_BIT_0_DEF_STATE << 7) | (IDLE_BIT_1_DEF_STATE << 6) | (cmd << 1) | tempCheck;
}
2022-02-04 17:48:05 +01:00
}
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_SCEXDEFINITIONS_H_ */