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:
committed by
Jeremy Soller
parent
04df6ae311
commit
b70a09e205
@@ -17,10 +17,12 @@ struct VirtualWire {
|
||||
uint8_t shift;
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
#define VIRTUAL_WIRE(INDEX, SHIFT) { \
|
||||
.index = &VWIDX ## INDEX, \
|
||||
.shift = SHIFT, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
enum VirtualWireState {
|
||||
VWS_INVALID = 0x00,
|
||||
|
@@ -21,12 +21,14 @@ struct Gpio {
|
||||
uint8_t value;
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
#define GPIO(BLOCK, NUMBER) { \
|
||||
.data = &GPDR ## BLOCK, \
|
||||
.mirror = &GPDMR ## BLOCK, \
|
||||
.control = &GPCR ## BLOCK ## NUMBER, \
|
||||
.value = BIT(NUMBER), \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
bool gpio_get(struct Gpio * gpio);
|
||||
void gpio_set(struct Gpio * gpio, bool value);
|
||||
|
@@ -2,12 +2,14 @@
|
||||
|
||||
#include <ec/pmc.h>
|
||||
|
||||
// clang-format off
|
||||
#define PMC(NUM) { \
|
||||
.status = &PM ## NUM ## STS, \
|
||||
.data_out = &PM ## NUM ## DO, \
|
||||
.data_in = &PM ## NUM ## DI, \
|
||||
.control = &PM ## NUM ## CTL, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
struct Pmc __code PMC_1 = PMC(1);
|
||||
struct Pmc __code PMC_2 = PMC(2);
|
||||
|
@@ -2,12 +2,14 @@
|
||||
|
||||
#include <ec/ps2.h>
|
||||
|
||||
// clang-format off
|
||||
#define PS2(NUM) { \
|
||||
.control = &PSCTL ## NUM, \
|
||||
.interrupt = &PSINT ## NUM, \
|
||||
.status = &PSSTS ## NUM, \
|
||||
.data = &PSDAT ## NUM, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
struct Ps2 __code PS2_1 = PS2(1);
|
||||
struct Ps2 __code PS2_2 = PS2(2);
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <ec/espi.h>
|
||||
|
||||
// clang-format off
|
||||
#if EC_ESPI
|
||||
// eSPI signature (byte 7 = 0xA4)
|
||||
static __code const uint8_t __at(0x40) SIGNATURE[16] = {
|
||||
@@ -15,3 +16,4 @@ static __code const uint8_t __at(0x40) SIGNATURE[16] = {
|
||||
0x85, 0x12, 0x5A, 0x5A, 0xAA, 0x00, 0x55, 0x55,
|
||||
};
|
||||
#endif // EC_ESPI
|
||||
// clang-format on
|
||||
|
Reference in New Issue
Block a user