spi decoder callbacks wip

This commit is contained in:
2021-05-02 13:48:39 +02:00
parent fef6cf4abe
commit b708028c61
17 changed files with 447 additions and 312 deletions

View File

@ -29,7 +29,8 @@ debugging. */
#define PDU2_DEBUG 0
#define ACU_DEBUG 0
#define SYRLINKS_DEBUG 0
#define IMQT_DEBUG 1
#define IMQT_DEBUG 0
#define DEBUG_RAD_SENSOR 1
#include "OBSWVersion.h"

View File

@ -19,6 +19,8 @@ namespace addresses {
GYRO_1_L3G = objects::GYRO_1_L3G_HANDLER,
GYRO_2_L3G = objects::GYRO_2_L3G_HANDLER,
RAD_SENSOR = objects::RAD_SENSOR,
/* Dummy and Test Addresses */
DUMMY_ECHO = 129,
DUMMY_GPS0 = 130,

View File

@ -49,7 +49,9 @@ namespace gpioIds {
SPI_MUX_BIT_3,
SPI_MUX_BIT_4,
SPI_MUX_BIT_5,
SPI_MUX_BIT_6
SPI_MUX_BIT_6,
CS_RAD_SENSOR
};
}

View File

@ -20,6 +20,9 @@ static constexpr spi::SpiModes DEFAULT_RM3100_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_L3G_SPEED = 3'900'000;
static constexpr spi::SpiModes DEFAULT_L3G_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_MAX_1227_SPEED = 3'900'000;
static constexpr spi::SpiModes DEFAULT_MAX_1227_MODE = spi::SpiModes::MODE_3;
}

View File

@ -82,6 +82,8 @@ namespace objects {
RTD_IC17 = 0x5400003F,
RTD_IC18 = 0x5400004F,
RAD_SENSOR = 0x54000050,
/* 0x54 ('T') for test handlers */
TEST_TASK = 0x54694269,
LIBGPIOD_TEST = 0x54123456,

View File

@ -142,6 +142,14 @@ ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence)
thisSequence->addSlot(objects::IMTQ_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
/* Radiation sensor */
thisSequence->addSlot(objects::RAD_SENSOR, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.8, DeviceHandlerIF::GET_READ);
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
return HasReturnvaluesIF::RETURN_OK;
}