keyboard stuff
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[CI] Format code according to conventions (#25827)

Format code according to conventions

authored by

QMK Bot and committed by
GitHub
6ed61c65 330a8597

+305 -346
+1 -1
drivers/bluetooth/bluefruit_le.cpp
··· 364 364 } 365 365 366 366 static bool at_command(const char *cmd, char *resp, uint16_t resplen, bool verbose, uint16_t timeout) { 367 - const char * end = cmd + strlen(cmd); 367 + const char *end = cmd + strlen(cmd); 368 368 struct sdep_msg msg; 369 369 370 370 if (verbose) {
+1 -1
drivers/eeprom/eeprom_i2c.c
··· 104 104 105 105 void eeprom_write_block(const void *buf, void *addr, size_t len) { 106 106 uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + EXTERNAL_EEPROM_PAGE_SIZE]; 107 - uint8_t * read_buf = (uint8_t *)buf; 107 + uint8_t *read_buf = (uint8_t *)buf; 108 108 uintptr_t target_addr = (uintptr_t)addr; 109 109 110 110 #if defined(EXTERNAL_EEPROM_WP_PIN)
+1 -1
drivers/eeprom/eeprom_spi.c
··· 154 154 155 155 void eeprom_write_block(const void *buf, void *addr, size_t len) { 156 156 bool res; 157 - uint8_t * read_buf = (uint8_t *)buf; 157 + uint8_t *read_buf = (uint8_t *)buf; 158 158 uintptr_t target_addr = (uintptr_t)addr; 159 159 160 160 while (len > 0) {
+1 -1
drivers/encoder/encoder_quadrature.c
··· 113 113 thisCount = isLeftHand ? NUM_ENCODERS_LEFT : NUM_ENCODERS_RIGHT; 114 114 thatCount = isLeftHand ? NUM_ENCODERS_RIGHT : NUM_ENCODERS_LEFT; 115 115 #else // SPLIT_KEYBOARD 116 - thisCount = NUM_ENCODERS; 116 + thisCount = NUM_ENCODERS; 117 117 #endif 118 118 119 119 #ifdef ENCODER_TESTS
+2 -2
drivers/flash/flash_spi.c
··· 291 291 292 292 flash_status_t flash_read_range(uint32_t addr, void *buf, size_t len) { 293 293 flash_status_t response = FLASH_STATUS_SUCCESS; 294 - uint8_t * read_buf = (uint8_t *)buf; 294 + uint8_t *read_buf = (uint8_t *)buf; 295 295 296 296 /* Wait for the write-in-progress bit to be cleared. */ 297 297 response = spi_flash_wait_while_busy(); ··· 322 322 323 323 flash_status_t flash_write_range(uint32_t addr, const void *buf, size_t len) { 324 324 flash_status_t response = FLASH_STATUS_SUCCESS; 325 - uint8_t * write_buf = (uint8_t *)buf; 325 + uint8_t *write_buf = (uint8_t *)buf; 326 326 327 327 while (len > 0) { 328 328 uint32_t page_offset = addr % EXTERNAL_FLASH_PAGE_SIZE;
+1 -2
drivers/haptic/solenoid.h
··· 47 47 48 48 #ifndef SOLENOID_PINS 49 49 # ifdef SOLENOID_PIN 50 - # define SOLENOID_PINS \ 51 - { SOLENOID_PIN } 50 + # define SOLENOID_PINS {SOLENOID_PIN} 52 51 # else 53 52 # error SOLENOID_PINS array not defined 54 53 # endif
+1 -1
drivers/lcd/st7565.c
··· 70 70 // parts of the display unusable or don't get cleared correctly 71 71 // and also allows for drawing & inverting 72 72 uint8_t st7565_buffer[ST7565_MATRIX_SIZE]; 73 - uint8_t * st7565_cursor; 73 + uint8_t *st7565_cursor; 74 74 ST7565_BLOCK_TYPE st7565_dirty = 0; 75 75 bool st7565_initialized = false; 76 76 bool st7565_active = false;
+1 -2
drivers/led/snled27351-mono.c
··· 34 34 #endif 35 35 36 36 #ifndef SNLED27351_CURRENT_TUNE 37 - # define SNLED27351_CURRENT_TUNE \ 38 - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } 37 + # define SNLED27351_CURRENT_TUNE {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} 39 38 #endif 40 39 41 40 const uint8_t i2c_addresses[SNLED27351_DRIVER_COUNT] = {
+1 -2
drivers/led/snled27351.c
··· 34 34 #endif 35 35 36 36 #ifndef SNLED27351_CURRENT_TUNE 37 - # define SNLED27351_CURRENT_TUNE \ 38 - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } 37 + # define SNLED27351_CURRENT_TUNE {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} 39 38 #endif 40 39 41 40 const uint8_t i2c_addresses[SNLED27351_DRIVER_COUNT] = {
+4 -10
drivers/oled/oled_driver.c
··· 146 146 // parts of the display unusable or don't get cleared correctly 147 147 // and also allows for drawing & inverting 148 148 uint8_t oled_buffer[OLED_MATRIX_SIZE]; 149 - uint8_t * oled_cursor; 149 + uint8_t *oled_cursor; 150 150 OLED_BLOCK_TYPE oled_dirty = 0; 151 151 bool oled_initialized = false; 152 152 bool oled_active = false; ··· 301 301 oled_driver_init(); 302 302 303 303 static const uint8_t PROGMEM display_setup1[] = { 304 - I2C_CMD, 305 - DISPLAY_OFF, 306 - DISPLAY_CLOCK, 307 - OLED_DISPLAY_CLOCK, 308 - MULTIPLEX_RATIO, 304 + I2C_CMD, DISPLAY_OFF, DISPLAY_CLOCK, OLED_DISPLAY_CLOCK, MULTIPLEX_RATIO, 309 305 #if OLED_IC_COM_PINS_ARE_COLUMNS 310 306 OLED_DISPLAY_WIDTH - 1, 311 307 #else 312 308 OLED_DISPLAY_HEIGHT - 1, 313 309 #endif 314 310 #if OLED_IC == OLED_IC_SH1107 315 - SH1107_DISPLAY_START_LINE, 316 - 0x00, 311 + SH1107_DISPLAY_START_LINE, 0x00, 317 312 #else 318 313 DISPLAY_START_LINE | 0x00, 319 314 #endif 320 - CHARGE_PUMP, 321 - 0x14, 315 + CHARGE_PUMP, 0x14, 322 316 #if OLED_IC_HAS_HORIZONTAL_MODE 323 317 // MEMORY_MODE is unsupported on SH1106 (Page Addressing only) 324 318 MEMORY_MODE,
+12 -24
drivers/oled/oled_driver.h
··· 53 53 // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays 54 54 // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode 55 55 # ifndef OLED_SOURCE_MAP 56 - # define OLED_SOURCE_MAP \ 57 - { 0, 8, 16, 24, 32, 40, 48, 56 } 56 + # define OLED_SOURCE_MAP {0, 8, 16, 24, 32, 40, 48, 56} 58 57 # endif 59 58 # ifndef OLED_TARGET_MAP 60 - # define OLED_TARGET_MAP \ 61 - { 56, 48, 40, 32, 24, 16, 8, 0 } 59 + # define OLED_TARGET_MAP {56, 48, 40, 32, 24, 16, 8, 0} 62 60 # endif 63 61 // If OLED_BLOCK_TYPE is uint32_t, these tables would look like: 64 62 // #define OLED_SOURCE_MAP { 32, 40, 48, 56 } ··· 97 95 # endif 98 96 99 97 # ifndef OLED_SOURCE_MAP 100 - # define OLED_SOURCE_MAP \ 101 - { 0, 8, 16, 24 } 98 + # define OLED_SOURCE_MAP {0, 8, 16, 24} 102 99 # endif 103 100 # ifndef OLED_TARGET_MAP 104 - # define OLED_TARGET_MAP \ 105 - { 24, 16, 8, 0 } 101 + # define OLED_TARGET_MAP {24, 16, 8, 0} 106 102 # endif 107 103 108 104 #elif defined(OLED_DISPLAY_64X48) ··· 132 128 # endif 133 129 134 130 # ifndef OLED_SOURCE_MAP 135 - # define OLED_SOURCE_MAP \ 136 - { 0, 8 } 131 + # define OLED_SOURCE_MAP {0, 8} 137 132 # endif 138 133 # ifndef OLED_TARGET_MAP 139 - # define OLED_TARGET_MAP \ 140 - { 8, 0 } 134 + # define OLED_TARGET_MAP {8, 0} 141 135 # endif 142 136 143 137 #elif defined(OLED_DISPLAY_64X128) ··· 170 164 # endif 171 165 172 166 # ifndef OLED_SOURCE_MAP 173 - # define OLED_SOURCE_MAP \ 174 - { 0, 8, 16, 24, 32, 40, 48, 56 } 167 + # define OLED_SOURCE_MAP {0, 8, 16, 24, 32, 40, 48, 56} 175 168 # endif 176 169 # ifndef OLED_TARGET_MAP 177 - # define OLED_TARGET_MAP \ 178 - { 56, 48, 40, 32, 24, 16, 8, 0 } 170 + # define OLED_TARGET_MAP {56, 48, 40, 32, 24, 16, 8, 0} 179 171 # endif 180 172 181 173 #elif defined(OLED_DISPLAY_128X128) ··· 208 200 // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays 209 201 // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode 210 202 # ifndef OLED_SOURCE_MAP 211 - # define OLED_SOURCE_MAP \ 212 - { 0, 8, 16, 24, 32, 40, 48, 56 } 203 + # define OLED_SOURCE_MAP {0, 8, 16, 24, 32, 40, 48, 56} 213 204 # endif 214 205 # ifndef OLED_TARGET_MAP 215 - # define OLED_TARGET_MAP \ 216 - { 56, 48, 40, 32, 24, 16, 8, 0 } 206 + # define OLED_TARGET_MAP {56, 48, 40, 32, 24, 16, 8, 0} 217 207 # endif 218 208 #else // defined(OLED_DISPLAY_128X64) 219 209 // Default 128x32 ··· 242 232 // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays 243 233 // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode 244 234 # ifndef OLED_SOURCE_MAP 245 - # define OLED_SOURCE_MAP \ 246 - { 0, 8, 16, 24 } 235 + # define OLED_SOURCE_MAP {0, 8, 16, 24} 247 236 # endif 248 237 # ifndef OLED_TARGET_MAP 249 - # define OLED_TARGET_MAP \ 250 - { 24, 16, 8, 0 } 238 + # define OLED_TARGET_MAP {24, 16, 8, 0} 251 239 # endif 252 240 // If OLED_BLOCK_TYPE is uint8_t, these tables would look like: 253 241 // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
+1 -1
drivers/painter/comms/qp_comms_i2c.c
··· 10 10 // Helpers 11 11 12 12 static uint32_t qp_comms_i2c_send_raw(painter_device_t device, const void *data, uint32_t byte_count) { 13 - painter_driver_t * driver = (painter_driver_t *)device; 13 + painter_driver_t *driver = (painter_driver_t *)device; 14 14 qp_comms_i2c_config_t *comms_config = (qp_comms_i2c_config_t *)driver->comms_config; 15 15 i2c_status_t res = i2c_transmit(comms_config->chip_address << 1, data, byte_count, I2C_TIMEOUT); 16 16 if (res < 0) {
+7 -7
drivers/painter/comms/qp_comms_spi.c
··· 10 10 // Base SPI support 11 11 12 12 bool qp_comms_spi_init(painter_device_t device) { 13 - painter_driver_t * driver = (painter_driver_t *)device; 13 + painter_driver_t *driver = (painter_driver_t *)device; 14 14 qp_comms_spi_config_t *comms_config = (qp_comms_spi_config_t *)driver->comms_config; 15 15 16 16 // Initialize the SPI peripheral ··· 24 24 } 25 25 26 26 bool qp_comms_spi_start(painter_device_t device) { 27 - painter_driver_t * driver = (painter_driver_t *)device; 27 + painter_driver_t *driver = (painter_driver_t *)device; 28 28 qp_comms_spi_config_t *comms_config = (qp_comms_spi_config_t *)driver->comms_config; 29 29 30 30 return spi_start(comms_config->chip_select_pin, comms_config->lsb_first, comms_config->mode, comms_config->divisor); ··· 46 46 } 47 47 48 48 bool qp_comms_spi_stop(painter_device_t device) { 49 - painter_driver_t * driver = (painter_driver_t *)device; 49 + painter_driver_t *driver = (painter_driver_t *)device; 50 50 qp_comms_spi_config_t *comms_config = (qp_comms_spi_config_t *)driver->comms_config; 51 51 spi_stop(); 52 52 gpio_write_pin_high(comms_config->chip_select_pin); ··· 70 70 return false; 71 71 } 72 72 73 - painter_driver_t * driver = (painter_driver_t *)device; 73 + painter_driver_t *driver = (painter_driver_t *)device; 74 74 qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; 75 75 76 76 // Set up D/C as output low, if specified ··· 92 92 } 93 93 94 94 uint32_t qp_comms_spi_dc_reset_send_data(painter_device_t device, const void *data, uint32_t byte_count) { 95 - painter_driver_t * driver = (painter_driver_t *)device; 95 + painter_driver_t *driver = (painter_driver_t *)device; 96 96 qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; 97 97 gpio_write_pin_high(comms_config->dc_pin); 98 98 return qp_comms_spi_send_data(device, data, byte_count); 99 99 } 100 100 101 101 bool qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd) { 102 - painter_driver_t * driver = (painter_driver_t *)device; 102 + painter_driver_t *driver = (painter_driver_t *)device; 103 103 qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; 104 104 gpio_write_pin_low(comms_config->dc_pin); 105 105 spi_write(cmd); ··· 107 107 } 108 108 109 109 bool qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { 110 - painter_driver_t * driver = (painter_driver_t *)device; 110 + painter_driver_t *driver = (painter_driver_t *)device; 111 111 qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; 112 112 for (size_t i = 0; i < sequence_len;) { 113 113 uint8_t command = sequence[i];
+5 -5
drivers/painter/generic/qp_surface_common.c
··· 53 53 // Driver vtable 54 54 55 55 bool qp_surface_init(painter_device_t device, painter_rotation_t rotation) { 56 - painter_driver_t * driver = (painter_driver_t *)device; 56 + painter_driver_t *driver = (painter_driver_t *)device; 57 57 surface_painter_device_t *surface = (surface_painter_device_t *)driver; 58 58 memset(surface->buffer, 0, SURFACE_REQUIRED_BUFFER_BYTE_SIZE(driver->panel_width, driver->panel_height, driver->native_bits_per_pixel)); 59 59 ··· 78 78 } 79 79 80 80 bool qp_surface_flush(painter_device_t device) { 81 - painter_driver_t * driver = (painter_driver_t *)device; 81 + painter_driver_t *driver = (painter_driver_t *)device; 82 82 surface_painter_device_t *surface = (surface_painter_device_t *)driver; 83 83 surface->dirty.l = surface->dirty.t = UINT16_MAX; 84 84 surface->dirty.r = surface->dirty.b = 0; ··· 87 87 } 88 88 89 89 bool qp_surface_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) { 90 - painter_driver_t * driver = (painter_driver_t *)device; 90 + painter_driver_t *driver = (painter_driver_t *)device; 91 91 surface_painter_device_t *surface = (surface_painter_device_t *)driver; 92 92 93 93 // Set the viewport locations ··· 106 106 // Drawing routine to copy out the dirty region and send it to another device 107 107 108 108 bool qp_surface_draw(painter_device_t surface, painter_device_t target, uint16_t x, uint16_t y, bool entire_surface) { 109 - painter_driver_t * surface_driver = (painter_driver_t *)surface; 109 + painter_driver_t *surface_driver = (painter_driver_t *)surface; 110 110 surface_painter_device_t *surface_handle = (surface_painter_device_t *)surface_driver; 111 - painter_driver_t * target_driver = (painter_driver_t *)target; 111 + painter_driver_t *target_driver = (painter_driver_t *)target; 112 112 113 113 // If we're not dirty... we're done. 114 114 if (!surface_handle->dirty.is_dirty) {
+2 -2
drivers/painter/generic/qp_surface_internal.h
··· 42 42 43 43 // The target buffer 44 44 union { 45 - void * buffer; 46 - uint8_t * u8buffer; 45 + void *buffer; 46 + uint8_t *u8buffer; 47 47 uint16_t *u16buffer; 48 48 }; 49 49
+1 -1
drivers/painter/generic/qp_surface_mono1bpp.c
··· 55 55 56 56 // Stream pixel data to the current write position in GRAM 57 57 static bool qp_surface_pixdata_mono1bpp(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count) { 58 - painter_driver_t * driver = (painter_driver_t *)device; 58 + painter_driver_t *driver = (painter_driver_t *)device; 59 59 surface_painter_device_t *surface = (surface_painter_device_t *)driver; 60 60 stream_pixdata_mono1bpp(surface, (const uint8_t *)pixel_data, native_pixel_count); 61 61 return true;
+1 -1
drivers/painter/generic/qp_surface_rgb565.c
··· 43 43 44 44 // Stream pixel data to the current write position in GRAM 45 45 static bool qp_surface_pixdata_rgb565(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count) { 46 - painter_driver_t * driver = (painter_driver_t *)device; 46 + painter_driver_t *driver = (painter_driver_t *)device; 47 47 surface_painter_device_t *surface = (surface_painter_device_t *)driver; 48 48 stream_pixdata_rgb565(surface, (const uint16_t *)pixel_data, native_pixel_count); 49 49 return true;
+4 -4
drivers/painter/ili9xxx/qp_ili9486.c
··· 72 72 73 73 // waveshare variant needs some tweaks due to shift registers 74 74 static bool qp_comms_spi_dc_reset_send_command_odd_cs_pulse(painter_device_t device, uint8_t cmd) { 75 - painter_driver_t * driver = (painter_driver_t *)device; 75 + painter_driver_t *driver = (painter_driver_t *)device; 76 76 qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; 77 77 78 78 gpio_write_pin_low(comms_config->spi_config.chip_select_pin); ··· 83 83 } 84 84 85 85 static uint32_t qp_comms_spi_send_data_odd_cs_pulse(painter_device_t device, const void *data, uint32_t byte_count) { 86 - painter_driver_t * driver = (painter_driver_t *)device; 86 + painter_driver_t *driver = (painter_driver_t *)device; 87 87 qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; 88 88 89 89 uint32_t bytes_remaining = byte_count; ··· 113 113 } 114 114 115 115 static uint32_t qp_ili9486_send_data_toggling(painter_device_t device, const uint8_t *data, uint32_t byte_count) { 116 - painter_driver_t * driver = (painter_driver_t *)device; 116 + painter_driver_t *driver = (painter_driver_t *)device; 117 117 qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; 118 118 119 119 uint32_t ret; ··· 147 147 } 148 148 149 149 static bool qp_ili9486_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) { 150 - painter_driver_t * driver = (painter_driver_t *)device; 150 + painter_driver_t *driver = (painter_driver_t *)device; 151 151 tft_panel_dc_reset_painter_driver_vtable_t *vtable = (tft_panel_dc_reset_painter_driver_vtable_t *)driver->driver_vtable; 152 152 153 153 // Fix up the drawing location if required
+4 -4
drivers/painter/ld7032/qp_ld7032.c
··· 62 62 63 63 // Power control 64 64 bool qp_ld7032_power(painter_device_t device, bool power_on) { 65 - painter_driver_t * driver = (painter_driver_t *)device; 65 + painter_driver_t *driver = (painter_driver_t *)device; 66 66 ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)driver->comms_vtable; 67 67 68 68 comms_vtable->send_command_data(device, LD7032_DISP_ON_OFF, power_on ? 0x01 : 0x00); ··· 83 83 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 84 84 85 85 void ld7032_flush_0(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer, bool inverted) { 86 - painter_driver_t * driver = (painter_driver_t *)device; 86 + painter_driver_t *driver = (painter_driver_t *)device; 87 87 ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)driver->comms_vtable; 88 88 89 89 int x_start = dirty->l >> 3; ··· 115 115 } 116 116 117 117 void ld7032_flush_90(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer, bool inverted) { 118 - painter_driver_t * driver = (painter_driver_t *)device; 118 + painter_driver_t *driver = (painter_driver_t *)device; 119 119 ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)driver->comms_vtable; 120 120 121 121 int x_start = dirty->t >> 3; ··· 252 252 break; 253 253 } 254 254 255 - painter_driver_t * pdriver = (painter_driver_t *)device; 255 + painter_driver_t *pdriver = (painter_driver_t *)device; 256 256 ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)pdriver->comms_vtable; 257 257 258 258 if (!comms_vtable->send_command_data(device, LD7032_WRITE_DIRECTION, write_direction)) {
+5 -5
drivers/painter/oled_panel/qp_oled_panel.c
··· 12 12 13 13 // Power control 14 14 bool qp_oled_panel_power(painter_device_t device, bool power_on) { 15 - painter_driver_t * driver = (painter_driver_t *)device; 15 + painter_driver_t *driver = (painter_driver_t *)device; 16 16 oled_panel_painter_driver_vtable_t *vtable = (oled_panel_painter_driver_vtable_t *)driver->driver_vtable; 17 17 qp_comms_command(device, power_on ? vtable->opcodes.display_on : vtable->opcodes.display_off); 18 18 return true; ··· 59 59 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 60 60 61 61 void qp_oled_panel_page_column_flush_rot0(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer) { 62 - painter_driver_t * driver = (painter_driver_t *)device; 62 + painter_driver_t *driver = (painter_driver_t *)device; 63 63 oled_panel_painter_driver_vtable_t *vtable = (oled_panel_painter_driver_vtable_t *)driver->driver_vtable; 64 64 65 65 // TODO: account for offset_x/y in base driver ··· 92 92 } 93 93 94 94 void qp_oled_panel_page_column_flush_rot90(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer) { 95 - painter_driver_t * driver = (painter_driver_t *)device; 95 + painter_driver_t *driver = (painter_driver_t *)device; 96 96 oled_panel_painter_driver_vtable_t *vtable = (oled_panel_painter_driver_vtable_t *)driver->driver_vtable; 97 97 98 98 // TODO: account for offset_x/y in base driver ··· 126 126 } 127 127 128 128 void qp_oled_panel_page_column_flush_rot180(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer) { 129 - painter_driver_t * driver = (painter_driver_t *)device; 129 + painter_driver_t *driver = (painter_driver_t *)device; 130 130 oled_panel_painter_driver_vtable_t *vtable = (oled_panel_painter_driver_vtable_t *)driver->driver_vtable; 131 131 132 132 // TODO: account for offset_x/y in base driver ··· 161 161 } 162 162 163 163 void qp_oled_panel_page_column_flush_rot270(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer) { 164 - painter_driver_t * driver = (painter_driver_t *)device; 164 + painter_driver_t *driver = (painter_driver_t *)device; 165 165 oled_panel_painter_driver_vtable_t *vtable = (oled_panel_painter_driver_vtable_t *)driver->driver_vtable; 166 166 167 167 // TODO: account for offset_x/y in base driver
+2 -2
drivers/painter/tft_panel/qp_tft_panel.c
··· 12 12 13 13 // Power control 14 14 bool qp_tft_panel_power(painter_device_t device, bool power_on) { 15 - painter_driver_t * driver = (painter_driver_t *)device; 15 + painter_driver_t *driver = (painter_driver_t *)device; 16 16 tft_panel_dc_reset_painter_driver_vtable_t *vtable = (tft_panel_dc_reset_painter_driver_vtable_t *)driver->driver_vtable; 17 17 qp_comms_command(device, power_on ? vtable->opcodes.display_on : vtable->opcodes.display_off); 18 18 return true; ··· 33 33 34 34 // Viewport to draw to 35 35 bool qp_tft_panel_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) { 36 - painter_driver_t * driver = (painter_driver_t *)device; 36 + painter_driver_t *driver = (painter_driver_t *)device; 37 37 tft_panel_dc_reset_painter_driver_vtable_t *vtable = (tft_panel_dc_reset_painter_driver_vtable_t *)driver->driver_vtable; 38 38 39 39 // Fix up the drawing location if required
+1 -1
drivers/ps2/ps2_mouse.c
··· 97 97 mouse_report.x = ps2_host_recv_response(); 98 98 mouse_report.y = ps2_host_recv_response(); 99 99 # ifdef PS2_MOUSE_ENABLE_SCROLLING 100 - mouse_report.v = -(ps2_host_recv_response() & PS2_MOUSE_SCROLL_MASK); 100 + mouse_report.v = -(ps2_host_recv_response() & PS2_MOUSE_SCROLL_MASK); 101 101 # endif 102 102 } else { 103 103 if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n");
+3 -3
drivers/sensors/cirque_pinnacle.c
··· 477 477 478 478 if (touchData.valid) { 479 479 mouse_report.buttons = touchData.buttons; 480 - mouse_report.x = CONSTRAIN_HID_XY(touchData.xDelta); 481 - mouse_report.y = CONSTRAIN_HID_XY(touchData.yDelta); 482 - mouse_report.v = touchData.wheelCount; 480 + mouse_report.x = CONSTRAIN_HID_XY(touchData.xDelta); 481 + mouse_report.y = CONSTRAIN_HID_XY(touchData.yDelta); 482 + mouse_report.v = touchData.wheelCount; 483 483 } 484 484 return mouse_report; 485 485 }
+3 -6
drivers/sensors/pmw33xx_common.h
··· 72 72 # ifndef PMW33XX_CS_PIN 73 73 # ifdef POINTING_DEVICE_CS_PIN 74 74 # define PMW33XX_CS_PIN POINTING_DEVICE_CS_PIN 75 - # define PMW33XX_CS_PINS \ 76 - { PMW33XX_CS_PIN } 75 + # define PMW33XX_CS_PINS {PMW33XX_CS_PIN} 77 76 # else 78 77 # error "No chip select pin defined -- missing PMW33XX_CS_PIN or PMW33XX_CS_PINS" 79 78 # endif 80 79 # else 81 - # define PMW33XX_CS_PINS \ 82 - { PMW33XX_CS_PIN } 80 + # define PMW33XX_CS_PINS {PMW33XX_CS_PIN} 83 81 # endif 84 82 #endif 85 83 ··· 88 86 # if !defined(PMW33XX_CS_PIN_RIGHT) 89 87 # define PMW33XX_CS_PIN_RIGHT PMW33XX_CS_PIN 90 88 # endif 91 - # define PMW33XX_CS_PINS_RIGHT \ 92 - { PMW33XX_CS_PIN_RIGHT } 89 + # define PMW33XX_CS_PINS_RIGHT {PMW33XX_CS_PIN_RIGHT} 93 90 #endif 94 91 95 92 // Defines so the old variable names are swapped by the appropiate value on each half
+1 -1
platforms/avr/drivers/analog.c
··· 96 96 #if defined(MUX4) 97 97 ADMUX = aref | (mux & (_BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0))); 98 98 #else 99 - ADMUX = aref | (mux & (_BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0))); 99 + ADMUX = aref | (mux & (_BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0))); 100 100 #endif 101 101 102 102 // Start the conversion
+5 -5
platforms/avr/drivers/ws2812_bitbang.c
··· 26 26 #include "ws2812.h" 27 27 #include "pin_defs.h" 28 28 29 - #define pinmask(pin) (_BV((pin)&0xF)) 29 + #define pinmask(pin) (_BV((pin) & 0xF)) 30 30 31 31 /* 32 32 This routine writes an array of bytes with RGB values to the Dataout pin ··· 105 105 w_nop8 106 106 #endif 107 107 #if (w1_nops & 16) 108 - w_nop16 108 + w_nop16 109 109 #endif 110 110 " sbrs %1,7 \n\t" // '1' [03] '0' [02] 111 111 " out %2,%4 \n\t" // '1' [--] '0' [03] - fe-low ··· 123 123 w_nop8 124 124 #endif 125 125 #if (w2_nops & 16) 126 - w_nop16 126 + w_nop16 127 127 #endif 128 128 " out %2,%4 \n\t" // '1' [+1] '0' [+1] - fe-high 129 129 #if (w3_nops & 1) ··· 139 139 w_nop8 140 140 #endif 141 141 #if (w3_nops & 16) 142 - w_nop16 142 + w_nop16 143 143 #endif 144 144 145 145 " dec %0 \n\t" // '1' [+2] '0' [+2] ··· 173 173 } 174 174 175 175 void ws2812_flush(void) { 176 - uint8_t masklo = ~(pinmask(WS2812_DI_PIN)) & PORTx_ADDRESS(WS2812_DI_PIN); 176 + uint8_t masklo = ~(pinmask(WS2812_DI_PIN))&PORTx_ADDRESS(WS2812_DI_PIN); 177 177 uint8_t maskhi = pinmask(WS2812_DI_PIN) | PORTx_ADDRESS(WS2812_DI_PIN); 178 178 179 179 ws2812_sendarray_mask((uint8_t *)ws2812_leds, WS2812_LED_COUNT * sizeof(ws2812_led_t), masklo, maskhi);
+7 -7
platforms/avr/gpio.h
··· 24 24 25 25 /* Operation of GPIO by pin. */ 26 26 27 - #define gpio_set_pin_input(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF)) 28 - #define gpio_set_pin_input_high(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF)) 27 + #define gpio_set_pin_input(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin) & 0xF), PORTx_ADDRESS(pin) &= ~_BV((pin) & 0xF)) 28 + #define gpio_set_pin_input_high(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin) & 0xF), PORTx_ADDRESS(pin) |= _BV((pin) & 0xF)) 29 29 #define gpio_set_pin_input_low(pin) STATIC_ASSERT(0, "GPIO pulldowns in input mode are not available on AVR") 30 - #define gpio_set_pin_output_push_pull(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF)) 30 + #define gpio_set_pin_output_push_pull(pin) (DDRx_ADDRESS(pin) |= _BV((pin) & 0xF)) 31 31 #define gpio_set_pin_output_open_drain(pin) STATIC_ASSERT(0, "Open-drain outputs are not available on AVR") 32 32 #define gpio_set_pin_output(pin) gpio_set_pin_output_push_pull(pin) 33 33 34 - #define gpio_write_pin_high(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF)) 35 - #define gpio_write_pin_low(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF)) 34 + #define gpio_write_pin_high(pin) (PORTx_ADDRESS(pin) |= _BV((pin) & 0xF)) 35 + #define gpio_write_pin_low(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin) & 0xF)) 36 36 #define gpio_write_pin(pin, level) ((level) ? gpio_write_pin_high(pin) : gpio_write_pin_low(pin)) 37 37 38 - #define gpio_read_pin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF))) 38 + #define gpio_read_pin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin) & 0xF))) 39 39 40 - #define gpio_toggle_pin(pin) (PORTx_ADDRESS(pin) ^= _BV((pin)&0xF)) 40 + #define gpio_toggle_pin(pin) (PORTx_ADDRESS(pin) ^= _BV((pin) & 0xF))
+1 -1
platforms/avr/hardware_id.c
··· 13 13 __attribute__((weak)) hardware_id_t get_hardware_id(void) { 14 14 hardware_id_t id = {0}; 15 15 for (uint8_t i = 0; i < 10; i += 1) { 16 - ((uint8_t*)&id)[i] = boot_signature_byte_get(i + 0x0E); 16 + ((uint8_t *)&id)[i] = boot_signature_byte_get(i + 0x0E); 17 17 } 18 18 return id; 19 19 }
+1 -1
platforms/chibios/bootloaders/rp2040.c
··· 30 30 // Needs to be located in a RAM section that is never initialized on boot to 31 31 // preserve its value on reset 32 32 static volatile uint32_t __attribute__((section(".ram0.bootloader_magic"))) magic_location; 33 - const uint32_t magic_token = 0xCAFEB0BA; 33 + const uint32_t magic_token = 0xCAFEB0BA; 34 34 35 35 // We can not use the __early_init / enter_bootloader_mode_if_requested hook as 36 36 // we depend on an already initialized system with usable memory regions and
+1 -1
platforms/chibios/drivers/analog.c
··· 145 145 .smpr = ADC_SAMPLING_RATE, 146 146 #elif defined(USE_ADCV2) 147 147 # if !defined(STM32F1XX) && !defined(GD32VF103) && !defined(WB32F3G71xx) && !defined(WB32FQ95xx) && !defined(AT32F415) 148 - .cr2 = ADC_CR2_SWSTART, // F103 seem very unhappy with, F401 seems very unhappy without... 148 + .cr2 = ADC_CR2_SWSTART, // F103 seem very unhappy with, F401 seems very unhappy without... 149 149 # endif 150 150 # if defined(AT32F415) 151 151 .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),
+3 -3
platforms/chibios/drivers/audio_dac_basic.c
··· 77 77 78 78 static void gpt_audio_state_cb(GPTDriver *gptp); 79 79 GPTConfig gptStateUpdateCfg = {.frequency = 10, 80 - .callback = gpt_audio_state_cb, 81 - .cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */ 82 - .dier = 0U}; 80 + .callback = gpt_audio_state_cb, 81 + .cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */ 82 + .dier = 0U}; 83 83 84 84 static const DACConfig dac_conf_ch1 = {.init = AUDIO_DAC_OFF_VALUE, .datamode = DAC_DHRM_12BIT_RIGHT}; 85 85 static const DACConfig dac_conf_ch2 = {.init = AUDIO_DAC_OFF_VALUE, .datamode = DAC_DHRM_12BIT_RIGHT};
+4 -4
platforms/chibios/drivers/audio_pwm_software.c
··· 63 63 pwmChangePeriod(&AUDIO_PWM_DRIVER, period); 64 64 65 65 pwmEnableChannel(&AUDIO_PWM_DRIVER, AUDIO_PWM_CHANNEL - 1, 66 - // adjust the duty-cycle so that the output is for 'note_timbre' duration HIGH 67 - PWM_PERCENTAGE_TO_WIDTH(&AUDIO_PWM_DRIVER, (100 - note_timbre) * 100)); 66 + // adjust the duty-cycle so that the output is for 'note_timbre' duration HIGH 67 + PWM_PERCENTAGE_TO_WIDTH(&AUDIO_PWM_DRIVER, (100 - note_timbre) * 100)); 68 68 } 69 69 70 70 float channel_1_get_frequency(void) { ··· 117 117 and the .interval counts from 64 downwards - audio_update_state is 118 118 called just often enough to not miss anything 119 119 */ 120 - .frequency = 60 * 64, 121 - .callback = gpt_callback, 120 + .frequency = 60 * 64, 121 + .callback = gpt_callback, 122 122 }; 123 123 124 124 void audio_driver_initialize_impl(void) {
+3 -3
platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c
··· 482 482 483 483 void eeprom_read_block(void *buf, const void *addr, size_t len) { 484 484 const uint8_t *p = (const uint8_t *)addr; 485 - uint8_t * dest = (uint8_t *)buf; 485 + uint8_t *dest = (uint8_t *)buf; 486 486 while (len--) { 487 487 *dest++ = eeprom_read_byte(p++); 488 488 } ··· 507 507 } 508 508 509 509 void eeprom_write_block(const void *buf, void *addr, size_t len) { 510 - uint8_t * p = (uint8_t *)addr; 510 + uint8_t *p = (uint8_t *)addr; 511 511 const uint8_t *src = (const uint8_t *)buf; 512 512 while (len--) { 513 513 eeprom_write_byte(p++, *src++); ··· 538 538 } 539 539 540 540 void eeprom_update_block(const void *buf, void *addr, size_t len) { 541 - uint8_t * p = (uint8_t *)addr; 541 + uint8_t *p = (uint8_t *)addr; 542 542 const uint8_t *src = (const uint8_t *)buf; 543 543 while (len--) { 544 544 eeprom_write_byte(p++, *src++);
+2 -2
platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c
··· 577 577 578 578 void eeprom_read_block(void *buf, const void *addr, size_t len) { 579 579 const uint8_t *src = (const uint8_t *)addr; 580 - uint8_t * dest = (uint8_t *)buf; 580 + uint8_t *dest = (uint8_t *)buf; 581 581 582 582 /* Check word alignment */ 583 583 if (len && (uintptr_t)src % 2) { ··· 606 606 } 607 607 608 608 void eeprom_write_block(const void *buf, void *addr, size_t len) { 609 - uint8_t * dest = (uint8_t *)addr; 609 + uint8_t *dest = (uint8_t *)addr; 610 610 const uint8_t *src = (const uint8_t *)buf; 611 611 612 612 /* Check word alignment */
+1 -1
platforms/chibios/drivers/flash/legacy_flash_ops.c
··· 171 171 FLASH->CR |= FLASH_CR_PSIZE_0; 172 172 #endif 173 173 FLASH->CR |= FLASH_CR_PG; 174 - *(__IO uint16_t*)Address = Data; 174 + *(__IO uint16_t *)Address = Data; 175 175 /* Wait for last operation to be completed */ 176 176 status = FLASH_WaitForLastOperation(ProgramTimeout); 177 177 if (status != FLASH_TIMEOUT) {
+4 -4
platforms/chibios/drivers/serial_usart.c
··· 27 27 # else 28 28 .baud = (SERIAL_USART_SPEED), 29 29 # endif 30 - .cr1 = (SERIAL_USART_CR1), 31 - .cr2 = (SERIAL_USART_CR2), 30 + .cr1 = (SERIAL_USART_CR1), 31 + .cr2 = (SERIAL_USART_CR2), 32 32 # if !defined(SERIAL_USART_FULL_DUPLEX) 33 - .cr3 = ((SERIAL_USART_CR3) | USART_CR3_HDSEL) /* activate half-duplex mode */ 33 + .cr3 = ((SERIAL_USART_CR3) | USART_CR3_HDSEL) /* activate half-duplex mode */ 34 34 # else 35 - .cr3 = (SERIAL_USART_CR3) 35 + .cr3 = (SERIAL_USART_CR3) 36 36 # endif 37 37 }; 38 38 #elif defined(MCU_RP) /* Raspberry Pi MCUs */
+4 -4
platforms/chibios/drivers/uart_sio.c
··· 82 82 }; 83 83 #else 84 84 static SIOConfig sioConfig = { 85 - .baud = SIO_DEFAULT_BITRATE, 85 + .baud = SIO_DEFAULT_BITRATE, 86 86 # if defined(MCU_STM32) && defined(USE_USARTV3) 87 87 .presc = USART_PRESC1, 88 88 # endif 89 - .cr1 = UART_CR1, 90 - .cr2 = UART_CR2, 91 - .cr3 = UART_CR3, 89 + .cr1 = UART_CR1, 90 + .cr2 = UART_CR2, 91 + .cr3 = UART_CR3, 92 92 }; 93 93 #endif 94 94
+1 -1
platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c
··· 20 20 #endif // WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT 21 21 22 22 static flash_sector_t sector_count = UINT16_MAX; 23 - static BaseFlash * flash; 23 + static BaseFlash *flash; 24 24 static bool flash_erased_is_one; 25 25 static volatile bool is_issuing_read = false; 26 26 static volatile bool ecc_error_occurred = false;
+2 -2
platforms/chibios/drivers/ws2812_pwm.c
··· 310 310 palSetLineMode(WS2812_DI_PIN, WS2812_OUTPUT_MODE); 311 311 312 312 // PWM Configuration 313 - //#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 313 + // #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 314 314 static const PWMConfig ws2812_pwm_config = { 315 315 .frequency = WS2812_PWM_TICK_FREQUENCY, 316 316 .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 328 .dier = TIM_DIER_UDE, // DMA on update event for next period 329 329 #endif 330 330 }; 331 - //#pragma GCC diagnostic pop // Restore command-line warning options 331 + // #pragma GCC diagnostic pop // Restore command-line warning options 332 332 333 333 // Configure DMA 334 334 // dmaInit(); // Joe added this
+1 -2
platforms/chibios/drivers/ws2812_spi.c
··· 188 188 0, 189 189 WS2812_SPI_DIVISOR 190 190 # else 191 - WS2812_SPI_DIVISOR_CR1_BR_X, 192 - 0 191 + WS2812_SPI_DIVISOR_CR1_BR_X, 0 193 192 # endif 194 193 #else 195 194 // HAL_SPI_V2
+5 -5
platforms/progmem.h
··· 6 6 # include <string.h> 7 7 # define PROGMEM 8 8 # define PSTR(x) x 9 - # define PGM_P const char* 9 + # define PGM_P const char * 10 10 # define memcmp_P(s1, s2, n) memcmp(s1, s2, n) 11 11 # define memcpy_P(dest, src, n) memcpy(dest, src, n) 12 - # define pgm_read_byte(address_short) *((uint8_t*)(address_short)) 13 - # define pgm_read_word(address_short) *((uint16_t*)(address_short)) 14 - # define pgm_read_dword(address_short) *((uint32_t*)(address_short)) 15 - # define pgm_read_ptr(address_short) *((void**)(address_short)) 12 + # define pgm_read_byte(address_short) *((uint8_t *)(address_short)) 13 + # define pgm_read_word(address_short) *((uint16_t *)(address_short)) 14 + # define pgm_read_dword(address_short) *((uint32_t *)(address_short)) 15 + # define pgm_read_ptr(address_short) *((void **)(address_short)) 16 16 # define strcmp_P(s1, s2) strcmp(s1, s2) 17 17 # define strcpy_P(dest, src) strcpy(dest, src) 18 18 # define strlen_P(src) strlen(src)
+2 -2
platforms/synchronization_util.h
··· 10 10 # endif 11 11 #else 12 12 # if defined(SPLIT_KEYBOARD) 13 - inline void split_shared_memory_lock(void){}; 14 - inline void split_shared_memory_unlock(void){}; 13 + inline void split_shared_memory_lock(void) {}; 14 + inline void split_shared_memory_unlock(void) {}; 15 15 # endif 16 16 #endif 17 17
+3 -3
platforms/test/eeprom.c
··· 40 40 41 41 void eeprom_read_block(void *buf, const void *addr, size_t len) { 42 42 const uint8_t *p = (const uint8_t *)addr; 43 - uint8_t * dest = (uint8_t *)buf; 43 + uint8_t *dest = (uint8_t *)buf; 44 44 while (len--) { 45 45 *dest++ = eeprom_read_byte(p++); 46 46 } ··· 61 61 } 62 62 63 63 void eeprom_write_block(const void *buf, void *addr, size_t len) { 64 - uint8_t * p = (uint8_t *)addr; 64 + uint8_t *p = (uint8_t *)addr; 65 65 const uint8_t *src = (const uint8_t *)buf; 66 66 while (len--) { 67 67 eeprom_write_byte(p++, *src++); ··· 87 87 } 88 88 89 89 void eeprom_update_block(const void *buf, void *addr, size_t len) { 90 - uint8_t * p = (uint8_t *)addr; 90 + uint8_t *p = (uint8_t *)addr; 91 91 const uint8_t *src = (const uint8_t *)buf; 92 92 while (len--) { 93 93 eeprom_write_byte(p++, *src++);
+1 -1
platforms/test/eeprom_legacy_emulated_flash_tests.cpp
··· 52 52 #define BYTE_VALUE(addr, value) (((addr) << 8) | (value)) 53 53 #define WORD_ZERO(addr) (0x8000 | ((addr) >> 1)) 54 54 #define WORD_ONE(addr) (0xA000 | ((addr) >> 1)) 55 - #define WORD_NEXT(addr) (0xE000 | (((addr)-0x80) >> 1)) 55 + #define WORD_NEXT(addr) (0xE000 | (((addr) - 0x80) >> 1)) 56 56 57 57 class EepromStm32Test : public testing::Test { 58 58 public:
+2 -2
platforms/test/legacy_flash_ops_mock.c
··· 35 35 if (flash_locked) return FLASH_ERROR_WRP; 36 36 Address -= (uintptr_t)FlashBuf; 37 37 if (Address >= MOCK_FLASH_SIZE) return FLASH_BAD_ADDRESS; 38 - uint16_t oldData = *(uint16_t*)&FlashBuf[Address]; 38 + uint16_t oldData = *(uint16_t *)&FlashBuf[Address]; 39 39 if (oldData == 0xFFFF || Data == 0) { 40 - *(uint16_t*)&FlashBuf[Address] = Data; 40 + *(uint16_t *)&FlashBuf[Address] = Data; 41 41 return FLASH_COMPLETE; 42 42 } else { 43 43 return FLASH_ERROR_PG;
+6 -6
quantum/action_code.h
··· 167 167 MODS_TAP_TOGGLE = 0x01, 168 168 }; 169 169 #define ACTION_KEY(key) ACTION(ACT_MODS, (key)) 170 - #define ACTION_MODS(mods) ACTION(ACT_MODS, ((mods)&0x1f) << 8 | 0) 171 - #define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, ((mods)&0x1f) << 8 | (key)) 172 - #define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, ((mods)&0x1f) << 8 | (key)) 173 - #define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f) << 8 | MODS_ONESHOT) 174 - #define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f) << 8 | MODS_TAP_TOGGLE) 170 + #define ACTION_MODS(mods) ACTION(ACT_MODS, ((mods) & 0x1f) << 8 | 0) 171 + #define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, ((mods) & 0x1f) << 8 | (key)) 172 + #define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, ((mods) & 0x1f) << 8 | (key)) 173 + #define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, ((mods) & 0x1f) << 8 | MODS_ONESHOT) 174 + #define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, ((mods) & 0x1f) << 8 | MODS_TAP_TOGGLE) 175 175 176 176 /** \brief Other Keys 177 177 */ ··· 210 210 OP_SET_CLEAR, 211 211 OP_ONESHOT, 212 212 }; 213 - #define ACTION_LAYER_BITOP(op, part, bits, on) ACTION(ACT_LAYER, (op) << 10 | (on) << 8 | (part) << 5 | ((bits)&0x1f)) 213 + #define ACTION_LAYER_BITOP(op, part, bits, on) ACTION(ACT_LAYER, (op) << 10 | (on) << 8 | (part) << 5 | ((bits) & 0x1f)) 214 214 #define ACTION_LAYER_TAP(layer, key) ACTION(ACT_LAYER_TAP, (layer) << 8 | (key)) 215 215 /* Default Layer */ 216 216 #define ACTION_DEFAULT_LAYER_SET(layer) ACTION_DEFAULT_LAYER_BIT_SET((layer) / 4, 1 << ((layer) % 4))
+17 -17
quantum/action_tapping.c
··· 444 444 && !(MAYBE_RETRO_SHIFTING(event, keyp) && get_auto_shifted_key(get_record_keycode(keyp, false), keyp)) 445 445 # endif 446 446 ) { 447 - // Settle the tapping key as *held*, since 448 - // HOLD_ON_OTHER_KEY_PRESS is enabled for this key. 449 - ac_dprintf("Tapping: End. No tap. Interfered by pressed key\n"); 450 - process_record(&tapping_key); 447 + // Settle the tapping key as *held*, since 448 + // HOLD_ON_OTHER_KEY_PRESS is enabled for this key. 449 + ac_dprintf("Tapping: End. No tap. Interfered by pressed key\n"); 450 + process_record(&tapping_key); 451 451 452 452 # if defined(CHORDAL_HOLD) 453 - if (waiting_buffer_tail != waiting_buffer_head && is_tap_record(&waiting_buffer[waiting_buffer_tail])) { 454 - tapping_key = waiting_buffer[waiting_buffer_tail]; 455 - // Pop tail from the queue. 456 - waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE; 457 - debug_waiting_buffer(); 458 - } else 453 + if (waiting_buffer_tail != waiting_buffer_head && is_tap_record(&waiting_buffer[waiting_buffer_tail])) { 454 + tapping_key = waiting_buffer[waiting_buffer_tail]; 455 + // Pop tail from the queue. 456 + waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE; 457 + debug_waiting_buffer(); 458 + } else 459 459 # endif // CHORDAL_HOLD 460 - { 461 - tapping_key = (keyrecord_t){0}; 462 - } 463 - debug_tapping_key(); 460 + { 461 + tapping_key = (keyrecord_t){0}; 462 + } 463 + debug_tapping_key(); 464 464 465 465 # if defined(CHORDAL_HOLD) 466 - waiting_buffer_process_regular(); 466 + waiting_buffer_process_regular(); 467 467 # endif // CHORDAL_HOLD 468 - } 468 + } 469 469 } 470 470 // enqueue 471 471 return false; ··· 775 775 uint16_t prev_keycode = get_record_keycode(&tapping_key, false); 776 776 uint8_t first_tap = WAITING_BUFFER_SIZE; 777 777 for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { 778 - keyrecord_t * cur = &waiting_buffer[i]; 778 + keyrecord_t *cur = &waiting_buffer[i]; 779 779 const uint16_t cur_keycode = get_record_keycode(cur, false); 780 780 if (!cur->event.pressed || !is_mt_or_lt(prev_keycode)) { 781 781 break;
+1 -2
quantum/action_util.h
··· 114 114 void neutralize_flashing_modifiers(uint8_t active_mods); 115 115 #endif 116 116 #ifndef MODS_TO_NEUTRALIZE 117 - # define MODS_TO_NEUTRALIZE \ 118 - { MOD_BIT(KC_LEFT_ALT), MOD_BIT(KC_LEFT_GUI) } 117 + # define MODS_TO_NEUTRALIZE {MOD_BIT(KC_LEFT_ALT), MOD_BIT(KC_LEFT_GUI)} 119 118 #endif 120 119 121 120 #ifdef __cplusplus
+2 -4
quantum/audio/musical_notes.h
··· 21 21 // in beats-per-minute 22 22 #endif 23 23 24 - #define SONG(notes...) \ 25 - { notes } 24 + #define SONG(notes...) {notes} 26 25 27 26 // Note Types 28 - #define MUSICAL_NOTE(note, duration) \ 29 - { (NOTE##note), duration } 27 + #define MUSICAL_NOTE(note, duration) {(NOTE##note), duration} 30 28 31 29 #define BREVE_NOTE(note) MUSICAL_NOTE(note, 128) 32 30 #define WHOLE_NOTE(note) MUSICAL_NOTE(note, 64)
+3 -1
quantum/backlight/backlight_driver_common.c
··· 16 16 # define FOR_EACH_LED(x) \ 17 17 for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ 18 18 pin_t backlight_pin = backlight_pins[i]; \ 19 - { x } \ 19 + { \ 20 + x \ 21 + } \ 20 22 } 21 23 #else 22 24 // we support only one backlight pin
+1 -1
quantum/command.c
··· 629 629 bool mousekey_console(uint8_t code) { 630 630 static uint8_t param = 0; 631 631 static uint8_t *pp = NULL; 632 - static char * desc = NULL; 632 + static char *desc = NULL; 633 633 634 634 # if defined(NO_PRINT) || defined(USER_PRINT) /* -Wunused-parameter */ 635 635 (void)desc;
+1 -1
quantum/deferred_exec.h
··· 78 78 deferred_token token; 79 79 uint32_t trigger_time; 80 80 deferred_exec_callback callback; 81 - void * cb_arg; 81 + void *cb_arg; 82 82 } deferred_executor_t; 83 83 84 84 /**
+1 -2
quantum/dip_switch.h
··· 49 49 50 50 #ifdef DIP_SWITCH_MAP_ENABLE 51 51 # define NUM_DIP_STATES 2 52 - # define DIP_SWITCH_OFF_ON(off, on) \ 53 - { (off), (on) } 52 + # define DIP_SWITCH_OFF_ON(off, on) {(off), (on)} 54 53 extern const uint16_t dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES]; 55 54 #endif // DIP_SWITCH_MAP_ENABLE
+1 -2
quantum/encoder.h
··· 111 111 112 112 # ifdef ENCODER_MAP_ENABLE 113 113 # define NUM_DIRECTIONS 2 114 - # define ENCODER_CCW_CW(ccw, cw) \ 115 - { (cw), (ccw) } 114 + # define ENCODER_CCW_CW(ccw, cw) {(cw), (ccw)} 116 115 extern const uint16_t encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS]; 117 116 # endif // ENCODER_MAP_ENABLE 118 117
+2 -4
quantum/encoder/tests/config_mock.h
··· 7 7 #define MATRIX_COLS 1 8 8 9 9 /* Here, "pins" from 0 to 31 are allowed. */ 10 - #define ENCODER_A_PINS \ 11 - { 0 } 12 - #define ENCODER_B_PINS \ 13 - { 1 } 10 + #define ENCODER_A_PINS {0} 11 + #define ENCODER_B_PINS {1} 14 12 15 13 #ifdef __cplusplus 16 14 extern "C" {
+4 -8
quantum/encoder/tests/config_mock_split_left_eq_right.h
··· 7 7 #define MATRIX_COLS 1 8 8 9 9 /* Here, "pins" from 0 to 31 are allowed. */ 10 - #define ENCODER_A_PINS \ 11 - { 0, 2 } 12 - #define ENCODER_B_PINS \ 13 - { 1, 3 } 14 - #define ENCODER_A_PINS_RIGHT \ 15 - { 4, 6 } 16 - #define ENCODER_B_PINS_RIGHT \ 17 - { 5, 7 } 10 + #define ENCODER_A_PINS {0, 2} 11 + #define ENCODER_B_PINS {1, 3} 12 + #define ENCODER_A_PINS_RIGHT {4, 6} 13 + #define ENCODER_B_PINS_RIGHT {5, 7} 18 14 19 15 #ifdef __cplusplus 20 16 extern "C" {
+4 -8
quantum/encoder/tests/config_mock_split_left_gt_right.h
··· 7 7 #define MATRIX_COLS 1 8 8 9 9 /* Here, "pins" from 0 to 31 are allowed. */ 10 - #define ENCODER_A_PINS \ 11 - { 0, 2, 4 } 12 - #define ENCODER_B_PINS \ 13 - { 1, 3, 5 } 14 - #define ENCODER_A_PINS_RIGHT \ 15 - { 6, 8 } 16 - #define ENCODER_B_PINS_RIGHT \ 17 - { 7, 9 } 10 + #define ENCODER_A_PINS {0, 2, 4} 11 + #define ENCODER_B_PINS {1, 3, 5} 12 + #define ENCODER_A_PINS_RIGHT {6, 8} 13 + #define ENCODER_B_PINS_RIGHT {7, 9} 18 14 19 15 #ifdef __cplusplus 20 16 extern "C" {
+4 -8
quantum/encoder/tests/config_mock_split_left_lt_right.h
··· 7 7 #define MATRIX_COLS 1 8 8 9 9 /* Here, "pins" from 0 to 31 are allowed. */ 10 - #define ENCODER_A_PINS \ 11 - { 0, 2 } 12 - #define ENCODER_B_PINS \ 13 - { 1, 3 } 14 - #define ENCODER_A_PINS_RIGHT \ 15 - { 4, 6, 8 } 16 - #define ENCODER_B_PINS_RIGHT \ 17 - { 5, 7, 9 } 10 + #define ENCODER_A_PINS {0, 2} 11 + #define ENCODER_B_PINS {1, 3} 12 + #define ENCODER_A_PINS_RIGHT {4, 6, 8} 13 + #define ENCODER_B_PINS_RIGHT {5, 7, 9} 18 14 19 15 #ifdef __cplusplus 20 16 extern "C" {
+6 -6
quantum/encoder/tests/config_mock_split_no_left.h
··· 8 8 9 9 /* Here, "pins" from 0 to 31 are allowed. */ 10 10 #define ENCODER_A_PINS \ 11 - {} 11 + { \ 12 + } 12 13 #define ENCODER_B_PINS \ 13 - {} 14 - #define ENCODER_A_PINS_RIGHT \ 15 - { 0, 2 } 16 - #define ENCODER_B_PINS_RIGHT \ 17 - { 1, 3 } 14 + { \ 15 + } 16 + #define ENCODER_A_PINS_RIGHT {0, 2} 17 + #define ENCODER_B_PINS_RIGHT {1, 3} 18 18 19 19 #ifdef __cplusplus 20 20 extern "C" {
+6 -6
quantum/encoder/tests/config_mock_split_no_right.h
··· 7 7 #define MATRIX_COLS 1 8 8 9 9 /* Here, "pins" from 0 to 31 are allowed. */ 10 - #define ENCODER_A_PINS \ 11 - { 0, 2 } 12 - #define ENCODER_B_PINS \ 13 - { 1, 3 } 10 + #define ENCODER_A_PINS {0, 2} 11 + #define ENCODER_B_PINS {1, 3} 14 12 #define ENCODER_A_PINS_RIGHT \ 15 - {} 13 + { \ 14 + } 16 15 #define ENCODER_B_PINS_RIGHT \ 17 - {} 16 + { \ 17 + } 18 18 19 19 #ifdef __cplusplus 20 20 extern "C" {
+4 -8
quantum/encoder/tests/config_mock_split_role.h
··· 7 7 #define MATRIX_COLS 1 8 8 9 9 /* Here, "pins" from 0 to 31 are allowed. */ 10 - #define ENCODER_A_PINS \ 11 - { 0, 2 } 12 - #define ENCODER_B_PINS \ 13 - { 1, 3 } 14 - #define ENCODER_A_PINS_RIGHT \ 15 - { 4, 6 } 16 - #define ENCODER_B_PINS_RIGHT \ 17 - { 5, 7 } 10 + #define ENCODER_A_PINS {0, 2} 11 + #define ENCODER_B_PINS {1, 3} 12 + #define ENCODER_A_PINS_RIGHT {4, 6} 13 + #define ENCODER_B_PINS_RIGHT {5, 7} 18 14 19 15 #ifdef __cplusplus 20 16 extern "C" {
+2 -4
quantum/joystick.h
··· 64 64 65 65 // configure on input_pin of the joystick_axes array entry to NO_PIN 66 66 // to prevent it from being read from the ADC. This allows outputting forged axis value. 67 - #define JOYSTICK_AXIS_VIRTUAL \ 68 - { NO_PIN, 0, JOYSTICK_MAX_VALUE / 2, JOYSTICK_MAX_VALUE } 69 - #define JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH) \ 70 - { INPUT_PIN, LOW, REST, HIGH } 67 + #define JOYSTICK_AXIS_VIRTUAL {NO_PIN, 0, JOYSTICK_MAX_VALUE / 2, JOYSTICK_MAX_VALUE} 68 + #define JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH) {INPUT_PIN, LOW, REST, HIGH} 71 69 72 70 typedef struct { 73 71 pin_t input_pin;
+1 -1
quantum/keycode.h
··· 34 34 #define IS_MOUSEKEY_WHEEL(code) (QK_MOUSE_WHEEL_UP <= (code) && (code) <= QK_MOUSE_WHEEL_RIGHT) 35 35 #define IS_MOUSEKEY_ACCEL(code) (QK_MOUSE_ACCELERATION_0 <= (code) && (code) <= QK_MOUSE_ACCELERATION_2) 36 36 37 - #define MOD_BIT(code) (1 << ((code)&0x07)) 37 + #define MOD_BIT(code) (1 << ((code) & 0x07)) 38 38 39 39 // clang-format off 40 40
+1 -1
quantum/matrix.c
··· 54 54 static SPLIT_MUTABLE_ROW pin_t row_pins[MATRIX_ROWS_PER_HAND] = MATRIX_ROW_PINS; 55 55 # endif // MATRIX_ROW_PINS 56 56 # ifdef MATRIX_COL_PINS 57 - static SPLIT_MUTABLE_COL pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; 57 + static SPLIT_MUTABLE_COL pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; 58 58 # endif // MATRIX_COL_PINS 59 59 #endif 60 60
+1 -1
quantum/mousekey.c
··· 501 501 502 502 enum { mkspd_unmod, mkspd_0, mkspd_1, mkspd_2, mkspd_COUNT }; 503 503 # ifndef MK_MOMENTARY_ACCEL 504 - static uint8_t mk_speed = mkspd_1; 504 + static uint8_t mk_speed = mkspd_1; 505 505 # else 506 506 static uint8_t mk_speed = mkspd_unmod; 507 507 static uint8_t mkspd_DEFAULT = mkspd_unmod;
+6 -6
quantum/nvm/eeprom/nvm_dynamic_keymap.c
··· 124 124 125 125 void nvm_dynamic_keymap_read_buffer(uint32_t offset, uint32_t size, uint8_t *data) { 126 126 uint32_t dynamic_keymap_eeprom_size = DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2; 127 - void * source = (void *)(uintptr_t)(DYNAMIC_KEYMAP_EEPROM_ADDR + offset); 127 + void *source = (void *)(uintptr_t)(DYNAMIC_KEYMAP_EEPROM_ADDR + offset); 128 128 uint8_t *target = data; 129 129 for (uint32_t i = 0; i < size; i++) { 130 130 if (offset + i < dynamic_keymap_eeprom_size) { ··· 139 139 140 140 void nvm_dynamic_keymap_update_buffer(uint32_t offset, uint32_t size, uint8_t *data) { 141 141 uint32_t dynamic_keymap_eeprom_size = DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2; 142 - void * target = (void *)(uintptr_t)(DYNAMIC_KEYMAP_EEPROM_ADDR + offset); 142 + void *target = (void *)(uintptr_t)(DYNAMIC_KEYMAP_EEPROM_ADDR + offset); 143 143 uint8_t *source = data; 144 144 for (uint32_t i = 0; i < size; i++) { 145 145 if (offset + i < dynamic_keymap_eeprom_size) { ··· 155 155 } 156 156 157 157 void nvm_dynamic_keymap_macro_read_buffer(uint32_t offset, uint32_t size, uint8_t *data) { 158 - void * source = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + offset); 158 + void *source = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + offset); 159 159 uint8_t *target = data; 160 160 for (uint16_t i = 0; i < size; i++) { 161 161 if (offset + i < DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE) { ··· 169 169 } 170 170 171 171 void nvm_dynamic_keymap_macro_update_buffer(uint32_t offset, uint32_t size, uint8_t *data) { 172 - void * target = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + offset); 172 + void *target = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + offset); 173 173 uint8_t *source = data; 174 174 for (uint16_t i = 0; i < size; i++) { 175 175 if (offset + i < DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE) { ··· 181 181 } 182 182 183 183 void nvm_dynamic_keymap_macro_reset(void) { 184 - void * start = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); 185 - void * end = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE); 184 + void *start = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); 185 + void *end = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE); 186 186 long remaining = end - start; 187 187 uint8_t dummy[16] = {0}; 188 188 for (int i = 0; i < DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE; i += sizeof(dummy)) {
+4 -4
quantum/nvm/eeprom/nvm_eeconfig.c
··· 246 246 void nvm_eeconfig_init_kb_datablock(void) { 247 247 eeprom_update_dword(EECONFIG_KEYBOARD, (EECONFIG_KB_DATA_VERSION)); 248 248 249 - void * start = (void *)(uintptr_t)(EECONFIG_KB_DATABLOCK); 250 - void * end = (void *)(uintptr_t)(EECONFIG_KB_DATABLOCK + EECONFIG_KB_DATA_SIZE); 249 + void *start = (void *)(uintptr_t)(EECONFIG_KB_DATABLOCK); 250 + void *end = (void *)(uintptr_t)(EECONFIG_KB_DATABLOCK + EECONFIG_KB_DATA_SIZE); 251 251 long remaining = end - start; 252 252 uint8_t dummy[16] = {0}; 253 253 for (int i = 0; i < EECONFIG_KB_DATA_SIZE; i += sizeof(dummy)) { ··· 290 290 void nvm_eeconfig_init_user_datablock(void) { 291 291 eeprom_update_dword(EECONFIG_USER, (EECONFIG_USER_DATA_VERSION)); 292 292 293 - void * start = (void *)(uintptr_t)(EECONFIG_USER_DATABLOCK); 294 - void * end = (void *)(uintptr_t)(EECONFIG_USER_DATABLOCK + EECONFIG_USER_DATA_SIZE); 293 + void *start = (void *)(uintptr_t)(EECONFIG_USER_DATABLOCK); 294 + void *end = (void *)(uintptr_t)(EECONFIG_USER_DATABLOCK + EECONFIG_USER_DATA_SIZE); 295 295 long remaining = end - start; 296 296 uint8_t dummy[16] = {0}; 297 297 for (int i = 0; i < EECONFIG_USER_DATA_SIZE; i += sizeof(dummy)) {
+3 -3
quantum/painter/lvgl/qp_lvgl.c
··· 17 17 static lvgl_state_t lvgl_states[2] = {0}; // For lv_tick_inc and lv_task_handler 18 18 19 19 painter_device_t selected_display = NULL; 20 - void * color_buffer = NULL; 20 + void *color_buffer = NULL; 21 21 22 22 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 23 23 // Quantum Painter LVGL Integration Internal: qp_lvgl_flush ··· 33 33 } 34 34 35 35 static uint32_t tick_task_callback(uint32_t trigger_time, void *cb_arg) { 36 - lvgl_state_t * state = (lvgl_state_t *)cb_arg; 36 + lvgl_state_t *state = (lvgl_state_t *)cb_arg; 37 37 static uint32_t last_tick = 0; 38 38 switch (state->fnc_id) { 39 39 case 0: { ··· 97 97 static lv_disp_draw_buf_t draw_buf; 98 98 // Allocate a buffer for 1/10 screen size 99 99 const size_t count_required = driver->panel_width * driver->panel_height / 10; 100 - void * new_color_buffer = realloc(color_buffer, sizeof(lv_color_t) * count_required); 100 + void *new_color_buffer = realloc(color_buffer, sizeof(lv_color_t) * count_required); 101 101 if (!new_color_buffer) { 102 102 qp_dprintf("qp_lvgl_attach: fail (could not set up memory buffer)\n"); 103 103 qp_lvgl_detach();
+2 -2
quantum/painter/qp_comms.c
··· 50 50 // Comms APIs that use a D/C pin 51 51 52 52 bool qp_comms_command(painter_device_t device, uint8_t cmd) { 53 - painter_driver_t * driver = (painter_driver_t *)device; 53 + painter_driver_t *driver = (painter_driver_t *)device; 54 54 painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable; 55 55 return comms_vtable->send_command(device, cmd); 56 56 } ··· 66 66 } 67 67 68 68 bool qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { 69 - painter_driver_t * driver = (painter_driver_t *)device; 69 + painter_driver_t *driver = (painter_driver_t *)device; 70 70 painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable; 71 71 return comms_vtable->bulk_command_sequence(device, sequence, sequence_len); 72 72 }
+2 -2
quantum/painter/qp_draw_text.c
··· 343 343 int16_t xpos; 344 344 int16_t ypos; 345 345 qp_internal_byte_input_callback input_callback; 346 - qp_internal_byte_input_state_t * input_state; 346 + qp_internal_byte_input_state_t *input_state; 347 347 qp_internal_pixel_output_state_t *output_state; 348 348 } code_point_iter_drawglyph_state_t; 349 349 350 350 // Codepoint handler callback: drawing 351 351 static inline bool qp_font_code_point_handler_drawglyph(qff_font_handle_t *qff_font, uint32_t code_point, uint8_t width, uint8_t height, void *cb_arg) { 352 352 code_point_iter_drawglyph_state_t *state = (code_point_iter_drawglyph_state_t *)cb_arg; 353 - painter_driver_t * driver = (painter_driver_t *)state->device; 353 + painter_driver_t *driver = (painter_driver_t *)state->device; 354 354 355 355 // Reset the input state's RLE mode -- the stream should already be correctly positioned by qp_iterate_code_points() 356 356 state->input_state->rle.mode = MARKER_BYTE; // ignored if not using RLE
+1 -1
quantum/painter/qp_internal_driver.h
··· 60 60 61 61 typedef struct painter_driver_t { 62 62 const painter_driver_vtable_t *driver_vtable; 63 - const painter_comms_vtable_t * comms_vtable; 63 + const painter_comms_vtable_t *comms_vtable; 64 64 65 65 // Flag signifying if validation was successful 66 66 bool validate_ok;
+2 -2
quantum/painter/qp_stream.h
··· 62 62 63 63 typedef struct qp_memory_stream_t { 64 64 qp_stream_t base; 65 - uint8_t * buffer; 65 + uint8_t *buffer; 66 66 int32_t length; 67 67 int32_t position; 68 68 bool is_eof; ··· 77 77 78 78 typedef struct qp_file_stream_t { 79 79 qp_stream_t base; 80 - FILE * file; 80 + FILE *file; 81 81 } qp_file_stream_t; 82 82 83 83 qp_file_stream_t qp_make_file_stream(FILE *f);
+1 -1
quantum/process_keycode/process_autocorrect.c
··· 309 309 310 310 if (code & 128) { // A typo was found! Apply autocorrect. 311 311 const uint8_t backspaces = (code & 63) + !record->event.pressed; 312 - const char * changes = (const char *)(autocorrect_data + state + 1); 312 + const char *changes = (const char *)(autocorrect_data + state + 1); 313 313 314 314 /* Gather info about the typo'd word 315 315 *
+7 -7
quantum/process_keycode/process_combo.c
··· 225 225 key_buffer_next = key_buffer_i + 1; 226 226 227 227 queued_record_t *qrecord = &key_buffer[key_buffer_i]; 228 - keyrecord_t * record = &qrecord->record; 228 + keyrecord_t *record = &qrecord->record; 229 229 230 230 if (IS_NOEVENT(record->event)) { 231 231 continue; ··· 318 318 #if defined(EXTRA_EXTRA_LONG_COMBOS) 319 319 uint32_t state = 0; 320 320 #elif defined(EXTRA_LONG_COMBOS) 321 - uint16_t state = 0; 321 + uint16_t state = 0; 322 322 #else 323 323 uint8_t state = 0; 324 324 #endif 325 325 326 326 for (uint8_t key_buffer_i = 0; key_buffer_i < key_buffer_size; key_buffer_i++) { 327 327 queued_record_t *qrecord = &key_buffer[key_buffer_i]; 328 - keyrecord_t * record = &qrecord->record; 328 + keyrecord_t *record = &qrecord->record; 329 329 uint16_t keycode = qrecord->keycode; 330 330 331 331 uint8_t key_count = 0; ··· 361 361 // Apply all buffered normal combos. 362 362 for (uint8_t i = combo_buffer_read; i != combo_buffer_write; INCREMENT_MOD(i)) { 363 363 queued_combo_t *buffered_combo = &combo_buffer[i]; 364 - combo_t * combo = combo_get(buffered_combo->combo_index); 364 + combo_t *combo = combo_get(buffered_combo->combo_index); 365 365 366 366 #ifdef COMBO_MUST_TAP_PER_COMBO 367 367 if (get_combo_must_tap(buffered_combo->combo_index, combo)) { ··· 466 466 combo_t *drop = NULL; 467 467 for (uint8_t combo_buffer_i = combo_buffer_read; combo_buffer_i != combo_buffer_write; INCREMENT_MOD(combo_buffer_i)) { 468 468 queued_combo_t *qcombo = &combo_buffer[combo_buffer_i]; 469 - combo_t * buffered_combo = combo_get(qcombo->combo_index); 469 + combo_t *buffered_combo = combo_get(qcombo->combo_index); 470 470 471 471 if ((drop = overlaps(buffered_combo, combo))) { 472 472 DISABLE_COMBO(drop); ··· 574 574 /* Only check keycodes from one layer. */ 575 575 keycode = keymap_key_to_keycode(COMBO_ONLY_FROM_LAYER, record->event.key); 576 576 #else 577 - uint8_t highest_layer = get_highest_layer(layer_state | default_layer_state); 578 - uint8_t ref_layer = combo_ref_from_layer(highest_layer); 577 + uint8_t highest_layer = get_highest_layer(layer_state | default_layer_state); 578 + uint8_t ref_layer = combo_ref_from_layer(highest_layer); 579 579 if (ref_layer != highest_layer) { 580 580 keycode = keymap_key_to_keycode(ref_layer, record->event.key); 581 581 }
+4 -6
quantum/process_keycode/process_combo.h
··· 45 45 #ifdef EXTRA_SHORT_COMBOS 46 46 uint8_t state; 47 47 #else 48 - bool disabled; 49 - bool active; 48 + bool disabled; 49 + bool active; 50 50 # if defined(EXTRA_EXTRA_LONG_COMBOS) 51 51 uint32_t state; 52 52 # elif defined(EXTRA_LONG_COMBOS) ··· 57 57 #endif 58 58 } combo_t; 59 59 60 - #define COMBO(ck, ca) \ 61 - { .keys = &(ck)[0], .keycode = (ca) } 62 - #define COMBO_ACTION(ck) \ 63 - { .keys = &(ck)[0] } 60 + #define COMBO(ck, ca) {.keys = &(ck)[0], .keycode = (ca)} 61 + #define COMBO_ACTION(ck) {.keys = &(ck)[0]} 64 62 65 63 #define COMBO_END 0 66 64 #ifndef COMBO_TERM
+1 -1
quantum/process_keycode/process_key_lock.c
··· 20 20 21 21 #define BV_64(shift) (((uint64_t)1) << (shift)) 22 22 #define GET_KEY_ARRAY(code) (((code) < 0x40) ? key_state[0] : ((code) < 0x80) ? key_state[1] : ((code) < 0xC0) ? key_state[2] : key_state[3]) 23 - #define GET_CODE_INDEX(code) (((code) < 0x40) ? (code) : ((code) < 0x80) ? (code)-0x40 : ((code) < 0xC0) ? (code)-0x80 : (code)-0xC0) 23 + #define GET_CODE_INDEX(code) (((code) < 0x40) ? (code) : ((code) < 0x80) ? (code) - 0x40 : ((code) < 0xC0) ? (code) - 0x80 : (code) - 0xC0) 24 24 #define KEY_STATE(code) (GET_KEY_ARRAY(code) & BV_64(GET_CODE_INDEX(code))) == BV_64(GET_CODE_INDEX(code)) 25 25 #define SET_KEY_ARRAY_STATE(code, val) \ 26 26 do { \
+2 -1
quantum/process_keycode/process_key_override.c
··· 39 39 # define key_override_printf dprintf 40 40 #else 41 41 # define key_override_printf(str, ...) \ 42 - {} 42 + { \ 43 + } 43 44 #endif 44 45 45 46 // Helpers
+28 -10
quantum/process_keycode/process_tap_dance.h
··· 57 57 void (*layer_function)(uint8_t); 58 58 } tap_dance_dual_role_t; 59 59 60 - #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) \ 61 - { .fn = {tap_dance_pair_on_each_tap, tap_dance_pair_finished, tap_dance_pair_reset, NULL}, .user_data = (void *)&((tap_dance_pair_t){kc1, kc2}), } 60 + #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) \ 61 + { \ 62 + .fn = {tap_dance_pair_on_each_tap, tap_dance_pair_finished, tap_dance_pair_reset, NULL}, \ 63 + .user_data = (void *)&((tap_dance_pair_t){kc1, kc2}), \ 64 + } 62 65 63 - #define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) \ 64 - { .fn = {tap_dance_dual_role_on_each_tap, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_move}), } 66 + #define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) \ 67 + { \ 68 + .fn = {tap_dance_dual_role_on_each_tap, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, \ 69 + .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_move}), \ 70 + } 65 71 66 - #define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \ 67 - { .fn = {NULL, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_invert}), } 72 + #define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \ 73 + { \ 74 + .fn = {NULL, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, \ 75 + .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_invert}), \ 76 + } 68 77 69 - #define ACTION_TAP_DANCE_FN(user_fn) \ 70 - { .fn = {NULL, user_fn, NULL, NULL}, .user_data = NULL, } 78 + #define ACTION_TAP_DANCE_FN(user_fn) \ 79 + { \ 80 + .fn = {NULL, user_fn, NULL, NULL}, \ 81 + .user_data = NULL, \ 82 + } 71 83 72 84 #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) \ 73 - { .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, NULL}, .user_data = NULL, } 85 + { \ 86 + .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, NULL}, \ 87 + .user_data = NULL, \ 88 + } 74 89 75 90 #define ACTION_TAP_DANCE_FN_ADVANCED_WITH_RELEASE(user_fn_on_each_tap, user_fn_on_each_release, user_fn_on_dance_finished, user_fn_on_dance_reset) \ 76 - { .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, user_fn_on_each_release}, .user_data = NULL, } 91 + { \ 92 + .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, user_fn_on_each_release}, \ 93 + .user_data = NULL, \ 94 + } 77 95 78 96 #define TD_INDEX(code) QK_TAP_DANCE_GET_INDEX(code) 79 97 #define TAP_DANCE_KEYCODE(state) TD(((tap_dance_action_t *)state) - tap_dance_actions)
+32 -32
quantum/quantum_keycodes.h
··· 39 39 40 40 // Generic decoding for the whole QK_MODS range 41 41 #define QK_MODS_GET_MODS(kc) (((kc) >> 8) & 0x1F) 42 - #define QK_MODS_GET_BASIC_KEYCODE(kc) ((kc)&0xFF) 42 + #define QK_MODS_GET_BASIC_KEYCODE(kc) ((kc) & 0xFF) 43 43 44 44 // Modified keycodes 45 45 #define LCTL(kc) (QK_LCTL | (kc)) ··· 90 90 #define MEH(kc) (QK_LCTL | QK_LSFT | QK_LALT | (kc)) 91 91 92 92 // GOTO layer - 32 layer max 93 - #define TO(layer) (QK_TO | ((layer)&0x1F)) 94 - #define QK_TO_GET_LAYER(kc) ((kc)&0x1F) 93 + #define TO(layer) (QK_TO | ((layer) & 0x1F)) 94 + #define QK_TO_GET_LAYER(kc) ((kc) & 0x1F) 95 95 96 96 // Momentary switch layer - 32 layer max 97 - #define MO(layer) (QK_MOMENTARY | ((layer)&0x1F)) 98 - #define QK_MOMENTARY_GET_LAYER(kc) ((kc)&0x1F) 97 + #define MO(layer) (QK_MOMENTARY | ((layer) & 0x1F)) 98 + #define QK_MOMENTARY_GET_LAYER(kc) ((kc) & 0x1F) 99 99 100 100 // Set default layer - 32 layer max 101 - #define DF(layer) (QK_DEF_LAYER | ((layer)&0x1F)) 102 - #define QK_DEF_LAYER_GET_LAYER(kc) ((kc)&0x1F) 101 + #define DF(layer) (QK_DEF_LAYER | ((layer) & 0x1F)) 102 + #define QK_DEF_LAYER_GET_LAYER(kc) ((kc) & 0x1F) 103 103 104 104 // Set persistent default layer - 32 layer max 105 - #define PDF(layer) (QK_PERSISTENT_DEF_LAYER | ((layer)&0x1F)) 106 - #define QK_PERSISTENT_DEF_LAYER_GET_LAYER(kc) ((kc)&0x1F) 105 + #define PDF(layer) (QK_PERSISTENT_DEF_LAYER | ((layer) & 0x1F)) 106 + #define QK_PERSISTENT_DEF_LAYER_GET_LAYER(kc) ((kc) & 0x1F) 107 107 108 108 // Toggle to layer - 32 layer max 109 - #define TG(layer) (QK_TOGGLE_LAYER | ((layer)&0x1F)) 110 - #define QK_TOGGLE_LAYER_GET_LAYER(kc) ((kc)&0x1F) 109 + #define TG(layer) (QK_TOGGLE_LAYER | ((layer) & 0x1F)) 110 + #define QK_TOGGLE_LAYER_GET_LAYER(kc) ((kc) & 0x1F) 111 111 112 112 // One-shot layer - 32 layer max 113 - #define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer)&0x1F)) 114 - #define QK_ONE_SHOT_LAYER_GET_LAYER(kc) ((kc)&0x1F) 113 + #define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer) & 0x1F)) 114 + #define QK_ONE_SHOT_LAYER_GET_LAYER(kc) ((kc) & 0x1F) 115 115 116 116 // L-ayer M-od: Momentary switch layer with modifiers active - 16 layer max 117 - #define LM(layer, mod) (QK_LAYER_MOD | (((layer)&0xF) << 5) | ((mod)&0x1F)) 117 + #define LM(layer, mod) (QK_LAYER_MOD | (((layer) & 0xF) << 5) | ((mod) & 0x1F)) 118 118 #define QK_LAYER_MOD_GET_LAYER(kc) (((kc) >> 5) & 0xF) 119 - #define QK_LAYER_MOD_GET_MODS(kc) ((kc)&0x1F) 119 + #define QK_LAYER_MOD_GET_MODS(kc) ((kc) & 0x1F) 120 120 121 121 // One-shot mod 122 - #define OSM(mod) (QK_ONE_SHOT_MOD | ((mod)&0x1F)) 123 - #define QK_ONE_SHOT_MOD_GET_MODS(kc) ((kc)&0x1F) 122 + #define OSM(mod) (QK_ONE_SHOT_MOD | ((mod) & 0x1F)) 123 + #define QK_ONE_SHOT_MOD_GET_MODS(kc) ((kc) & 0x1F) 124 124 125 125 #define OS_LCTL OSM(MOD_LCTL) 126 126 #define OS_LSFT OSM(MOD_LSFT) ··· 158 158 #define OS_HYPR OSM(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI) 159 159 160 160 // Layer tap-toggle - 32 layer max 161 - #define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer)&0x1F)) 162 - #define QK_LAYER_TAP_TOGGLE_GET_LAYER(kc) ((kc)&0x1F) 161 + #define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer) & 0x1F)) 162 + #define QK_LAYER_TAP_TOGGLE_GET_LAYER(kc) ((kc) & 0x1F) 163 163 164 164 // L-ayer, T-ap - 256 keycode max, 16 layer max 165 - #define LT(layer, kc) (QK_LAYER_TAP | (((layer)&0xF) << 8) | ((kc)&0xFF)) 165 + #define LT(layer, kc) (QK_LAYER_TAP | (((layer) & 0xF) << 8) | ((kc) & 0xFF)) 166 166 #define QK_LAYER_TAP_GET_LAYER(kc) (((kc) >> 8) & 0xF) 167 - #define QK_LAYER_TAP_GET_TAP_KEYCODE(kc) ((kc)&0xFF) 167 + #define QK_LAYER_TAP_GET_TAP_KEYCODE(kc) ((kc) & 0xFF) 168 168 169 169 // M-od, T-ap - 256 keycode max 170 - #define MT(mod, kc) (QK_MOD_TAP | (((mod)&0x1F) << 8) | ((kc)&0xFF)) 170 + #define MT(mod, kc) (QK_MOD_TAP | (((mod) & 0x1F) << 8) | ((kc) & 0xFF)) 171 171 #define QK_MOD_TAP_GET_MODS(kc) (((kc) >> 8) & 0x1F) 172 - #define QK_MOD_TAP_GET_TAP_KEYCODE(kc) ((kc)&0xFF) 172 + #define QK_MOD_TAP_GET_TAP_KEYCODE(kc) ((kc) & 0xFF) 173 173 174 174 // Mod-Tap shortcuts 175 175 #define LCTL_T(kc) MT(MOD_LCTL, kc) ··· 230 230 // Unicode aliases 231 231 // UNICODE_ENABLE - Allows Unicode input up to 0x7FFF 232 232 #define UC(c) (QK_UNICODE | (c)) 233 - #define QK_UNICODE_GET_CODE_POINT(kc) ((kc)&0x7FFF) 233 + #define QK_UNICODE_GET_CODE_POINT(kc) ((kc) & 0x7FFF) 234 234 235 235 // UNICODEMAP_ENABLE - Allows Unicode input up to 0x10FFFF, requires unicode_map 236 - #define UM(i) (QK_UNICODEMAP | ((i)&0x3FFF)) 237 - #define QK_UNICODEMAP_GET_INDEX(kc) ((kc)&0x3FFF) 236 + #define UM(i) (QK_UNICODEMAP | ((i) & 0x3FFF)) 237 + #define QK_UNICODEMAP_GET_INDEX(kc) ((kc) & 0x3FFF) 238 238 239 - #define UP(i, j) (QK_UNICODEMAP_PAIR | ((i)&0x7F) | (((j)&0x7F) << 7)) // 127 max i and j 240 - #define QK_UNICODEMAP_PAIR_GET_UNSHIFTED_INDEX(kc) ((kc)&0x7F) 239 + #define UP(i, j) (QK_UNICODEMAP_PAIR | ((i) & 0x7F) | (((j) & 0x7F) << 7)) // 127 max i and j 240 + #define QK_UNICODEMAP_PAIR_GET_UNSHIFTED_INDEX(kc) ((kc) & 0x7F) 241 241 #define QK_UNICODEMAP_PAIR_GET_SHIFTED_INDEX(kc) (((kc) >> 7) & 0x7F) 242 242 243 243 // Swap Hands 244 - #define SH_T(kc) (QK_SWAP_HANDS | ((kc)&0xFF)) 245 - #define QK_SWAP_HANDS_GET_TAP_KEYCODE(kc) ((kc)&0xFF) 244 + #define SH_T(kc) (QK_SWAP_HANDS | ((kc) & 0xFF)) 245 + #define QK_SWAP_HANDS_GET_TAP_KEYCODE(kc) ((kc) & 0xFF) 246 246 247 247 // Tap dance 248 - #define TD(i) (QK_TAP_DANCE | ((i)&0xFF)) 249 - #define QK_TAP_DANCE_GET_INDEX(kc) ((kc)&0xFF) 248 + #define TD(i) (QK_TAP_DANCE | ((i) & 0xFF)) 249 + #define QK_TAP_DANCE_GET_INDEX(kc) ((kc) & 0xFF) 250 250 251 251 // MIDI aliases 252 252 #define MIDI_TONE_MIN QK_MIDI_NOTE_C_0
+1 -1
quantum/rgblight/rgblight.c
··· 1381 1381 1382 1382 for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) { 1383 1383 TwinkleState *t = &(led_twinkle_state[i]); 1384 - hsv_t * c = &(t->hsv); 1384 + hsv_t *c = &(t->hsv); 1385 1385 1386 1386 if (!random_color) { 1387 1387 c->h = rgblight_config.hue;
+3 -6
quantum/rgblight/rgblight.h
··· 186 186 # define RGBLIGHT_USE_TIMER 187 187 188 188 # define RGBLIGHT_END_SEGMENT_INDEX (255) 189 - # define RGBLIGHT_END_SEGMENTS \ 190 - { RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0 } 189 + # define RGBLIGHT_END_SEGMENTS {RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0} 191 190 # ifndef RGBLIGHT_MAX_LAYERS 192 191 # define RGBLIGHT_MAX_LAYERS 8 193 192 # endif ··· 202 201 # else 203 202 # error invalid RGBLIGHT_MAX_LAYERS value (must be <= 32) 204 203 # endif 205 - # define RGBLIGHT_LAYER_SEGMENTS(...) \ 206 - { __VA_ARGS__, RGBLIGHT_END_SEGMENTS } 207 - # define RGBLIGHT_LAYERS_LIST(...) \ 208 - { __VA_ARGS__, NULL } 204 + # define RGBLIGHT_LAYER_SEGMENTS(...) {__VA_ARGS__, RGBLIGHT_END_SEGMENTS} 205 + # define RGBLIGHT_LAYERS_LIST(...) {__VA_ARGS__, NULL} 209 206 210 207 // Get/set enabled rgblight layers 211 208 void rgblight_set_layer_state(uint8_t layer, bool enabled);
+1 -4
quantum/secure.c
··· 14 14 #endif 15 15 16 16 #ifndef SECURE_UNLOCK_SEQUENCE 17 - # define SECURE_UNLOCK_SEQUENCE \ 18 - { \ 19 - { 0, 0 } \ 20 - } 17 + # define SECURE_UNLOCK_SEQUENCE {{0, 0}} 21 18 #endif 22 19 23 20 static secure_status_t secure_status = SECURE_LOCKED;
+1 -1
quantum/split_common/split_util.c
··· 167 167 # pragma message "Faking EE_HANDS for right hand" 168 168 const bool should_be_left = false; 169 169 # endif 170 - bool is_left = eeconfig_read_handedness(); 170 + bool is_left = eeconfig_read_handedness(); 171 171 if (is_left != should_be_left) { 172 172 eeconfig_update_handedness(should_be_left); 173 173 }
+3 -6
quantum/split_common/transactions.c
··· 73 73 74 74 #define sizeof_member(type, member) sizeof(((type *)NULL)->member) 75 75 76 - #define trans_initiator2target_initializer_cb(member, cb) \ 77 - { sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), 0, 0, cb } 76 + #define trans_initiator2target_initializer_cb(member, cb) {sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), 0, 0, cb} 78 77 #define trans_initiator2target_initializer(member) trans_initiator2target_initializer_cb(member, NULL) 79 78 80 - #define trans_target2initiator_initializer_cb(member, cb) \ 81 - { 0, 0, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), cb } 79 + #define trans_target2initiator_initializer_cb(member, cb) {0, 0, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), cb} 82 80 #define trans_target2initiator_initializer(member) trans_target2initiator_initializer_cb(member, NULL) 83 81 84 - #define trans_initiator2target_cb(cb) \ 85 - { 0, 0, 0, 0, cb } 82 + #define trans_initiator2target_cb(cb) {0, 0, 0, 0, cb} 86 83 87 84 #define transport_write(id, data, length) transport_execute_transaction(id, data, length, NULL, 0) 88 85 #define transport_read(id, data, length) transport_execute_transaction(id, NULL, 0, data, length)
+1 -1
quantum/util.h
··· 24 24 * @brief Computes the rounded up result of a division of two integers at 25 25 * compile time. 26 26 */ 27 - # define CEILING(dividend, divisor) (((dividend) + (divisor)-1) / (divisor)) 27 + # define CEILING(dividend, divisor) (((dividend) + (divisor) - 1) / (divisor)) 28 28 #endif 29 29 30 30 #if !defined(IS_ARRAY)
+2 -2
quantum/via.c
··· 68 68 // Can be called in an overriding via_init_kb() to test if keyboard level code usage of 69 69 // EEPROM is invalid and use/save defaults. 70 70 bool via_eeprom_is_valid(void) { 71 - char * p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" 71 + char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" 72 72 uint8_t magic0 = ((p[2] & 0x0F) << 4) | (p[3] & 0x0F); 73 73 uint8_t magic1 = ((p[5] & 0x0F) << 4) | (p[6] & 0x0F); 74 74 uint8_t magic2 = ((p[8] & 0x0F) << 4) | (p[9] & 0x0F); ··· 85 85 // Keyboard level code (eg. via_init_kb()) should not call this 86 86 void via_eeprom_set_valid(bool valid) { 87 87 if (valid) { 88 - char * p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" 88 + char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" 89 89 uint8_t magic0 = ((p[2] & 0x0F) << 4) | (p[3] & 0x0F); 90 90 uint8_t magic1 = ((p[5] & 0x0F) << 4) | (p[6] & 0x0F); 91 91 uint8_t magic2 = ((p[8] & 0x0F) << 4) | (p[9] & 0x0F);
+3 -3
quantum/wear_leveling/wear_leveling.c
··· 358 358 * @return true if consolidation occurred 359 359 */ 360 360 static wear_leveling_status_t wear_leveling_write_raw_multibyte(uint32_t address, const void *value, size_t length) { 361 - const uint8_t * p = value; 361 + const uint8_t *p = value; 362 362 write_log_entry_t log = LOG_ENTRY_MAKE_MULTIBYTE(address, length); 363 363 for (size_t i = 0; i < length; ++i) { 364 364 log.raw8[3 + i] = p[i]; ··· 415 415 * Handles the actual writing of logical data into the write log section of the backing store. 416 416 */ 417 417 static wear_leveling_status_t wear_leveling_write_raw(uint32_t address, const void *value, size_t length) { 418 - const uint8_t * p = value; 418 + const uint8_t *p = value; 419 419 size_t remaining = length; 420 420 wear_leveling_status_t status = WEAR_LEVELING_SUCCESS; 421 421 while (remaining > 0) { ··· 555 555 if (!ok) { 556 556 wl_dprintf("Failed to load from backing store, skipping playback of write log\n"); 557 557 cancel_playback = true; 558 - status = WEAR_LEVELING_FAILED; 558 + status = WEAR_LEVELING_FAILED; 559 559 break; 560 560 } 561 561 address += (BACKING_STORE_WRITE_SIZE);
+1 -2
tests/tap_hold_configurations/retro_tapping/config.h
··· 20 20 21 21 #define RETRO_TAPPING 22 22 #define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_RIGHT_CTRL 23 - #define MODS_TO_NEUTRALIZE \ 24 - { MOD_BIT(KC_LEFT_GUI) } 23 + #define MODS_TO_NEUTRALIZE {MOD_BIT(KC_LEFT_GUI)}
+1 -1
tmk_core/protocol/chibios/usb_driver.c
··· 186 186 void usb_endpoint_in_tx_complete_cb(USBDriver *usbp, usbep_t ep) { 187 187 usb_endpoint_in_t *endpoint = usbp->in_params[ep - 1U]; 188 188 size_t n; 189 - uint8_t * buffer; 189 + uint8_t *buffer; 190 190 191 191 if (endpoint == NULL) { 192 192 return;
+3 -3
tmk_core/protocol/chibios/usb_endpoints.c
··· 68 68 # if defined(USB_ENDPOINTS_ARE_REORDERABLE) 69 69 [USB_ENDPOINT_IN_CONSOLE] = QMK_USB_ENDPOINT_IN_SHARED(USB_EP_MODE_TYPE_INTR, CONSOLE_EPSIZE, CONSOLE_IN_EPNUM, CONSOLE_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(CONSOLE_EPSIZE)), 70 70 # else 71 - [USB_ENDPOINT_IN_CONSOLE] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, CONSOLE_EPSIZE, CONSOLE_IN_EPNUM, CONSOLE_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(CONSOLE_EPSIZE)), 71 + [USB_ENDPOINT_IN_CONSOLE] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, CONSOLE_EPSIZE, CONSOLE_IN_EPNUM, CONSOLE_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(CONSOLE_EPSIZE)), 72 72 # endif 73 73 #endif 74 74 ··· 76 76 # if defined(USB_ENDPOINTS_ARE_REORDERABLE) 77 77 [USB_ENDPOINT_IN_RAW] = QMK_USB_ENDPOINT_IN_SHARED(USB_EP_MODE_TYPE_INTR, RAW_EPSIZE, RAW_IN_EPNUM, RAW_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(RAW_EPSIZE)), 78 78 # else 79 - [USB_ENDPOINT_IN_RAW] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, RAW_EPSIZE, RAW_IN_EPNUM, RAW_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(RAW_EPSIZE)), 79 + [USB_ENDPOINT_IN_RAW] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, RAW_EPSIZE, RAW_IN_EPNUM, RAW_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(RAW_EPSIZE)), 80 80 # endif 81 81 #endif 82 82 ··· 84 84 # if defined(USB_ENDPOINTS_ARE_REORDERABLE) 85 85 [USB_ENDPOINT_IN_MIDI] = QMK_USB_ENDPOINT_IN_SHARED(USB_EP_MODE_TYPE_BULK, MIDI_STREAM_EPSIZE, MIDI_STREAM_IN_EPNUM, MIDI_STREAM_IN_CAPACITY, NULL, NULL), 86 86 # else 87 - [USB_ENDPOINT_IN_MIDI] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_BULK, MIDI_STREAM_EPSIZE, MIDI_STREAM_IN_EPNUM, MIDI_STREAM_IN_CAPACITY, NULL, NULL), 87 + [USB_ENDPOINT_IN_MIDI] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_BULK, MIDI_STREAM_EPSIZE, MIDI_STREAM_IN_EPNUM, MIDI_STREAM_IN_CAPACITY, NULL, NULL), 88 88 # endif 89 89 #endif 90 90
+1 -1
tmk_core/protocol/chibios/usb_main.c
··· 80 80 81 81 static USBDescriptor descriptor; 82 82 descriptor.ud_string = NULL; 83 - descriptor.ud_size = get_usb_descriptor(setup->wValue.word, setup->wIndex, setup->wLength, (const void **const) & descriptor.ud_string); 83 + descriptor.ud_size = get_usb_descriptor(setup->wValue.word, setup->wIndex, setup->wLength, (const void **const)&descriptor.ud_string); 84 84 85 85 if (descriptor.ud_string == NULL) { 86 86 return NULL;
+2 -2
tmk_core/protocol/usb_descriptor.h
··· 223 223 # ifdef USB_ENDPOINTS_ARE_REORDERABLE 224 224 # define RAW_OUT_EPNUM RAW_IN_EPNUM 225 225 # else 226 - RAW_OUT_EPNUM = NEXT_EPNUM, 226 + RAW_OUT_EPNUM = NEXT_EPNUM, 227 227 # endif 228 228 #endif 229 229 ··· 250 250 # ifdef USB_ENDPOINTS_ARE_REORDERABLE 251 251 # define CDC_OUT_EPNUM CDC_IN_EPNUM 252 252 # else 253 - CDC_OUT_EPNUM = NEXT_EPNUM, 253 + CDC_OUT_EPNUM = NEXT_EPNUM, 254 254 # endif 255 255 #endif 256 256