added spi com if stubs for stm32

This commit is contained in:
Robin Müller 2021-06-04 16:01:38 +02:00
parent 895ba1b455
commit 39d2a49ca1
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
5 changed files with 74 additions and 0 deletions

View File

@ -3,4 +3,6 @@ target_sources(${TARGET_NAME} PRIVATE
spiDefinitions.cpp
interrupts.c
mspInit.c
SpiCookie.cpp
SpiComIF.cpp
)

24
stm32h7/spi/SpiComIF.cpp Normal file
View File

@ -0,0 +1,24 @@
#include "SpiComIF.h"
SpiComIF::SpiComIF(object_id_t objectId): SystemObject(objectId) {
}
ReturnValue_t SpiComIF::initializeInterface(CookieIF *cookie) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t SpiComIF::sendMessage(CookieIF *cookie, const uint8_t *sendData, size_t sendLen) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t SpiComIF::getSendSuccess(CookieIF *cookie) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t SpiComIF::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t SpiComIF::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) {
return HasReturnvaluesIF::RETURN_OK;
}

29
stm32h7/spi/SpiComIF.h Normal file
View File

@ -0,0 +1,29 @@
#ifndef FSFW_HAL_STM32H7_SPI_SPICOMIF_H_
#define FSFW_HAL_STM32H7_SPI_SPICOMIF_H_
#include "fsfw/devicehandlers/DeviceCommunicationIF.h"
#include "fsfw/objectmanager/SystemObject.h"
class SpiComIF:
public SystemObject,
public DeviceCommunicationIF {
public:
SpiComIF(object_id_t objectId);
protected:
// DeviceCommunicationIF overrides
virtual ReturnValue_t initializeInterface(CookieIF * cookie) override;
virtual ReturnValue_t sendMessage(CookieIF *cookie,
const uint8_t * sendData, size_t sendLen) override;
virtual ReturnValue_t getSendSuccess(CookieIF *cookie) override;
virtual ReturnValue_t requestReceiveMessage(CookieIF *cookie,
size_t requestLen) override;
virtual ReturnValue_t readReceivedMessage(CookieIF *cookie,
uint8_t **buffer, size_t *size) override;
private:
};
#endif /* FSFW_HAL_STM32H7_SPI_SPICOMIF_H_ */

View File

@ -0,0 +1,4 @@
#include "SpiCookie.h"
SpiCookie::SpiCookie() {
}

15
stm32h7/spi/SpiCookie.h Normal file
View File

@ -0,0 +1,15 @@
#ifndef FSFW_HAL_STM32H7_SPI_SPICOOKIE_H_
#define FSFW_HAL_STM32H7_SPI_SPICOOKIE_H_
#include "fsfw/devicehandlers/CookieIF.h"
class SpiCookie: public CookieIF {
public:
SpiCookie();
private:
};
#endif /* FSFW_HAL_STM32H7_SPI_SPICOOKIE_H_ */