rad sensor working

This commit is contained in:
2021-05-03 12:49:14 +02:00
parent 31b4246bca
commit fd9adee1ae
5 changed files with 100 additions and 177 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;

View File

@ -34,6 +34,11 @@ namespace SUS {
*/
static const uint8_t UNIPOLAR_CONFIG = 0b11100000;
/**
* @brief Writing this value resets the fifo of the MAX1227.
*/
static const uint8_t RESET_DEFINITION = 0b00011000;
/**
* @brief This value will always be written to the ADC conversion register to specify the
* conversions to perform.