WiP some general cleanup with help of new IDE
Static'ing more of the code where possible
This commit is contained in:
@@ -13,18 +13,20 @@
|
||||
class FRToSI2C {
|
||||
public:
|
||||
|
||||
static void init(I2C_HandleTypeDef *i2chandle) {i2c=i2chandle;
|
||||
I2CSemaphore=nullptr;}
|
||||
static void init(I2C_HandleTypeDef *i2chandle) {
|
||||
i2c = i2chandle;
|
||||
I2CSemaphore = nullptr;
|
||||
}
|
||||
|
||||
static void FRToSInit() {
|
||||
I2CSemaphore = xSemaphoreCreateBinary();
|
||||
I2CSemaphore = xSemaphoreCreateBinaryStatic(&xSemaphoreBuffer);
|
||||
xSemaphoreGive(I2CSemaphore);
|
||||
}
|
||||
|
||||
static void CpltCallback(); //Normal Tx Callback
|
||||
|
||||
static void Mem_Read(uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize,
|
||||
uint8_t *pData, uint16_t Size);
|
||||
static void Mem_Read(uint16_t DevAddress, uint16_t MemAddress,
|
||||
uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
|
||||
static void Mem_Write(uint16_t DevAddress, uint16_t MemAddress,
|
||||
uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
|
||||
|
||||
@@ -36,6 +38,7 @@ private:
|
||||
static I2C_HandleTypeDef *i2c;
|
||||
static void I2C1_ClearBusyFlagErratum();
|
||||
static SemaphoreHandle_t I2CSemaphore;
|
||||
static StaticSemaphore_t xSemaphoreBuffer;
|
||||
};
|
||||
|
||||
#endif /* FRTOSI2C_HPP_ */
|
||||
|
||||
@@ -93,9 +93,9 @@
|
||||
#endif
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configSUPPORT_STATIC_ALLOCATION 0
|
||||
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configSUPPORT_STATIC_ALLOCATION 1
|
||||
#define configSUPPORT_DYNAMIC_ALLOCATION 0
|
||||
#define configUSE_IDLE_HOOK 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( SystemCoreClock )
|
||||
#define configTICK_RATE_HZ ((TickType_t)100)
|
||||
|
||||
Reference in New Issue
Block a user