some minor fixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-02-14 19:41:03 +01:00
parent 1fd7ba18e9
commit 938c361097
4 changed files with 125 additions and 59 deletions

View File

@ -21,12 +21,14 @@ static const DeviceCommandId_t WRITE_SETUP = 0x1;
* This command initiates the ADC conversion for all channels including the internal
* temperature sensor.
*/
static const DeviceCommandId_t START_CONVERSIONS = 0x2;
static const DeviceCommandId_t START_INT_TIMED_CONVERSIONS = 0x2;
/**
* This command reads the internal fifo which holds the temperature and the channel
* conversions.
*/
static const DeviceCommandId_t READ_CONVERSIONS = 0x3;
static constexpr DeviceCommandId_t READ_INT_TIMED_CONVERSIONS = 0x3;
static constexpr DeviceCommandId_t READ_EXT_TIMED_CONVERSIONS = 0x4;
/**
* @brief This is the configuration byte which will be written to the setup register after
@ -39,7 +41,8 @@ static const DeviceCommandId_t READ_CONVERSIONS = 0x3;
* written to the setup register
*
*/
static const uint8_t SETUP = 0b01101000;
static constexpr uint8_t SETUP_INT_CLOKED = 0b01101000;
static constexpr uint8_t SETUP_EXT_CLOCKED = 0b01111000;
/**
* @brief This values will always be written to the ADC conversion register to specify the
@ -51,12 +54,14 @@ static const uint8_t SETUP = 0b01101000;
*/
static const uint8_t CONVERSION = 0b10101001;
static const uint8_t SUS_DATA_SET_ID = READ_CONVERSIONS;
static const uint8_t SUS_DATA_SET_ID = READ_EXT_TIMED_CONVERSIONS;
/** Size of data replies. Temperature and 6 channel convesions (AIN0 - AIN5) */
static const uint8_t SIZE_READ_CONVERSIONS = 14;
static const uint8_t SIZE_READ_INT_CONVERSIONS = 14;
// 6 * conv byte, 6 * 0 and one trailing zero
static constexpr uint8_t SIZE_READ_EXT_CONVERSIONS = 13;
static const uint8_t MAX_CMD_SIZE = SIZE_READ_CONVERSIONS;
static const uint8_t MAX_CMD_SIZE = 16;
static const uint8_t POOL_ENTRIES = 7;