Skip to content

Commit

Permalink
Format code according to conventions (qmk#11905)
Browse files Browse the repository at this point in the history
Co-authored-by: QMK Bot <[email protected]>
  • Loading branch information
github-actions[bot] and qmk-bot authored Feb 14, 2021
1 parent 4ddb5ab commit c27a778
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 27 deletions.
15 changes: 3 additions & 12 deletions drivers/chibios/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@

#include "quantum.h"

static SerialConfig serialConfig = {
SERIAL_DEFAULT_BITRATE,
SD1_CR1,
SD1_CR2,
SD1_CR3
};
static SerialConfig serialConfig = {SERIAL_DEFAULT_BITRATE, SD1_CR1, SD1_CR2, SD1_CR3};

void uart_init(uint32_t baud) {
static bool is_initialised = false;
Expand All @@ -44,16 +39,12 @@ void uart_init(uint32_t baud) {
}
}

void uart_putchar(uint8_t c) {
sdPut(&SERIAL_DRIVER, c);
}
void uart_putchar(uint8_t c) { sdPut(&SERIAL_DRIVER, c); }

uint8_t uart_getchar(void) {
msg_t res = sdGet(&SERIAL_DRIVER);

return (uint8_t)res;
}

bool uart_available(void) {
return !sdGetWouldBlock(&SERIAL_DRIVER);
}
bool uart_available(void) { return !sdGetWouldBlock(&SERIAL_DRIVER); }
18 changes: 9 additions & 9 deletions quantum/audio/audio_chibios.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,23 @@ static void gpt_cb8(GPTDriver *gptp);
# define DAC_SAMPLE_MAX 65535U
#endif

#define START_CHANNEL_1() \
gptStart(&GPTD6, &gpt6cfg1); \
#define START_CHANNEL_1() \
gptStart(&GPTD6, &gpt6cfg1); \
gptStartContinuous(&GPTD6, 2U); \
palSetPadMode(GPIOA, 4, PAL_MODE_INPUT_ANALOG)
#define START_CHANNEL_2() \
gptStart(&GPTD7, &gpt7cfg1); \
#define START_CHANNEL_2() \
gptStart(&GPTD7, &gpt7cfg1); \
gptStartContinuous(&GPTD7, 2U); \
palSetPadMode(GPIOA, 5, PAL_MODE_INPUT_ANALOG)
#define STOP_CHANNEL_1() \
gptStopTimer(&GPTD6); \
#define STOP_CHANNEL_1() \
gptStopTimer(&GPTD6); \
palSetPadMode(GPIOA, 4, PAL_MODE_OUTPUT_PUSHPULL); \
palSetPad(GPIOA, 4)
#define STOP_CHANNEL_2() \
gptStopTimer(&GPTD7); \
#define STOP_CHANNEL_2() \
gptStopTimer(&GPTD7); \
palSetPadMode(GPIOA, 5, PAL_MODE_OUTPUT_PUSHPULL); \
palSetPad(GPIOA, 5)
#define RESTART_CHANNEL_1() \
#define RESTART_CHANNEL_1() \
STOP_CHANNEL_1(); \
START_CHANNEL_1()
#define RESTART_CHANNEL_2() \
Expand Down
8 changes: 4 additions & 4 deletions tmk_core/common/avr/bootloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,13 @@ __attribute__((weak)) void bootloader_jump(void) {
"bootloader_startup_loop%=: \n\t"
"rjmp bootloader_startup_loop%= \n\t"
:
: [ mcucsrio ] "I"(_SFR_IO_ADDR(MCUCSR)),
: [mcucsrio] "I"(_SFR_IO_ADDR(MCUCSR)),
# if (FLASHEND > 131071)
[ ramendhi ] "M"(((RAMEND - 2) >> 8) & 0xff), [ ramendlo ] "M"(((RAMEND - 2) >> 0) & 0xff), [ bootaddrhi ] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 16) & 0xff),
[ramendhi] "M"(((RAMEND - 2) >> 8) & 0xff), [ramendlo] "M"(((RAMEND - 2) >> 0) & 0xff), [bootaddrhi] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 16) & 0xff),
# else
[ ramendhi ] "M"(((RAMEND - 1) >> 8) & 0xff), [ ramendlo ] "M"(((RAMEND - 1) >> 0) & 0xff),
[ramendhi] "M"(((RAMEND - 1) >> 8) & 0xff), [ramendlo] "M"(((RAMEND - 1) >> 0) & 0xff),
# endif
[ bootaddrme ] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 8) & 0xff), [ bootaddrlo ] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 0) & 0xff));
[bootaddrme] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 8) & 0xff), [bootaddrlo] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 0) & 0xff));

#else // Assume remaining boards are DFU, even if the flag isn't set

Expand Down
1 change: 0 additions & 1 deletion tmk_core/protocol/arm_atsam/main_arm_atsam.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ int main(void) {
// dprintf("5v=%u 5vu=%u dlow=%u dhi=%u gca=%u gcd=%u\r\n", v_5v, v_5v_avg, v_5v_avg - V5_LOW, v_5v_avg - V5_HIGH, gcr_actual, gcr_desired);
}
#endif // CONSOLE_ENABLE

}

return 1;
Expand Down
2 changes: 1 addition & 1 deletion tmk_core/protocol/chibios/usb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ void send_mouse(report_mouse_t *report) {
}

#else /* MOUSE_ENABLE */
void send_mouse(report_mouse_t *report) { (void)report; }
void send_mouse(report_mouse_t *report) { (void)report; }
#endif /* MOUSE_ENABLE */

/* ---------------------------------------------------------
Expand Down

0 comments on commit c27a778

Please sign in to comment.