rad sensor working

This commit is contained in:
2021-05-03 13:35:16 +02:00
parent f708a67fa8
commit 3c6ec68faa
2 changed files with 81 additions and 50 deletions

View File

@ -10,8 +10,9 @@ namespace RAD_SENSOR {
* temperature sensor.
*/
static const DeviceCommandId_t WRITE_SETUP = 0x1;
static const DeviceCommandId_t PERFORM_CONVERSION = 0x2;
static const DeviceCommandId_t START_CONVERSION = 0x2;
static const DeviceCommandId_t READ_CONVERSIONS = 0x3;
/**
* @brief This is the configuration byte which will be written to the setup register after
* power on.
@ -34,6 +35,11 @@ namespace RAD_SENSOR {
*/
static const uint8_t CONVERSION_DEFINITION = 0b10001001;
/**
* @brief Writing this value resets the fifo of the MAX1227.
*/
static const uint8_t RESET_DEFINITION = 0b00011000;
static const uint8_t DUMMY_BYTE = 0xFF;
static const uint8_t RAD_SENSOR_DATA_SET_ID = READ_CONVERSIONS;