1
0
forked from me/IronOS

Shrink GUI code and simplify LCD rotation. (#300)

* Inline more methods in FRToSI2C.

* Shrink down GUI code.

* Simplify LCD rotation handling.

* Extract version headers.
This commit is contained in:
Alessandro Gatti
2018-05-26 06:21:42 +02:00
committed by Ben V. Brown
parent a576f44ba2
commit 50fe2bcff1
4 changed files with 46 additions and 92 deletions

View File

@@ -11,20 +11,28 @@
#include "cmsis_os.h"
class FRToSI2C {
public:
FRToSI2C(I2C_HandleTypeDef* i2chandle);
void FRToSInit();
public:
FRToSI2C(I2C_HandleTypeDef *i2chandle) : i2c(i2chandle),
I2CSemaphore(nullptr) {
}
void FRToSInit() {
I2CSemaphore = xSemaphoreCreateBinary();
xSemaphoreGive(I2CSemaphore);
}
void CpltCallback(); //Normal Tx Callback
void Mem_Read(uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize,
uint8_t *pData, uint16_t Size);
uint8_t *pData, uint16_t Size);
void Mem_Write(uint16_t DevAddress, uint16_t MemAddress,
uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
void Transmit(uint16_t DevAddress, uint8_t *pData, uint16_t Size);
private:
I2C_HandleTypeDef* i2c;
private:
I2C_HandleTypeDef *i2c;
SemaphoreHandle_t I2CSemaphore;
};