mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Add braces to C++ single-line loops and conditionals (NFC) (#2973)
This makes code easier to read and more consistent between C++ and Java. Also update clang-format settings to always add a line break (even if no braces are used).
This commit is contained in:
@@ -32,13 +32,17 @@ int32_t HAL_WriteSPI(HAL_SPIPort port, const uint8_t* dataToSend,
|
||||
int32_t HAL_ReadSPI(HAL_SPIPort port, uint8_t* buffer, int32_t count) {
|
||||
return SimSPIData[port].Read(buffer, count);
|
||||
}
|
||||
void HAL_CloseSPI(HAL_SPIPort port) { SimSPIData[port].initialized = false; }
|
||||
void HAL_CloseSPI(HAL_SPIPort port) {
|
||||
SimSPIData[port].initialized = false;
|
||||
}
|
||||
void HAL_SetSPISpeed(HAL_SPIPort port, int32_t speed) {}
|
||||
void HAL_SetSPIOpts(HAL_SPIPort port, HAL_Bool msbFirst,
|
||||
HAL_Bool sampleOnTrailing, HAL_Bool clkIdleHigh) {}
|
||||
void HAL_SetSPIChipSelectActiveHigh(HAL_SPIPort port, int32_t* status) {}
|
||||
void HAL_SetSPIChipSelectActiveLow(HAL_SPIPort port, int32_t* status) {}
|
||||
int32_t HAL_GetSPIHandle(HAL_SPIPort port) { return 0; }
|
||||
int32_t HAL_GetSPIHandle(HAL_SPIPort port) {
|
||||
return 0;
|
||||
}
|
||||
void HAL_SetSPIHandle(HAL_SPIPort port, int32_t handle) {}
|
||||
|
||||
void HAL_InitSPIAuto(HAL_SPIPort port, int32_t bufferSize, int32_t* status) {}
|
||||
|
||||
Reference in New Issue
Block a user