fix: enable more compiler warnings, small fixup of unused parameters
This commit is contained in:
parent
1ddf460dd1
commit
219a5c3a87
AMS_Master_Code
Core/Lib/ADBMS6830B_Driver/Core
STM32-for-VSCode.config.yaml@ -31,7 +31,7 @@ HAL_StatusTypeDef amsCellMeasurement(Cell_Module (*module)[N_BMS]);
|
|||||||
HAL_StatusTypeDef amsAuxAndStatusMeasurement(Cell_Module (*module)[N_BMS]);
|
HAL_StatusTypeDef amsAuxAndStatusMeasurement(Cell_Module (*module)[N_BMS]);
|
||||||
|
|
||||||
HAL_StatusTypeDef amsConfigBalancing(const uint32_t channels[static N_BMS], uint8_t dutyCycle);
|
HAL_StatusTypeDef amsConfigBalancing(const uint32_t channels[static N_BMS], uint8_t dutyCycle);
|
||||||
HAL_StatusTypeDef amsStartBalancing(uint8_t dutyCycle);
|
HAL_StatusTypeDef amsStartBalancing();
|
||||||
HAL_StatusTypeDef amsStopBalancing();
|
HAL_StatusTypeDef amsStopBalancing();
|
||||||
|
|
||||||
HAL_StatusTypeDef amsSelfTest();
|
HAL_StatusTypeDef amsSelfTest();
|
||||||
|
@ -27,7 +27,7 @@ uint8_t adbmsDriverInit(SPI_HandleTypeDef* hspi);
|
|||||||
HAL_StatusTypeDef ___writeCMD(uint16_t command, uint8_t * args, size_t arglen);
|
HAL_StatusTypeDef ___writeCMD(uint16_t command, uint8_t * args, size_t arglen);
|
||||||
|
|
||||||
[[gnu::access(read_write, 2, 4), gnu::nonnull(2), gnu::always_inline]] //add dummy size variable for bounds checking, should be optimized out
|
[[gnu::access(read_write, 2, 4), gnu::nonnull(2), gnu::always_inline]] //add dummy size variable for bounds checking, should be optimized out
|
||||||
static inline HAL_StatusTypeDef __writeCMD(uint16_t command, uint8_t * args, size_t arglen, size_t _) {
|
static inline HAL_StatusTypeDef __writeCMD(uint16_t command, uint8_t * args, size_t arglen, size_t) {
|
||||||
return ___writeCMD(command, args, arglen);
|
return ___writeCMD(command, args, arglen);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ static inline HAL_StatusTypeDef __writeCMD(uint16_t command, uint8_t * args, siz
|
|||||||
HAL_StatusTypeDef ___readCMD(uint16_t command, uint8_t * buffer, size_t arglen);
|
HAL_StatusTypeDef ___readCMD(uint16_t command, uint8_t * buffer, size_t arglen);
|
||||||
|
|
||||||
[[gnu::access(read_write, 2, 4), gnu::nonnull(2), gnu::always_inline]] //add dummy size variable for bounds checking, should be optimized out
|
[[gnu::access(read_write, 2, 4), gnu::nonnull(2), gnu::always_inline]] //add dummy size variable for bounds checking, should be optimized out
|
||||||
static inline HAL_StatusTypeDef __readCMD(uint16_t command, uint8_t * buffer, size_t arglen, size_t _) {
|
static inline HAL_StatusTypeDef __readCMD(uint16_t command, uint8_t * buffer, size_t arglen, size_t) {
|
||||||
return ___readCMD(command, buffer, arglen);
|
return ___readCMD(command, buffer, arglen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ HAL_StatusTypeDef amsConfigBalancing(const uint32_t channels[static N_BMS], uint
|
|||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HAL_StatusTypeDef amsStartBalancing(uint8_t dutyCycle) { return writeCMD(UNMUTE, CMD_EMPTY_BUFFER, 0); }
|
HAL_StatusTypeDef amsStartBalancing() { return writeCMD(UNMUTE, CMD_EMPTY_BUFFER, 0); }
|
||||||
|
|
||||||
HAL_StatusTypeDef amsStopBalancing() { return writeCMD(MUTE, CMD_EMPTY_BUFFER, 0); }
|
HAL_StatusTypeDef amsStopBalancing() { return writeCMD(MUTE, CMD_EMPTY_BUFFER, 0); }
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ ADBMS_DetailedStatus AMS_Init(SPI_HandleTypeDef* hspi) {
|
|||||||
numberofCells);
|
numberofCells);
|
||||||
if (initAMS(hspi) != HAL_OK) {
|
if (initAMS(hspi) != HAL_OK) {
|
||||||
debug_log(LOG_LEVEL_ERROR, "ADBMS6830B HAL - initialization failed");
|
debug_log(LOG_LEVEL_ERROR, "ADBMS6830B HAL - initialization failed");
|
||||||
return (ADBMS_DetailedStatus){ADBMS_INTERNAL_BMS_FAULT};
|
return (ADBMS_DetailedStatus){ADBMS_INTERNAL_BMS_FAULT, -1};
|
||||||
}
|
}
|
||||||
|
|
||||||
pollingTimes = (struct pollingTimes){HAL_GetTick(), HAL_GetTick()};
|
pollingTimes = (struct pollingTimes){HAL_GetTick(), HAL_GetTick()};
|
||||||
|
@ -39,6 +39,7 @@ asDefinitionsFile:
|
|||||||
# Compiler flags
|
# Compiler flags
|
||||||
cFlags:
|
cFlags:
|
||||||
- -Wall
|
- -Wall
|
||||||
|
- -Wextra
|
||||||
- -fdata-sections
|
- -fdata-sections
|
||||||
- -ffunction-sections
|
- -ffunction-sections
|
||||||
- -std=gnu23
|
- -std=gnu23
|
||||||
|
Loading…
x
Reference in New Issue
Block a user