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
|
* 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.
|
* 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 uint32_t DEFAULT_MAX_1227_SPEED = 976'000;
|
||||||
static constexpr spi::SpiModes DEFAULT_MAX_1227_MODE = spi::SpiModes::MODE_3;
|
static constexpr spi::SpiModes DEFAULT_MAX_1227_MODE = spi::SpiModes::MODE_3;
|
||||||
|
@ -15,7 +15,9 @@
|
|||||||
|
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
|
|
||||||
|
#include "busConf.h"
|
||||||
#include "devices/gpioIds.h"
|
#include "devices/gpioIds.h"
|
||||||
|
#include "mission/devices/max1227.h"
|
||||||
|
|
||||||
SpiTestClass::SpiTestClass(object_id_t objectId, GpioIF *gpioIF)
|
SpiTestClass::SpiTestClass(object_id_t objectId, GpioIF *gpioIF)
|
||||||
: TestTask(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;
|
sif::error << "SpiTestClass::SpiTestClass: Invalid GPIO ComIF!" << std::endl;
|
||||||
}
|
}
|
||||||
testMode = TestModes::MGM_LIS3MDL;
|
testMode = TestModes::MGM_LIS3MDL;
|
||||||
spiTransferStruct.rx_buf = reinterpret_cast<__u64>(recvBuffer.data());
|
spiTransferStruct[0].rx_buf = reinterpret_cast<__u64>(recvBuffer.data());
|
||||||
spiTransferStruct.tx_buf = reinterpret_cast<__u64>(sendBuffer.data());
|
spiTransferStruct[0].tx_buf = reinterpret_cast<__u64>(sendBuffer.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SpiTestClass::performOneShotAction() {
|
ReturnValue_t SpiTestClass::performOneShotAction() {
|
||||||
@ -44,6 +46,10 @@ ReturnValue_t SpiTestClass::performOneShotAction() {
|
|||||||
performL3gTest(gyro1L3gd20ChipSelect);
|
performL3gTest(gyro1L3gd20ChipSelect);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case (TestModes::SUS_0): {
|
||||||
|
performSusTest();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
@ -180,7 +186,7 @@ void SpiTestClass::performLis3MdlTest(uint8_t lis3Id) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
|
setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
|
||||||
spiTransferStruct.delay_usecs = 0;
|
spiTransferStruct[0].delay_usecs = 0;
|
||||||
|
|
||||||
uint8_t whoAmIRegVal = readStmRegister(fileDescriptor, currentGpioId, whoAmIReg, false);
|
uint8_t whoAmIRegVal = readStmRegister(fileDescriptor, currentGpioId, whoAmIReg, false);
|
||||||
sif::info << "SpiTestClass::performLis3MdlTest: WHO AM I register 0b"
|
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;
|
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() {
|
void SpiTestClass::acsInit() {
|
||||||
GpioCookie *gpioCookie = new GpioCookie();
|
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) {
|
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[0] = reg;
|
||||||
sendBuffer[1] = value;
|
sendBuffer[1] = value;
|
||||||
|
|
||||||
@ -405,7 +429,7 @@ void SpiTestClass::writeMultipleRegisters(int fd, gpioId_t chipSelect, uint8_t r
|
|||||||
|
|
||||||
sendBuffer[0] = reg;
|
sendBuffer[0] = reg;
|
||||||
std::memcpy(sendBuffer.data() + 1, values, len);
|
std::memcpy(sendBuffer.data() + 1, values, len);
|
||||||
spiTransferStruct.len = len + 1;
|
spiTransferStruct[0].len = len + 1;
|
||||||
|
|
||||||
if (gpioIF != nullptr and chipSelect != gpio::NO_GPIO) {
|
if (gpioIF != nullptr and chipSelect != gpio::NO_GPIO) {
|
||||||
gpioIF->pullLow(chipSelect);
|
gpioIF->pullLow(chipSelect);
|
||||||
@ -435,7 +459,7 @@ void SpiTestClass::readMultipleRegisters(int fd, gpioId_t chipSelect, uint8_t re
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
spiTransferStruct.len = len + 1;
|
spiTransferStruct[0].len = len + 1;
|
||||||
sendBuffer[0] = reg | STM_READ_MASK;
|
sendBuffer[0] = reg | STM_READ_MASK;
|
||||||
|
|
||||||
for (uint8_t idx = 0; idx < len; idx++) {
|
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) {
|
uint8_t SpiTestClass::readRegister(int fd, gpioId_t chipSelect, uint8_t reg) {
|
||||||
spiTransferStruct.len = 2;
|
spiTransferStruct[0].len = 2;
|
||||||
sendBuffer[0] = reg;
|
sendBuffer[0] = reg;
|
||||||
sendBuffer[1] = 0;
|
sendBuffer[1] = 0;
|
||||||
|
|
||||||
|
@ -15,12 +15,7 @@
|
|||||||
|
|
||||||
class SpiTestClass : public TestTask {
|
class SpiTestClass : public TestTask {
|
||||||
public:
|
public:
|
||||||
enum TestModes {
|
enum TestModes { NONE, MGM_LIS3MDL, MGM_RM3100, GYRO_L3GD20H, SUS_0 };
|
||||||
NONE,
|
|
||||||
MGM_LIS3MDL,
|
|
||||||
MGM_RM3100,
|
|
||||||
GYRO_L3GD20H,
|
|
||||||
};
|
|
||||||
|
|
||||||
TestModes testMode;
|
TestModes testMode;
|
||||||
|
|
||||||
@ -34,11 +29,12 @@ class SpiTestClass : public TestTask {
|
|||||||
|
|
||||||
std::array<uint8_t, 128> recvBuffer;
|
std::array<uint8_t, 128> recvBuffer;
|
||||||
std::array<uint8_t, 128> sendBuffer;
|
std::array<uint8_t, 128> sendBuffer;
|
||||||
struct spi_ioc_transfer spiTransferStruct = {};
|
struct spi_ioc_transfer spiTransferStruct[6] = {};
|
||||||
|
|
||||||
void performRm3100Test(uint8_t mgmId);
|
void performRm3100Test(uint8_t mgmId);
|
||||||
void performLis3MdlTest(uint8_t lis3Id);
|
void performLis3MdlTest(uint8_t lis3Id);
|
||||||
void performL3gTest(uint8_t l3gId);
|
void performL3gTest(uint8_t l3gId);
|
||||||
|
void performSusTest();
|
||||||
|
|
||||||
/* ACS board specific code which pulls all GPIOs high */
|
/* ACS board specific code which pulls all GPIOs high */
|
||||||
void acsInit();
|
void acsInit();
|
||||||
|
@ -116,11 +116,13 @@ ReturnValue_t SusHandler::buildCommandFromCommand(DeviceCommandId_t deviceComman
|
|||||||
case (SUS::READ_EXT_TIMED_CONVERSIONS): {
|
case (SUS::READ_EXT_TIMED_CONVERSIONS): {
|
||||||
std::memset(cmdBuffer, 0, sizeof(cmdBuffer));
|
std::memset(cmdBuffer, 0, sizeof(cmdBuffer));
|
||||||
rawPacket = 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] = buildConvByte(ScanModes::N_ONCE, idx, false);
|
||||||
cmdBuffer[idx * 2 + 1] = 0;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case (SUS::READ_EXT_TIMED_TEMPS): {
|
case (SUS::READ_EXT_TIMED_TEMPS): {
|
||||||
|
@ -169,7 +169,7 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
bool addSus5 = false;
|
bool addSus5 = false;
|
||||||
bool addSus6 = false;
|
bool addSus6 = false;
|
||||||
bool addSus7 = false;
|
bool addSus7 = false;
|
||||||
bool addSus8 = true;
|
bool addSus8 = false;
|
||||||
bool addSus9 = false;
|
bool addSus9 = false;
|
||||||
bool addSus10 = false;
|
bool addSus10 = false;
|
||||||
bool addSus11 = false;
|
bool addSus11 = false;
|
||||||
@ -183,166 +183,168 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
*/
|
*/
|
||||||
if (addSus0) {
|
if (addSus0) {
|
||||||
/* Write setup */
|
/* 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.933, SusHandler::FIRST_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_0, length * 0.83, DeviceHandlerIF::SEND_WRITE);
|
thisSequence->addSlot(objects::SUS_0, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_0, length * 0.86, DeviceHandlerIF::GET_WRITE);
|
thisSequence->addSlot(objects::SUS_0, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_0, length * 0.9, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_0, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_0, length * 0.85, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_0, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||||
/* Start ADC conversions */
|
/* Start ADC conversions */
|
||||||
// thisSequence->addSlot(objects::SUS_0, length * 0.934, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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::SEND_WRITE);
|
||||||
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_0, length * 0.94, DeviceHandlerIF::GET_READ);
|
||||||
// /* Read ADC conversions */
|
// /* Read ADC conversions */
|
||||||
// // thisSequence->addSlot(objects::SUS_0, length * 0.935, DeviceHandlerIF::PERFORM_OPERATION);
|
// // thisSequence->addSlot(objects::SUS_0, length * 0.935,
|
||||||
// thisSequence->addSlot(objects::SUS_0, length * 0.935, DeviceHandlerIF::SEND_WRITE);
|
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_0, length * 0.935,
|
||||||
// thisSequence->addSlot(objects::SUS_0, length * 0.935, DeviceHandlerIF::GET_WRITE);
|
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_0, length * 0.935,
|
||||||
// thisSequence->addSlot(objects::SUS_0, length * 0.935, DeviceHandlerIF::SEND_READ);
|
// DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_0, length * 0.935,
|
||||||
// thisSequence->addSlot(objects::SUS_0, length * 0.935, DeviceHandlerIF::GET_READ);
|
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_0, length * 0.935,
|
||||||
|
// DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
if (addSus1) {
|
if (addSus1) {
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::PERFORM_OPERATION);
|
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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_1, length * 0.9, DeviceHandlerIF::GET_READ);
|
||||||
/* Write setup */
|
// /* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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, SusHandler::FIRST_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_1, length * 0.901, DeviceHandlerIF::GET_READ);
|
||||||
/* Write setup */
|
// /* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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, SusHandler::FIRST_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_1, length * 0.902, DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
if (addSus2) {
|
if (addSus2) {
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::PERFORM_OPERATION);
|
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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_2, length * 0.903, DeviceHandlerIF::GET_READ);
|
||||||
/* Write setup */
|
// /* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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, SusHandler::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_2, length * 0.904, DeviceHandlerIF::GET_READ);
|
||||||
/* Write setup */
|
// /* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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, SusHandler::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_2, length * 0.905, DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
if (addSus3) {
|
if (addSus3) {
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::PERFORM_OPERATION);
|
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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_3, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||||
/* Write setup */
|
// /* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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, SusHandler::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_3, length * 0.91, DeviceHandlerIF::GET_READ);
|
||||||
/* Write setup */
|
// /* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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, SusHandler::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_3, length * 0.93, DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
if (addSus4) {
|
if (addSus4) {
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::PERFORM_OPERATION);
|
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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_4, length * 0.909, DeviceHandlerIF::GET_READ);
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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, SusHandler::FIRST_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_4, length * 0.91, DeviceHandlerIF::GET_READ);
|
||||||
/* Write setup */
|
// /* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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, SusHandler::FIRST_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_4, length * 0.911, DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
if (addSus5) {
|
if (addSus5) {
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::PERFORM_OPERATION);
|
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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_5, length * 0.912, DeviceHandlerIF::GET_READ);
|
||||||
/* Write setup */
|
// /* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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, SusHandler::FIRST_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_5, length * 0.913, DeviceHandlerIF::GET_READ);
|
||||||
/* Write setup */
|
// /* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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, SusHandler::FIRST_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_5, length * 0.914, DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addSus6) {
|
if (addSus6) {
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::PERFORM_OPERATION);
|
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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_6, length * 0.915, DeviceHandlerIF::GET_READ);
|
||||||
/* Start ADC conversions */
|
// /* Start ADC conversions */
|
||||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_6, length * 0.916, DeviceHandlerIF::GET_READ);
|
||||||
/* Read ADC conversions from inernal FIFO */
|
// /* 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::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_WRITE);
|
// 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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_READ);
|
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_6, length * 0.917, DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addSus7) {
|
if (addSus7) {
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::PERFORM_OPERATION);
|
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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_7, length * 0.918, DeviceHandlerIF::GET_READ);
|
||||||
/* Start ADC conversions */
|
// /* Start ADC conversions */
|
||||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_7, length * 0.919, DeviceHandlerIF::GET_READ);
|
||||||
/* Read ADC conversions from inernal FIFO */
|
// /* 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::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_WRITE);
|
// 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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_READ);
|
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_7, length * 0.92, DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addSus8) {
|
if (addSus8) {
|
||||||
@ -355,16 +357,17 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
thisSequence->addSlot(objects::SUS_8, length * 0.96, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_8, length * 0.96, DeviceHandlerIF::GET_READ);
|
||||||
/* Start ADC conversions */
|
/* Start ADC conversions */
|
||||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::PERFORM_OPERATION);
|
// 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::SEND_WRITE);
|
||||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_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::SEND_READ);
|
||||||
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_READ);
|
// thisSequence->addSlot(objects::SUS_8, length * 0.923, DeviceHandlerIF::GET_READ);
|
||||||
// /* Read ADC conversions from internal FIFO */
|
// /* 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,
|
||||||
// thisSequence->addSlot(objects::SUS_8, length * 0.925, DeviceHandlerIF::SEND_WRITE);
|
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_8, length * 0.925,
|
||||||
// thisSequence->addSlot(objects::SUS_8, length * 0.925, DeviceHandlerIF::GET_WRITE);
|
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_8, length * 0.925,
|
||||||
// thisSequence->addSlot(objects::SUS_8, length * 0.925, DeviceHandlerIF::SEND_READ);
|
// DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_8, length * 0.925,
|
||||||
// thisSequence->addSlot(objects::SUS_8, length * 0.925, DeviceHandlerIF::GET_READ);
|
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_8, length * 0.925,
|
||||||
|
// DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addSus9) {
|
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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_9, length * 0.924, DeviceHandlerIF::GET_READ);
|
||||||
/* Start ADC conversions */
|
// /* Start ADC conversions */
|
||||||
// thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::PERFORM_OPERATION);
|
// // thisSequence->addSlot(objects::SUS_9, length * 0.925,
|
||||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_WRITE);
|
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_9, length * 0.925,
|
||||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_WRITE);
|
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.925,
|
||||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::SEND_READ);
|
// DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.925,
|
||||||
thisSequence->addSlot(objects::SUS_9, length * 0.925, DeviceHandlerIF::GET_READ);
|
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_9, length * 0.925,
|
||||||
/* Read ADC conversions */
|
// DeviceHandlerIF::GET_READ);
|
||||||
// thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::PERFORM_OPERATION);
|
// /* Read ADC conversions */
|
||||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_WRITE);
|
// // thisSequence->addSlot(objects::SUS_9, length * 0.926,
|
||||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_WRITE);
|
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_9, length * 0.926,
|
||||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::SEND_READ);
|
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_9, length * 0.926,
|
||||||
thisSequence->addSlot(objects::SUS_9, length * 0.926, DeviceHandlerIF::GET_READ);
|
// 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) {
|
if (addSus10) {
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::PERFORM_OPERATION);
|
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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_10, length * 0.927, DeviceHandlerIF::GET_READ);
|
||||||
/* Start ADC conversions */
|
// /* Start ADC conversions */
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::PERFORM_OPERATION);
|
// thisSequence->addSlot(objects::SUS_10, length * 0.928,
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_WRITE);
|
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_10, length *
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_WRITE);
|
// 0.928, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_10, length *
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::SEND_READ);
|
// 0.928, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_10, length * 0.928,
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.928, DeviceHandlerIF::GET_READ);
|
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_10, length * 0.928,
|
||||||
/* Read ADC conversions */
|
// DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::PERFORM_OPERATION);
|
// /* Read ADC conversions */
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_WRITE);
|
// thisSequence->addSlot(objects::SUS_10, length * 0.929,
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_WRITE);
|
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_10, length *
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::SEND_READ);
|
// 0.929, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_10, length *
|
||||||
thisSequence->addSlot(objects::SUS_10, length * 0.929, DeviceHandlerIF::GET_READ);
|
// 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) {
|
if (addSus11) {
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::PERFORM_OPERATION);
|
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::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SUS_11, length * 0.93, DeviceHandlerIF::GET_READ);
|
||||||
/* Start ADC conversions */
|
// /* Start ADC conversions */
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::PERFORM_OPERATION);
|
// thisSequence->addSlot(objects::SUS_11, length * 0.931,
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_WRITE);
|
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_11, length *
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_WRITE);
|
// 0.931, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_11, length *
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::SEND_READ);
|
// 0.931, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::SUS_11, length * 0.931,
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.931, DeviceHandlerIF::GET_READ);
|
// DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::SUS_11, length * 0.931,
|
||||||
/* Read ADC conversions */
|
// DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::PERFORM_OPERATION);
|
// /* Read ADC conversions */
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_WRITE);
|
// thisSequence->addSlot(objects::SUS_11, length * 0.932,
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_WRITE);
|
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::SUS_11, length *
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::SEND_READ);
|
// 0.932, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SUS_11, length *
|
||||||
thisSequence->addSlot(objects::SUS_11, length * 0.932, DeviceHandlerIF::GET_READ);
|
// 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 */
|
#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.7, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0,
|
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
// DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.25,
|
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.25,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
// 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.6,
|
||||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.75, DeviceHandlerIF::SEND_READ);
|
// DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length *
|
||||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
|
// 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,
|
||||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.3, DeviceHandlerIF::SEND_WRITE);
|
// DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.6, DeviceHandlerIF::GET_WRITE);
|
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.3,
|
||||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.75, DeviceHandlerIF::SEND_READ);
|
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length *
|
||||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
|
// 0.6, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
||||||
|
// length * 0.75, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0,
|
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.85,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
// DeviceHandlerIF::GET_READ);
|
||||||
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,
|
||||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.75, DeviceHandlerIF::SEND_READ);
|
// DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
|
// 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) {
|
if (enableBside) {
|
||||||
|
@ -3,3 +3,7 @@
|
|||||||
uint8_t max1227::buildConvByte(ScanModes scanMode, uint8_t channel, bool readTemp) {
|
uint8_t max1227::buildConvByte(ScanModes scanMode, uint8_t channel, bool readTemp) {
|
||||||
return (1 << 7) | (channel << 3) | (scanMode << 1) | 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
|
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 buildConvByte(ScanModes scanMode, uint8_t channel, bool readTemp);
|
||||||
|
uint8_t buildSetupByte(ClkSel clkSel, RefSel refSel, DiffSel diffSel);
|
||||||
|
|
||||||
} // namespace max1227
|
} // namespace max1227
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user