Disable clang-format for sensitive blocks

Things like macro blocks should not be auto-formatted.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2021-07-19 09:40:22 -06:00
committed by Jeremy Soller
parent 04df6ae311
commit b70a09e205
58 changed files with 116 additions and 1 deletions

View File

@@ -16,12 +16,14 @@ struct Gpio {
uint8_t value;
};
// clang-format off
#define GPIO(BLOCK, NUMBER) { \
.pin = &PIN ## BLOCK, \
.ddr = &DDR ## BLOCK, \
.port = &PORT ## BLOCK, \
.value = BIT(NUMBER), \
}
// clang-format on
bool gpio_get(struct Gpio * gpio);
void gpio_set(struct Gpio * gpio, bool value);

View File

@@ -6,6 +6,7 @@
#include <arch/uart.h>
#include <board/cpu.h>
// clang-format off
#define UART(N) \
{ \
&UCSR ## N ## A, \
@@ -39,6 +40,7 @@
#else
#error "Could not find UART definitions"
#endif
// clang-format on
int16_t uart_count() {
return sizeof(UARTS)/sizeof(struct Uart);