Updates on the IODevice structure.

Display and Logger fully functional.
Keypad task completed - yet to be tested

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@219 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-09-28 14:30:36 +00:00
parent d54c2c497c
commit 83cce4ba74
21 changed files with 615 additions and 232 deletions

View File

@@ -38,6 +38,7 @@
#include "semphr.h"
#include "platform.h"
#include "IODevice.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
@@ -69,7 +70,7 @@ struct Spi
SPI_TypeDef* SPI_TypeDef;
SPI_InitTypeDef SPI_InitStruct;
T_PL_GPIO SPI_CLK;
T_PL_GPIO* SPI_CE;
const T_PL_GPIO* SPI_CE;
T_PL_GPIO SPI_MOSI;
T_PL_GPIO SPI_MISO;
SemaphoreHandle_t spiClaimed; //! Semaphore to protect SPI bus
@@ -97,13 +98,6 @@ struct SpiParameters
UBaseType_t rxQueueSize;
};
struct SpiDevice
{
struct Spi* spi;
struct SpiParameters* spiParameters;
T_PL_GPIO SPI_CE;
};
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
@@ -121,7 +115,7 @@ struct SpiDevice
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus SPI_construct(struct Spi* self, struct SpiParameters* parameters);
extern ErrorStatus SPI_construct(struct Spi* self, const struct SpiParameters* parameters);
/** ----------------------------------------------------------------------------
@@ -154,19 +148,4 @@ extern ErrorStatus SPI_destruct(struct Spi* self);
extern ErrorStatus SPI_getDefaultParameters(struct SpiParameters* parameters);
/** ----------------------------------------------------------------------------
* Spi_Write
* Write the data in buffer to the SPI in argument self
*
* @param self The UART class object
* @param buffer Message string to send
* @parm length Message length
*
* @return ErrorStatus SUCCESS if writing message was successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus SPI_write (struct SpiDevice* self, const uint8_t* buffer, int length);
#endif /* MISC_INC_SPI_H_ */