more sus testing
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
f5879f5867
commit
3387a71399
@ -27,7 +27,7 @@ static constexpr spi::SpiModes DEFAULT_L3G_MODE = spi::SpiModes::MODE_3;
|
||||
* Some MAX1227 could not be reached with frequencies around 4 MHz. Maybe this is caused by
|
||||
* the decoder and buffer circuits. Thus frequency is here defined to 1 MHz.
|
||||
*/
|
||||
static const uint32_t SUS_MAX1227_SPI_FREQ = 976'000;
|
||||
static const uint32_t SUS_MAX1227_SPI_FREQ = 1'000'000;
|
||||
|
||||
static constexpr uint32_t DEFAULT_MAX_1227_SPEED = 976'000;
|
||||
static constexpr spi::SpiModes DEFAULT_MAX_1227_MODE = spi::SpiModes::MODE_3;
|
||||
|
@ -15,7 +15,9 @@
|
||||
|
||||
#include <bitset>
|
||||
|
||||
#include "busConf.h"
|
||||
#include "devices/gpioIds.h"
|
||||
#include "mission/devices/max1227.h"
|
||||
|
||||
SpiTestClass::SpiTestClass(object_id_t objectId, GpioIF *gpioIF)
|
||||
: TestTask(objectId), gpioIF(gpioIF) {
|
||||
@ -23,8 +25,8 @@ SpiTestClass::SpiTestClass(object_id_t objectId, GpioIF *gpioIF)
|
||||
sif::error << "SpiTestClass::SpiTestClass: Invalid GPIO ComIF!" << std::endl;
|
||||
}
|
||||
testMode = TestModes::MGM_LIS3MDL;
|
||||
spiTransferStruct.rx_buf = reinterpret_cast<__u64>(recvBuffer.data());
|
||||
spiTransferStruct.tx_buf = reinterpret_cast<__u64>(sendBuffer.data());
|
||||
spiTransferStruct[0].rx_buf = reinterpret_cast<__u64>(recvBuffer.data());
|
||||
spiTransferStruct[0].tx_buf = reinterpret_cast<__u64>(sendBuffer.data());
|
||||
}
|
||||
|
||||
ReturnValue_t SpiTestClass::performOneShotAction() {
|
||||
@ -44,6 +46,10 @@ ReturnValue_t SpiTestClass::performOneShotAction() {
|
||||
performL3gTest(gyro1L3gd20ChipSelect);
|
||||
break;
|
||||
}
|
||||
case (TestModes::SUS_0): {
|
||||
performSusTest();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
@ -180,7 +186,7 @@ void SpiTestClass::performLis3MdlTest(uint8_t lis3Id) {
|
||||
return;
|
||||
}
|
||||
setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
|
||||
spiTransferStruct.delay_usecs = 0;
|
||||
spiTransferStruct[0].delay_usecs = 0;
|
||||
|
||||
uint8_t whoAmIRegVal = readStmRegister(fileDescriptor, currentGpioId, whoAmIReg, false);
|
||||
sif::info << "SpiTestClass::performLis3MdlTest: WHO AM I register 0b"
|
||||
@ -273,6 +279,24 @@ void SpiTestClass::performL3gTest(uint8_t l3gId) {
|
||||
sif::info << "Z: " << angVelocZ << std::endl;
|
||||
}
|
||||
|
||||
void SpiTestClass::performSusTest() {
|
||||
#ifdef XIPHOS_Q7S
|
||||
std::string deviceName = q7s::SPI_DEFAULT_DEV;
|
||||
#elif defined(RASPBERRY_PI)
|
||||
std::string deviceName = "";
|
||||
#endif
|
||||
int fileDescriptor = 0;
|
||||
UnixFileGuard fileHelper(deviceName, &fileDescriptor, O_RDWR, "SpiComIF::initializeInterface");
|
||||
if (fileHelper.getOpenResult()) {
|
||||
sif::error << "SpiTestClass::performLis3Mdl3100Test: File descriptor could not be opened!"
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
uint32_t spiSpeed = 1'000'000;
|
||||
spi::SpiModes spiMode = spi::SpiModes::MODE_3;
|
||||
setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
|
||||
}
|
||||
|
||||
void SpiTestClass::acsInit() {
|
||||
GpioCookie *gpioCookie = new GpioCookie();
|
||||
|
||||
@ -361,7 +385,7 @@ void SpiTestClass::setSpiSpeedAndMode(int spiFd, spi::SpiModes mode, uint32_t sp
|
||||
}
|
||||
|
||||
void SpiTestClass::writeRegister(int fd, gpioId_t chipSelect, uint8_t reg, uint8_t value) {
|
||||
spiTransferStruct.len = 2;
|
||||
spiTransferStruct[0].len = 2;
|
||||
sendBuffer[0] = reg;
|
||||
sendBuffer[1] = value;
|
||||
|
||||
@ -405,7 +429,7 @@ void SpiTestClass::writeMultipleRegisters(int fd, gpioId_t chipSelect, uint8_t r
|
||||
|
||||
sendBuffer[0] = reg;
|
||||
std::memcpy(sendBuffer.data() + 1, values, len);
|
||||
spiTransferStruct.len = len + 1;
|
||||
spiTransferStruct[0].len = len + 1;
|
||||
|
||||
if (gpioIF != nullptr and chipSelect != gpio::NO_GPIO) {
|
||||
gpioIF->pullLow(chipSelect);
|
||||
@ -435,7 +459,7 @@ void SpiTestClass::readMultipleRegisters(int fd, gpioId_t chipSelect, uint8_t re
|
||||
return;
|
||||
}
|
||||
|
||||
spiTransferStruct.len = len + 1;
|
||||
spiTransferStruct[0].len = len + 1;
|
||||
sendBuffer[0] = reg | STM_READ_MASK;
|
||||
|
||||
for (uint8_t idx = 0; idx < len; idx++) {
|
||||
@ -465,7 +489,7 @@ uint8_t SpiTestClass::readStmRegister(int fd, gpioId_t chipSelect, uint8_t reg,
|
||||
}
|
||||
|
||||
uint8_t SpiTestClass::readRegister(int fd, gpioId_t chipSelect, uint8_t reg) {
|
||||
spiTransferStruct.len = 2;
|
||||
spiTransferStruct[0].len = 2;
|
||||
sendBuffer[0] = reg;
|
||||
sendBuffer[1] = 0;
|
||||
|
||||
|
@ -15,12 +15,7 @@
|
||||
|
||||
class SpiTestClass : public TestTask {
|
||||
public:
|
||||
enum TestModes {
|
||||
NONE,
|
||||
MGM_LIS3MDL,
|
||||
MGM_RM3100,
|
||||
GYRO_L3GD20H,
|
||||
};
|
||||
enum TestModes { NONE, MGM_LIS3MDL, MGM_RM3100, GYRO_L3GD20H, SUS_0 };
|
||||
|
||||
TestModes testMode;
|
||||
|
||||
@ -34,11 +29,12 @@ class SpiTestClass : public TestTask {
|
||||
|
||||
std::array<uint8_t, 128> recvBuffer;
|
||||
std::array<uint8_t, 128> sendBuffer;
|
||||
struct spi_ioc_transfer spiTransferStruct = {};
|
||||
struct spi_ioc_transfer spiTransferStruct[6] = {};
|
||||
|
||||
void performRm3100Test(uint8_t mgmId);
|
||||
void performLis3MdlTest(uint8_t lis3Id);
|
||||
void performL3gTest(uint8_t l3gId);
|
||||
void performSusTest();
|
||||
|
||||
/* ACS board specific code which pulls all GPIOs high */
|
||||
void acsInit();
|
||||
|
@ -116,11 +116,13 @@ ReturnValue_t SusHandler::buildCommandFromCommand(DeviceCommandId_t deviceComman
|
||||
case (SUS::READ_EXT_TIMED_CONVERSIONS): {
|
||||
std::memset(cmdBuffer, 0, sizeof(cmdBuffer));
|
||||
rawPacket = cmdBuffer;
|
||||
for (uint8_t idx = 0; idx < 6; idx++) {
|
||||
for (uint8_t idx = 0; idx < 1; idx++) {
|
||||
cmdBuffer[idx * 2] = buildConvByte(ScanModes::N_ONCE, idx, false);
|
||||
cmdBuffer[idx * 2 + 1] = 0;
|
||||
}
|
||||
rawPacketLen = SUS::SIZE_READ_EXT_CONVERSIONS;
|
||||
cmdBuffer[2] = 0x00;
|
||||
// cmdBuffer[12] = 0x00;
|
||||
rawPacketLen = 3; // SUS::SIZE_READ_EXT_CONVERSIONS;
|
||||
break;
|
||||
}
|
||||
case (SUS::READ_EXT_TIMED_TEMPS): {
|
||||
|
@ -169,7 +169,7 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
bool addSus5 = false;
|
||||
bool addSus6 = false;
|
||||
bool addSus7 = false;
|
||||
bool addSus8 = true;
|
||||
bool addSus8 = false;
|
||||
bool addSus9 = false;
|
||||
bool addSus10 = false;
|
||||
bool addSus11 = false;
|
||||
@ -183,166 +183,168 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
*/
|
||||
if (addSus0) {
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_0, length * 0.8, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_0, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.933, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_0, length * 0.83, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_0, length * 0.86, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_0, length * 0.9, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_0, length * 0.85, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::SUS_0, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_0, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_0, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_0, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.934, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions */
|
||||
// // thisSequence->addSlot(objects::SUS_0, length * 0.935, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.935, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.935, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.935, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.935, DeviceHandlerIF::GET_READ);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions */
|
||||
// // thisSequence->addSlot(objects::SUS_0, length * 0.935,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_0, length * 0.935,
|
||||
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_0, length * 0.935,
|
||||
// DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_0, length * 0.935,
|
||||
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_0, length * 0.935,
|
||||
// DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
if (addSus1) {
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.9, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.901, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.902, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_1, length * 0.901, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_1, length * 0.902, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
if (addSus2) {
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, SusHandler::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, SusHandler::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.904, SusHandler::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.905, SusHandler::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
if (addSus3) {
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, SusHandler::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, SusHandler::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.91, SusHandler::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.93, SusHandler::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
if (addSus4) {
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.909, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_READ);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.91, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.911, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
if (addSus5) {
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_READ);
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.913, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_READ);
|
||||
// /* Write setup */
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.914, SusHandler::FIRST_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
|
||||
if (addSus6) {
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions from inernal FIFO */
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions from inernal FIFO */
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
|
||||
if (addSus7) {
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions from inernal FIFO */
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions from inernal FIFO */
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
|
||||
if (addSus8) {
|
||||
@ -355,16 +357,17 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
thisSequence->addSlot(objects::SUS_8, length * 0.96, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions from internal FIFO */
|
||||
// // thisSequence->addSlot(objects::SUS_8, length * 0.925, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.925, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.925, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.925, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.925, DeviceHandlerIF::GET_READ);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_WRITE);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions from internal FIFO */
|
||||
// // thisSequence->addSlot(objects::SUS_8, length * 0.925,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_8, length * 0.925,
|
||||
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_8, length * 0.925,
|
||||
// DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_8, length * 0.925,
|
||||
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_8, length * 0.925,
|
||||
// DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
|
||||
if (addSus9) {
|
||||
@ -375,60 +378,66 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// // thisSequence->addSlot(objects::SUS_9, length * 0.925,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_9, length * 0.925,
|
||||
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.925,
|
||||
// DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.925,
|
||||
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_9, length * 0.925,
|
||||
// DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions */
|
||||
// // thisSequence->addSlot(objects::SUS_9, length * 0.926,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_9, length * 0.926,
|
||||
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.926,
|
||||
// DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.926,
|
||||
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_9, length * 0.926,
|
||||
// DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
|
||||
if (addSus10) {
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.928,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_10, length *
|
||||
// 0.928, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_10, length *
|
||||
// 0.928, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_10, length * 0.928,
|
||||
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_10, length * 0.928,
|
||||
// DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_10, length * 0.929,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_10, length *
|
||||
// 0.929, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_10, length *
|
||||
// 0.929, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_10, length * 0.929,
|
||||
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_10, length * 0.929,
|
||||
// DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
|
||||
if (addSus11) {
|
||||
/* Write setup */
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, SusHandler::FIRST_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_READ);
|
||||
/* Start ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_READ);
|
||||
/* Read ADC conversions */
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_READ);
|
||||
// /* Start ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.931,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_11, length *
|
||||
// 0.931, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_11, length *
|
||||
// 0.931, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_11, length * 0.931,
|
||||
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_11, length * 0.931,
|
||||
// DeviceHandlerIF::GET_READ);
|
||||
// /* Read ADC conversions */
|
||||
// thisSequence->addSlot(objects::SUS_11, length * 0.932,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_11, length *
|
||||
// 0.932, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_11, length *
|
||||
// 0.932, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_11, length * 0.932,
|
||||
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_11, length * 0.932,
|
||||
// DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
#endif /* OBSW_ADD_SUN_SENSORS == 1 */
|
||||
|
||||
@ -470,27 +479,32 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.7, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
|
||||
|
||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.25,
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.75, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
|
||||
|
||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.3, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.6, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.75, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
|
||||
|
||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.35, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.75, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
|
||||
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.25,
|
||||
// DeviceHandlerIF::SEND_WRITE);
|
||||
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6,
|
||||
// DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length *
|
||||
// 0.75, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
||||
// length * 0.85, DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.3,
|
||||
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length *
|
||||
// 0.6, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
||||
// length * 0.75, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.85,
|
||||
// DeviceHandlerIF::GET_READ);
|
||||
//
|
||||
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0,
|
||||
// DeviceHandlerIF::PERFORM_OPERATION);
|
||||
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.35,
|
||||
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length *
|
||||
// 0.6, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER,
|
||||
// length * 0.75, DeviceHandlerIF::SEND_READ);
|
||||
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.85,
|
||||
// DeviceHandlerIF::GET_READ);
|
||||
}
|
||||
|
||||
if (enableBside) {
|
||||
|
@ -3,3 +3,7 @@
|
||||
uint8_t max1227::buildConvByte(ScanModes scanMode, uint8_t channel, bool readTemp) {
|
||||
return (1 << 7) | (channel << 3) | (scanMode << 1) | readTemp;
|
||||
}
|
||||
|
||||
uint8_t max1227::buildSetupByte(ClkSel clkSel, RefSel refSel, DiffSel diffSel) {
|
||||
return (1 << 6) | (clkSel << 4) | (refSel << 2) | diffSel;
|
||||
}
|
||||
|
@ -12,7 +12,34 @@ enum ScanModes : uint8_t {
|
||||
N_ONCE = 0b11
|
||||
};
|
||||
|
||||
enum ClkSel : uint8_t {
|
||||
INT_CONV_INT_TIMED_CNVST_AS_CNVST = 0b00,
|
||||
INT_CONV_EXT_TIMED_CNVST = 0b01,
|
||||
// Default mode upon power-up
|
||||
INT_CONV_INT_TIMED_CNVST_AS_AIN = 0b10,
|
||||
// Use external SPI clock for conversion and timing
|
||||
EXT_CONV_EXT_TIMED = 0b11
|
||||
};
|
||||
|
||||
enum RefSel : uint8_t {
|
||||
INT_REF_WITH_WAKEUP = 0b00,
|
||||
// No wakeup delay needed
|
||||
EXT_REF_SINGLE_ENDED = 0b01,
|
||||
INT_REF_NO_WAKEUP = 0b10,
|
||||
// No wakeup delay needed
|
||||
EXT_REF_DIFFERENTIAL = 0b11
|
||||
};
|
||||
|
||||
enum DiffSel : uint8_t {
|
||||
NONE_0 = 0b00,
|
||||
NONE_1 = 0b01,
|
||||
// One unipolar config byte follows the setup byte
|
||||
UNIPOLAR_CFG = 0b10,
|
||||
// One bipolar config byte follows the setup byte
|
||||
BIPOLAR_CFG = 0b11
|
||||
};
|
||||
uint8_t buildConvByte(ScanModes scanMode, uint8_t channel, bool readTemp);
|
||||
uint8_t buildSetupByte(ClkSel clkSel, RefSel refSel, DiffSel diffSel);
|
||||
|
||||
} // namespace max1227
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user