spi setup more stable now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2022-05-14 11:34:25 +02:00
parent 1c9f411e75
commit 478975db26
14 changed files with 97 additions and 45 deletions

View File

@ -38,9 +38,10 @@ class Max31865RtdReader : public SystemObject,
public ExecutableObjectIF,
public DeviceCommunicationIF {
public:
Max31865RtdReader(object_id_t objectId, SpiComIF* lowLevelComIF);
Max31865RtdReader(object_id_t objectId, SpiComIF* lowLevelComIF, GpioIF* gpioIF);
[[noreturn]] ReturnValue_t performOperation(uint8_t operationCode) override;
ReturnValue_t initialize() override;
private:
std::vector<Max31865ReaderCookie*> rtds;
@ -48,6 +49,12 @@ class Max31865RtdReader : public SystemObject,
size_t dbLen = 0;
MutexIF* readerMutex;
SpiComIF* comIF;
GpioIF* gpioIF;
MutexIF::TimeoutType csTimeoutType = MutexIF::TimeoutType::BLOCKING;
uint32_t csTimeoutMs = 0;
MutexIF* csLock = nullptr;
void rtdMainLoop();
bool periodicInitHandling();
void periodicReadReqHandling();
@ -75,8 +82,6 @@ class Max31865RtdReader : public SystemObject,
ReturnValue_t readReceivedMessage(CookieIF* cookie, uint8_t** buffer, size_t* size) override;
ReturnValue_t handleSpiError(Max31865ReaderCookie* cookie, ReturnValue_t result, const char* ctx);
SpiComIF* comIF;
};
#endif /* LINUX_DEVICES_MAX31865RTDREADER_H_ */