1
0
Fork 0

Format code according to conventions (#11905)

Co-authored-by: QMK Bot <hello@qmk.fm>
This commit is contained in:
github-actions[bot] 2021-02-15 06:55:43 +11:00 committed by GitHub
parent 4ddb5abea5
commit c27a778281
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 27 deletions

View file

@ -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;
@ -44,9 +39,7 @@ 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);
@ -54,6 +47,4 @@ uint8_t uart_getchar(void) {
return (uint8_t)res;
}
bool uart_available(void) {
return !sdGetWouldBlock(&SERIAL_DRIVER);
}
bool uart_available(void) { return !sdGetWouldBlock(&SERIAL_DRIVER); }

View file

@ -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() \

View file

@ -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

View file

@ -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;

View file

@ -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 */
/* ---------------------------------------------------------