scheduling tweaks for i2c
This commit is contained in:
@ -36,31 +36,25 @@ ReturnValue_t pst::pstSyrlinks(FixedTimeslotTaskIF *thisSequence) {
|
||||
|
||||
// I don't think this needs to be in a PST because linux takes care of bus serialization, but
|
||||
// keep it like this for now, it works
|
||||
ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
|
||||
ReturnValue_t pst::pstI2cProcessingSystem(FixedTimeslotTaskIF *thisSequence) {
|
||||
// Length of a communication cycle
|
||||
uint32_t length = thisSequence->getPeriodMs();
|
||||
static_cast<void>(length);
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.2,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.2, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.3, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.3, DeviceHandlerIF::GET_READ);
|
||||
|
||||
// These are actually part of another bus, but this works, so keep it like this for now
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.4,
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.4, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.45, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.45, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.3, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.3, DeviceHandlerIF::GET_READ);
|
||||
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5,
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.55, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.55, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::GET_READ);
|
||||
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.6,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
@ -68,9 +62,9 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.6,
|
||||
DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.65,
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.7,
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.65,
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.7,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
// damaged
|
||||
/*
|
||||
@ -90,9 +84,9 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.8,
|
||||
DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.85,
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.9,
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.85,
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.9,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
static_cast<void>(length);
|
||||
return thisSequence->checkSequence();
|
||||
@ -562,6 +556,12 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * config::spiSched::SCHED_BLOCK_9_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * config::spiSched::SCHED_BLOCK_9_PERIOD, DeviceHandlerIF::GET_READ);
|
||||
|
||||
#if OBSW_ADD_RAD_SENSORS == 1
|
||||
/* Radiation sensor */
|
||||
|
@ -51,7 +51,7 @@ ReturnValue_t pstSyrlinks(FixedTimeslotTaskIF* thisSequence);
|
||||
|
||||
ReturnValue_t pstTcsAndAcs(FixedTimeslotTaskIF* thisSequence, AcsPstCfg cfg);
|
||||
|
||||
ReturnValue_t pstI2c(FixedTimeslotTaskIF* thisSequence);
|
||||
ReturnValue_t pstI2cProcessingSystem(FixedTimeslotTaskIF* thisSequence);
|
||||
|
||||
/**
|
||||
* Generic test PST
|
||||
|
Reference in New Issue
Block a user