aboutsummaryrefslogtreecommitdiffstats
path: root/platforms
diff options
context:
space:
mode:
authorQMK Bot2025-11-30 20:25:52 +0100
committerQMK Bot2025-11-30 20:25:52 +0100
commitee60542bd6aa8d96714516f7f42b02fbd8105fcb (patch)
treefacebc35a70d8890375388f963f05ec4c89a9369 /platforms
parentb5dfb2bd1ea38a37c58227eb17bde583f0c0e4d6 (diff)
parent6ed61c65dd66cdbb450a4920a69bae193ec73f15 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'platforms')
-rw-r--r--platforms/avr/drivers/analog.c2
-rw-r--r--platforms/avr/drivers/ws2812_bitbang.c10
-rw-r--r--platforms/avr/gpio.h14
-rw-r--r--platforms/avr/hardware_id.c2
-rw-r--r--platforms/chibios/bootloaders/rp2040.c2
-rw-r--r--platforms/chibios/drivers/analog.c2
-rw-r--r--platforms/chibios/drivers/audio_dac_basic.c6
-rw-r--r--platforms/chibios/drivers/audio_pwm_software.c8
-rw-r--r--platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c6
-rw-r--r--platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c4
-rw-r--r--platforms/chibios/drivers/flash/legacy_flash_ops.c2
-rw-r--r--platforms/chibios/drivers/serial_usart.c8
-rw-r--r--platforms/chibios/drivers/uart_sio.c8
-rw-r--r--platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c2
-rw-r--r--platforms/chibios/drivers/ws2812_pwm.c4
-rw-r--r--platforms/chibios/drivers/ws2812_spi.c3
-rw-r--r--platforms/progmem.h10
-rw-r--r--platforms/synchronization_util.h4
-rw-r--r--platforms/test/eeprom.c6
-rw-r--r--platforms/test/eeprom_legacy_emulated_flash_tests.cpp2
-rw-r--r--platforms/test/legacy_flash_ops_mock.c4
21 files changed, 54 insertions, 55 deletions
diff --git a/platforms/avr/drivers/analog.c b/platforms/avr/drivers/analog.c
index a68c6a371d..b2cb97223c 100644
--- a/platforms/avr/drivers/analog.c
+++ b/platforms/avr/drivers/analog.c
@@ -96,7 +96,7 @@ int16_t adc_read(uint8_t mux) {
#if defined(MUX4)
ADMUX = aref | (mux & (_BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0)));
#else
- ADMUX = aref | (mux & (_BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0)));
+ ADMUX = aref | (mux & (_BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0)));
#endif
// Start the conversion
diff --git a/platforms/avr/drivers/ws2812_bitbang.c b/platforms/avr/drivers/ws2812_bitbang.c
index 183690c967..c4a854d9ee 100644
--- a/platforms/avr/drivers/ws2812_bitbang.c
+++ b/platforms/avr/drivers/ws2812_bitbang.c
@@ -26,7 +26,7 @@
#include "ws2812.h"
#include "pin_defs.h"
-#define pinmask(pin) (_BV((pin)&0xF))
+#define pinmask(pin) (_BV((pin) & 0xF))
/*
This routine writes an array of bytes with RGB values to the Dataout pin
@@ -105,7 +105,7 @@ static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t
w_nop8
#endif
#if (w1_nops & 16)
- w_nop16
+ w_nop16
#endif
" sbrs %1,7 \n\t" // '1' [03] '0' [02]
" out %2,%4 \n\t" // '1' [--] '0' [03] - fe-low
@@ -123,7 +123,7 @@ static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t
w_nop8
#endif
#if (w2_nops & 16)
- w_nop16
+ w_nop16
#endif
" out %2,%4 \n\t" // '1' [+1] '0' [+1] - fe-high
#if (w3_nops & 1)
@@ -139,7 +139,7 @@ static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t
w_nop8
#endif
#if (w3_nops & 16)
- w_nop16
+ w_nop16
#endif
" dec %0 \n\t" // '1' [+2] '0' [+2]
@@ -173,7 +173,7 @@ void ws2812_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void ws2812_flush(void) {
- uint8_t masklo = ~(pinmask(WS2812_DI_PIN)) & PORTx_ADDRESS(WS2812_DI_PIN);
+ uint8_t masklo = ~(pinmask(WS2812_DI_PIN))&PORTx_ADDRESS(WS2812_DI_PIN);
uint8_t maskhi = pinmask(WS2812_DI_PIN) | PORTx_ADDRESS(WS2812_DI_PIN);
ws2812_sendarray_mask((uint8_t *)ws2812_leds, WS2812_LED_COUNT * sizeof(ws2812_led_t), masklo, maskhi);
diff --git a/platforms/avr/gpio.h b/platforms/avr/gpio.h
index 4c09619772..9b5b3edc68 100644
--- a/platforms/avr/gpio.h
+++ b/platforms/avr/gpio.h
@@ -24,17 +24,17 @@ typedef uint8_t pin_t;
/* Operation of GPIO by pin. */
-#define gpio_set_pin_input(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
-#define gpio_set_pin_input_high(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
+#define gpio_set_pin_input(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin) & 0xF), PORTx_ADDRESS(pin) &= ~_BV((pin) & 0xF))
+#define gpio_set_pin_input_high(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin) & 0xF), PORTx_ADDRESS(pin) |= _BV((pin) & 0xF))
#define gpio_set_pin_input_low(pin) STATIC_ASSERT(0, "GPIO pulldowns in input mode are not available on AVR")
-#define gpio_set_pin_output_push_pull(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF))
+#define gpio_set_pin_output_push_pull(pin) (DDRx_ADDRESS(pin) |= _BV((pin) & 0xF))
#define gpio_set_pin_output_open_drain(pin) STATIC_ASSERT(0, "Open-drain outputs are not available on AVR")
#define gpio_set_pin_output(pin) gpio_set_pin_output_push_pull(pin)
-#define gpio_write_pin_high(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
-#define gpio_write_pin_low(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
+#define gpio_write_pin_high(pin) (PORTx_ADDRESS(pin) |= _BV((pin) & 0xF))
+#define gpio_write_pin_low(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin) & 0xF))
#define gpio_write_pin(pin, level) ((level) ? gpio_write_pin_high(pin) : gpio_write_pin_low(pin))
-#define gpio_read_pin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
+#define gpio_read_pin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin) & 0xF)))
-#define gpio_toggle_pin(pin) (PORTx_ADDRESS(pin) ^= _BV((pin)&0xF))
+#define gpio_toggle_pin(pin) (PORTx_ADDRESS(pin) ^= _BV((pin) & 0xF))
diff --git a/platforms/avr/hardware_id.c b/platforms/avr/hardware_id.c
index 302a800e0b..9fb2aaed68 100644
--- a/platforms/avr/hardware_id.c
+++ b/platforms/avr/hardware_id.c
@@ -13,7 +13,7 @@
__attribute__((weak)) hardware_id_t get_hardware_id(void) {
hardware_id_t id = {0};
for (uint8_t i = 0; i < 10; i += 1) {
- ((uint8_t*)&id)[i] = boot_signature_byte_get(i + 0x0E);
+ ((uint8_t *)&id)[i] = boot_signature_byte_get(i + 0x0E);
}
return id;
}
diff --git a/platforms/chibios/bootloaders/rp2040.c b/platforms/chibios/bootloaders/rp2040.c
index 524d13e636..2e991625c9 100644
--- a/platforms/chibios/bootloaders/rp2040.c
+++ b/platforms/chibios/bootloaders/rp2040.c
@@ -30,7 +30,7 @@ void enter_bootloader_mode_if_requested(void) {}
// Needs to be located in a RAM section that is never initialized on boot to
// preserve its value on reset
static volatile uint32_t __attribute__((section(".ram0.bootloader_magic"))) magic_location;
-const uint32_t magic_token = 0xCAFEB0BA;
+const uint32_t magic_token = 0xCAFEB0BA;
// We can not use the __early_init / enter_bootloader_mode_if_requested hook as
// we depend on an already initialized system with usable memory regions and
diff --git a/platforms/chibios/drivers/analog.c b/platforms/chibios/drivers/analog.c
index a916cc9a1d..93005c2555 100644
--- a/platforms/chibios/drivers/analog.c
+++ b/platforms/chibios/drivers/analog.c
@@ -145,7 +145,7 @@ static ADCConversionGroup adcConversionGroup = {
.smpr = ADC_SAMPLING_RATE,
#elif defined(USE_ADCV2)
# if !defined(STM32F1XX) && !defined(GD32VF103) && !defined(WB32F3G71xx) && !defined(WB32FQ95xx) && !defined(AT32F415)
- .cr2 = ADC_CR2_SWSTART, // F103 seem very unhappy with, F401 seems very unhappy without...
+ .cr2 = ADC_CR2_SWSTART, // F103 seem very unhappy with, F401 seems very unhappy without...
# endif
# if defined(AT32F415)
.spt2 = ADC_SPT2_CSPT_AN0(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN1(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN2(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN3(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN4(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN5(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN6(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN7(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN8(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN9(ADC_SAMPLING_RATE),
diff --git a/platforms/chibios/drivers/audio_dac_basic.c b/platforms/chibios/drivers/audio_dac_basic.c
index 99b938e610..053584ec87 100644
--- a/platforms/chibios/drivers/audio_dac_basic.c
+++ b/platforms/chibios/drivers/audio_dac_basic.c
@@ -77,9 +77,9 @@ GPTConfig gpt7cfg1 = {.frequency = AUDIO_DAC_SAMPLE_RATE,
static void gpt_audio_state_cb(GPTDriver *gptp);
GPTConfig gptStateUpdateCfg = {.frequency = 10,
- .callback = gpt_audio_state_cb,
- .cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */
- .dier = 0U};
+ .callback = gpt_audio_state_cb,
+ .cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */
+ .dier = 0U};
static const DACConfig dac_conf_ch1 = {.init = AUDIO_DAC_OFF_VALUE, .datamode = DAC_DHRM_12BIT_RIGHT};
static const DACConfig dac_conf_ch2 = {.init = AUDIO_DAC_OFF_VALUE, .datamode = DAC_DHRM_12BIT_RIGHT};
diff --git a/platforms/chibios/drivers/audio_pwm_software.c b/platforms/chibios/drivers/audio_pwm_software.c
index f48323900b..015bdbee1a 100644
--- a/platforms/chibios/drivers/audio_pwm_software.c
+++ b/platforms/chibios/drivers/audio_pwm_software.c
@@ -63,8 +63,8 @@ void channel_1_set_frequency(float freq) {
pwmChangePeriod(&AUDIO_PWM_DRIVER, period);
pwmEnableChannel(&AUDIO_PWM_DRIVER, AUDIO_PWM_CHANNEL - 1,
- // adjust the duty-cycle so that the output is for 'note_timbre' duration HIGH
- PWM_PERCENTAGE_TO_WIDTH(&AUDIO_PWM_DRIVER, (100 - note_timbre) * 100));
+ // adjust the duty-cycle so that the output is for 'note_timbre' duration HIGH
+ PWM_PERCENTAGE_TO_WIDTH(&AUDIO_PWM_DRIVER, (100 - note_timbre) * 100));
}
float channel_1_get_frequency(void) {
@@ -117,8 +117,8 @@ GPTConfig gptCFG = {
and the .interval counts from 64 downwards - audio_update_state is
called just often enough to not miss anything
*/
- .frequency = 60 * 64,
- .callback = gpt_callback,
+ .frequency = 60 * 64,
+ .callback = gpt_callback,
};
void audio_driver_initialize_impl(void) {
diff --git a/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c b/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c
index 9cf956b2f7..9edbc1d2ed 100644
--- a/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c
+++ b/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c
@@ -482,7 +482,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) {
void eeprom_read_block(void *buf, const void *addr, size_t len) {
const uint8_t *p = (const uint8_t *)addr;
- uint8_t * dest = (uint8_t *)buf;
+ uint8_t *dest = (uint8_t *)buf;
while (len--) {
*dest++ = eeprom_read_byte(p++);
}
@@ -507,7 +507,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) {
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
- uint8_t * p = (uint8_t *)addr;
+ uint8_t *p = (uint8_t *)addr;
const uint8_t *src = (const uint8_t *)buf;
while (len--) {
eeprom_write_byte(p++, *src++);
@@ -538,7 +538,7 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) {
}
void eeprom_update_block(const void *buf, void *addr, size_t len) {
- uint8_t * p = (uint8_t *)addr;
+ uint8_t *p = (uint8_t *)addr;
const uint8_t *src = (const uint8_t *)buf;
while (len--) {
eeprom_write_byte(p++, *src++);
diff --git a/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c b/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c
index 9857ac046b..cf6b85fd12 100644
--- a/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c
+++ b/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c
@@ -577,7 +577,7 @@ void eeprom_driver_erase(void) {
void eeprom_read_block(void *buf, const void *addr, size_t len) {
const uint8_t *src = (const uint8_t *)addr;
- uint8_t * dest = (uint8_t *)buf;
+ uint8_t *dest = (uint8_t *)buf;
/* Check word alignment */
if (len && (uintptr_t)src % 2) {
@@ -606,7 +606,7 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) {
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
- uint8_t * dest = (uint8_t *)addr;
+ uint8_t *dest = (uint8_t *)addr;
const uint8_t *src = (const uint8_t *)buf;
/* Check word alignment */
diff --git a/platforms/chibios/drivers/flash/legacy_flash_ops.c b/platforms/chibios/drivers/flash/legacy_flash_ops.c
index fe5ad64764..ca3fbdd740 100644
--- a/platforms/chibios/drivers/flash/legacy_flash_ops.c
+++ b/platforms/chibios/drivers/flash/legacy_flash_ops.c
@@ -171,7 +171,7 @@ FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data) {
FLASH->CR |= FLASH_CR_PSIZE_0;
#endif
FLASH->CR |= FLASH_CR_PG;
- *(__IO uint16_t*)Address = Data;
+ *(__IO uint16_t *)Address = Data;
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(ProgramTimeout);
if (status != FLASH_TIMEOUT) {
diff --git a/platforms/chibios/drivers/serial_usart.c b/platforms/chibios/drivers/serial_usart.c
index becf3afbce..0d3d01042f 100644
--- a/platforms/chibios/drivers/serial_usart.c
+++ b/platforms/chibios/drivers/serial_usart.c
@@ -27,12 +27,12 @@ static QMKSerialConfig serial_config = {
# else
.baud = (SERIAL_USART_SPEED),
# endif
- .cr1 = (SERIAL_USART_CR1),
- .cr2 = (SERIAL_USART_CR2),
+ .cr1 = (SERIAL_USART_CR1),
+ .cr2 = (SERIAL_USART_CR2),
# if !defined(SERIAL_USART_FULL_DUPLEX)
- .cr3 = ((SERIAL_USART_CR3) | USART_CR3_HDSEL) /* activate half-duplex mode */
+ .cr3 = ((SERIAL_USART_CR3) | USART_CR3_HDSEL) /* activate half-duplex mode */
# else
- .cr3 = (SERIAL_USART_CR3)
+ .cr3 = (SERIAL_USART_CR3)
# endif
};
#elif defined(MCU_RP) /* Raspberry Pi MCUs */
diff --git a/platforms/chibios/drivers/uart_sio.c b/platforms/chibios/drivers/uart_sio.c
index fc12f0abed..dcf0cef20f 100644
--- a/platforms/chibios/drivers/uart_sio.c
+++ b/platforms/chibios/drivers/uart_sio.c
@@ -82,13 +82,13 @@ static SIOConfig sioConfig = {
};
#else
static SIOConfig sioConfig = {
- .baud = SIO_DEFAULT_BITRATE,
+ .baud = SIO_DEFAULT_BITRATE,
# if defined(MCU_STM32) && defined(USE_USARTV3)
.presc = USART_PRESC1,
# endif
- .cr1 = UART_CR1,
- .cr2 = UART_CR2,
- .cr3 = UART_CR3,
+ .cr1 = UART_CR1,
+ .cr2 = UART_CR2,
+ .cr3 = UART_CR3,
};
#endif
diff --git a/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c b/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c
index fec4646a5b..2328ea0674 100644
--- a/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c
+++ b/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c
@@ -20,7 +20,7 @@ static flash_sector_t first_sector = UINT16_MAX;
#endif // WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT
static flash_sector_t sector_count = UINT16_MAX;
-static BaseFlash * flash;
+static BaseFlash *flash;
static bool flash_erased_is_one;
static volatile bool is_issuing_read = false;
static volatile bool ecc_error_occurred = false;
diff --git a/platforms/chibios/drivers/ws2812_pwm.c b/platforms/chibios/drivers/ws2812_pwm.c
index 50927b849a..0fc20b3f27 100644
--- a/platforms/chibios/drivers/ws2812_pwm.c
+++ b/platforms/chibios/drivers/ws2812_pwm.c
@@ -310,7 +310,7 @@ void ws2812_init(void) {
palSetLineMode(WS2812_DI_PIN, WS2812_OUTPUT_MODE);
// PWM Configuration
- //#pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config
+ // #pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config
static const PWMConfig ws2812_pwm_config = {
.frequency = WS2812_PWM_TICK_FREQUENCY,
.period = WS2812_PWM_PERIOD, // Mit dieser Periode wird UDE-Event erzeugt und ein neuer Wert (Länge WS2812_BIT_N) vom DMA ins CCR geschrieben
@@ -328,7 +328,7 @@ void ws2812_init(void) {
.dier = TIM_DIER_UDE, // DMA on update event for next period
#endif
};
- //#pragma GCC diagnostic pop // Restore command-line warning options
+ // #pragma GCC diagnostic pop // Restore command-line warning options
// Configure DMA
// dmaInit(); // Joe added this
diff --git a/platforms/chibios/drivers/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c
index d1792b871b..4ae97aa1c9 100644
--- a/platforms/chibios/drivers/ws2812_spi.c
+++ b/platforms/chibios/drivers/ws2812_spi.c
@@ -188,8 +188,7 @@ void ws2812_init(void) {
0,
WS2812_SPI_DIVISOR
# else
- WS2812_SPI_DIVISOR_CR1_BR_X,
- 0
+ WS2812_SPI_DIVISOR_CR1_BR_X, 0
# endif
#else
// HAL_SPI_V2
diff --git a/platforms/progmem.h b/platforms/progmem.h
index 6c4ebcaa01..395aa14309 100644
--- a/platforms/progmem.h
+++ b/platforms/progmem.h
@@ -6,13 +6,13 @@
# include <string.h>
# define PROGMEM
# define PSTR(x) x
-# define PGM_P const char*
+# define PGM_P const char *
# define memcmp_P(s1, s2, n) memcmp(s1, s2, n)
# define memcpy_P(dest, src, n) memcpy(dest, src, n)
-# define pgm_read_byte(address_short) *((uint8_t*)(address_short))
-# define pgm_read_word(address_short) *((uint16_t*)(address_short))
-# define pgm_read_dword(address_short) *((uint32_t*)(address_short))
-# define pgm_read_ptr(address_short) *((void**)(address_short))
+# define pgm_read_byte(address_short) *((uint8_t *)(address_short))
+# define pgm_read_word(address_short) *((uint16_t *)(address_short))
+# define pgm_read_dword(address_short) *((uint32_t *)(address_short))
+# define pgm_read_ptr(address_short) *((void **)(address_short))
# define strcmp_P(s1, s2) strcmp(s1, s2)
# define strcpy_P(dest, src) strcpy(dest, src)
# define strlen_P(src) strlen(src)
diff --git a/platforms/synchronization_util.h b/platforms/synchronization_util.h
index 4969eff478..f4f77fd2db 100644
--- a/platforms/synchronization_util.h
+++ b/platforms/synchronization_util.h
@@ -10,8 +10,8 @@ void split_shared_memory_unlock(void);
# endif
#else
# if defined(SPLIT_KEYBOARD)
-inline void split_shared_memory_lock(void){};
-inline void split_shared_memory_unlock(void){};
+inline void split_shared_memory_lock(void) {};
+inline void split_shared_memory_unlock(void) {};
# endif
#endif
diff --git a/platforms/test/eeprom.c b/platforms/test/eeprom.c
index d501745e55..193a3bb4ce 100644
--- a/platforms/test/eeprom.c
+++ b/platforms/test/eeprom.c
@@ -40,7 +40,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) {
void eeprom_read_block(void *buf, const void *addr, size_t len) {
const uint8_t *p = (const uint8_t *)addr;
- uint8_t * dest = (uint8_t *)buf;
+ uint8_t *dest = (uint8_t *)buf;
while (len--) {
*dest++ = eeprom_read_byte(p++);
}
@@ -61,7 +61,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) {
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
- uint8_t * p = (uint8_t *)addr;
+ uint8_t *p = (uint8_t *)addr;
const uint8_t *src = (const uint8_t *)buf;
while (len--) {
eeprom_write_byte(p++, *src++);
@@ -87,7 +87,7 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) {
}
void eeprom_update_block(const void *buf, void *addr, size_t len) {
- uint8_t * p = (uint8_t *)addr;
+ uint8_t *p = (uint8_t *)addr;
const uint8_t *src = (const uint8_t *)buf;
while (len--) {
eeprom_write_byte(p++, *src++);
diff --git a/platforms/test/eeprom_legacy_emulated_flash_tests.cpp b/platforms/test/eeprom_legacy_emulated_flash_tests.cpp
index d2c41fb77d..41b27b621d 100644
--- a/platforms/test/eeprom_legacy_emulated_flash_tests.cpp
+++ b/platforms/test/eeprom_legacy_emulated_flash_tests.cpp
@@ -52,7 +52,7 @@ extern "C" {
#define BYTE_VALUE(addr, value) (((addr) << 8) | (value))
#define WORD_ZERO(addr) (0x8000 | ((addr) >> 1))
#define WORD_ONE(addr) (0xA000 | ((addr) >> 1))
-#define WORD_NEXT(addr) (0xE000 | (((addr)-0x80) >> 1))
+#define WORD_NEXT(addr) (0xE000 | (((addr) - 0x80) >> 1))
class EepromStm32Test : public testing::Test {
public:
diff --git a/platforms/test/legacy_flash_ops_mock.c b/platforms/test/legacy_flash_ops_mock.c
index b9d805cb47..355cdf2b4c 100644
--- a/platforms/test/legacy_flash_ops_mock.c
+++ b/platforms/test/legacy_flash_ops_mock.c
@@ -35,9 +35,9 @@ FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data) {
if (flash_locked) return FLASH_ERROR_WRP;
Address -= (uintptr_t)FlashBuf;
if (Address >= MOCK_FLASH_SIZE) return FLASH_BAD_ADDRESS;
- uint16_t oldData = *(uint16_t*)&FlashBuf[Address];
+ uint16_t oldData = *(uint16_t *)&FlashBuf[Address];
if (oldData == 0xFFFF || Data == 0) {
- *(uint16_t*)&FlashBuf[Address] = Data;
+ *(uint16_t *)&FlashBuf[Address] = Data;
return FLASH_COMPLETE;
} else {
return FLASH_ERROR_PG;