Run cformat and dos2unix manually (#11235)

This commit is contained in:
Ryan 2020-12-18 01:06:30 +11:00 committed by GitHub
parent d9dcb716bf
commit 6ea4b06f9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 188 additions and 208 deletions

View File

@ -1,4 +1,4 @@
# The Default Zinc Layout # The Default Zinc Layout
## layout ## layout
### Qwerty ### Qwerty

View File

@ -40,9 +40,7 @@ static inline void setPinOutput_writeLow(pin_t pin) {
} }
static inline void setPinInputHigh_atomic(pin_t pin) { static inline void setPinInputHigh_atomic(pin_t pin) {
ATOMIC_BLOCK_FORCEON { ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); }
setPinInputHigh(pin);
}
} }
// matrix code // matrix code
@ -82,13 +80,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
#elif defined(DIODE_DIRECTION) #elif defined(DIODE_DIRECTION)
# if (DIODE_DIRECTION == COL2ROW) # if (DIODE_DIRECTION == COL2ROW)
static void select_row(uint8_t row) { static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }
setPinOutput_writeLow(row_pins[row]);
}
static void unselect_row(uint8_t row) { static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); }
setPinInputHigh_atomic(row_pins[row]);
}
static void unselect_rows(void) { static void unselect_rows(void) {
for (uint8_t x = 0; x < MATRIX_ROWS; x++) { for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
@ -133,13 +127,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
# elif (DIODE_DIRECTION == ROW2COL) # elif (DIODE_DIRECTION == ROW2COL)
static void select_col(uint8_t col) { static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }
setPinOutput_writeLow(col_pins[col]);
}
static void unselect_col(uint8_t col) { static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); }
setPinInputHigh_atomic(col_pins[col]);
}
static void unselect_cols(void) { static void unselect_cols(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) { for (uint8_t x = 0; x < MATRIX_COLS; x++) {

View File

@ -53,9 +53,7 @@ static inline void setPinOutput_writeLow(pin_t pin) {
} }
static inline void setPinInputHigh_atomic(pin_t pin) { static inline void setPinInputHigh_atomic(pin_t pin) {
ATOMIC_BLOCK_FORCEON { ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); }
setPinInputHigh(pin);
}
} }
// matrix code // matrix code
@ -95,13 +93,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
#elif defined(DIODE_DIRECTION) #elif defined(DIODE_DIRECTION)
# if (DIODE_DIRECTION == COL2ROW) # if (DIODE_DIRECTION == COL2ROW)
static void select_row(uint8_t row) { static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }
setPinOutput_writeLow(row_pins[row]);
}
static void unselect_row(uint8_t row) { static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); }
setPinInputHigh_atomic(row_pins[row]);
}
static void unselect_rows(void) { static void unselect_rows(void) {
for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
@ -146,13 +140,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
# elif (DIODE_DIRECTION == ROW2COL) # elif (DIODE_DIRECTION == ROW2COL)
static void select_col(uint8_t col) { static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }
setPinOutput_writeLow(col_pins[col]);
}
static void unselect_col(uint8_t col) { static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); }
setPinInputHigh_atomic(col_pins[col]);
}
static void unselect_cols(void) { static void unselect_cols(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) { for (uint8_t x = 0; x < MATRIX_COLS; x++) {

View File

@ -291,7 +291,7 @@ typedef struct {
extern uint8_t udi_hid_kbd_report_set; extern uint8_t udi_hid_kbd_report_set;
// report buffer (to host) // report buffer (to host)
# define UDI_HID_KBD_REPORT_SIZE 8 #define UDI_HID_KBD_REPORT_SIZE 8
extern uint8_t udi_hid_kbd_report[UDI_HID_KBD_REPORT_SIZE]; extern uint8_t udi_hid_kbd_report[UDI_HID_KBD_REPORT_SIZE];
COMPILER_PACK_RESET() COMPILER_PACK_RESET()

View File

@ -194,7 +194,7 @@ typedef struct {
#if STM32_USB_USE_OTG1 #if STM32_USB_USE_OTG1
/* Reusable initialization structure - see USBEndpointConfig comment at top of file */ /* Reusable initialization structure - see USBEndpointConfig comment at top of file */
#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \ # define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
{ \ { \
.queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \ .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
.inout_ep_config = \ .inout_ep_config = \
@ -239,7 +239,7 @@ typedef struct {
} }
#else #else
/* Reusable initialization structure - see USBEndpointConfig comment at top of file */ /* Reusable initialization structure - see USBEndpointConfig comment at top of file */
#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \ # define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
{ \ { \
.queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \ .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
.in_ep_config = \ .in_ep_config = \
@ -388,12 +388,12 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) {
usbInitEndpointI(usbp, SHARED_IN_EPNUM, &shared_ep_config); usbInitEndpointI(usbp, SHARED_IN_EPNUM, &shared_ep_config);
#endif #endif
for (int i = 0; i < NUM_USB_DRIVERS; i++) { for (int i = 0; i < NUM_USB_DRIVERS; i++) {
#if STM32_USB_USE_OTG1 #if STM32_USB_USE_OTG1
usbInitEndpointI(usbp, drivers.array[i].config.bulk_in, &drivers.array[i].inout_ep_config); usbInitEndpointI(usbp, drivers.array[i].config.bulk_in, &drivers.array[i].inout_ep_config);
#else #else
usbInitEndpointI(usbp, drivers.array[i].config.bulk_in, &drivers.array[i].in_ep_config); usbInitEndpointI(usbp, drivers.array[i].config.bulk_in, &drivers.array[i].in_ep_config);
usbInitEndpointI(usbp, drivers.array[i].config.bulk_out, &drivers.array[i].out_ep_config); usbInitEndpointI(usbp, drivers.array[i].config.bulk_out, &drivers.array[i].out_ep_config);
#endif #endif
if (drivers.array[i].config.int_in) { if (drivers.array[i].config.int_in) {
usbInitEndpointI(usbp, drivers.array[i].config.int_in, &drivers.array[i].int_ep_config); usbInitEndpointI(usbp, drivers.array[i].config.int_in, &drivers.array[i].int_ep_config);
} }
@ -618,21 +618,21 @@ static const USBConfig usbcfg = {
*/ */
void init_usb_driver(USBDriver *usbp) { void init_usb_driver(USBDriver *usbp) {
for (int i = 0; i < NUM_USB_DRIVERS; i++) { for (int i = 0; i < NUM_USB_DRIVERS; i++) {
#if STM32_USB_USE_OTG1 #if STM32_USB_USE_OTG1
QMKUSBDriver *driver = &drivers.array[i].driver; QMKUSBDriver *driver = &drivers.array[i].driver;
drivers.array[i].inout_ep_config.in_state = &drivers.array[i].in_ep_state; drivers.array[i].inout_ep_config.in_state = &drivers.array[i].in_ep_state;
drivers.array[i].inout_ep_config.out_state = &drivers.array[i].out_ep_state; drivers.array[i].inout_ep_config.out_state = &drivers.array[i].out_ep_state;
drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state; drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state;
qmkusbObjectInit(driver, &drivers.array[i].config); qmkusbObjectInit(driver, &drivers.array[i].config);
qmkusbStart(driver, &drivers.array[i].config); qmkusbStart(driver, &drivers.array[i].config);
#else #else
QMKUSBDriver *driver = &drivers.array[i].driver; QMKUSBDriver *driver = &drivers.array[i].driver;
drivers.array[i].in_ep_config.in_state = &drivers.array[i].in_ep_state; drivers.array[i].in_ep_config.in_state = &drivers.array[i].in_ep_state;
drivers.array[i].out_ep_config.out_state = &drivers.array[i].out_ep_state; drivers.array[i].out_ep_config.out_state = &drivers.array[i].out_ep_state;
drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state; drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state;
qmkusbObjectInit(driver, &drivers.array[i].config); qmkusbObjectInit(driver, &drivers.array[i].config);
qmkusbStart(driver, &drivers.array[i].config); qmkusbStart(driver, &drivers.array[i].config);
#endif #endif
} }
/* /*

View File

@ -205,11 +205,11 @@ enum usb_endpoints {
#ifdef RAW_ENABLE #ifdef RAW_ENABLE
RAW_IN_EPNUM = NEXT_EPNUM, RAW_IN_EPNUM = NEXT_EPNUM,
#if STM32_USB_USE_OTG1 # if STM32_USB_USE_OTG1
#define RAW_OUT_EPNUM RAW_IN_EPNUM # define RAW_OUT_EPNUM RAW_IN_EPNUM
#else # else
RAW_OUT_EPNUM = NEXT_EPNUM, RAW_OUT_EPNUM = NEXT_EPNUM,
#endif # endif
#endif #endif
#ifdef SHARED_EP_ENABLE #ifdef SHARED_EP_ENABLE
@ -220,14 +220,14 @@ enum usb_endpoints {
CONSOLE_IN_EPNUM = NEXT_EPNUM, CONSOLE_IN_EPNUM = NEXT_EPNUM,
# ifdef PROTOCOL_CHIBIOS # ifdef PROTOCOL_CHIBIOS
// ChibiOS has enough memory and descriptor to actually enable the endpoint // ChibiOS has enough memory and descriptor to actually enable the endpoint
// It could use the same endpoint numbers, as that's supported by ChibiOS // It could use the same endpoint numbers, as that's supported by ChibiOS
// But the QMK code currently assumes that the endpoint numbers are different // But the QMK code currently assumes that the endpoint numbers are different
#if STM32_USB_USE_OTG1 # if STM32_USB_USE_OTG1
#define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM # define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM
#else # else
CONSOLE_OUT_EPNUM = NEXT_EPNUM, CONSOLE_OUT_EPNUM = NEXT_EPNUM,
#endif # endif
# else # else
# define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM # define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM
# endif # endif
@ -235,29 +235,29 @@ enum usb_endpoints {
#ifdef MIDI_ENABLE #ifdef MIDI_ENABLE
MIDI_STREAM_IN_EPNUM = NEXT_EPNUM, MIDI_STREAM_IN_EPNUM = NEXT_EPNUM,
#if STM32_USB_USE_OTG1 # if STM32_USB_USE_OTG1
#define MIDI_STREAM_OUT_EPNUM MIDI_STREAM_IN_EPNUM # define MIDI_STREAM_OUT_EPNUM MIDI_STREAM_IN_EPNUM
#else # else
MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM, MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM,
#endif # endif
#endif #endif
#ifdef VIRTSER_ENABLE #ifdef VIRTSER_ENABLE
CDC_NOTIFICATION_EPNUM = NEXT_EPNUM, CDC_NOTIFICATION_EPNUM = NEXT_EPNUM,
CDC_IN_EPNUM = NEXT_EPNUM, CDC_IN_EPNUM = NEXT_EPNUM,
#if STM32_USB_USE_OTG1 # if STM32_USB_USE_OTG1
#define CDC_OUT_EPNUM CDC_IN_EPNUM # define CDC_OUT_EPNUM CDC_IN_EPNUM
#else # else
CDC_OUT_EPNUM = NEXT_EPNUM, CDC_OUT_EPNUM = NEXT_EPNUM,
#endif # endif
#endif #endif
#ifdef JOYSTICK_ENABLE #ifdef JOYSTICK_ENABLE
JOYSTICK_IN_EPNUM = NEXT_EPNUM, JOYSTICK_IN_EPNUM = NEXT_EPNUM,
#if STM32_USB_USE_OTG1 # if STM32_USB_USE_OTG1
JOYSTICK_OUT_EPNUM = JOYSTICK_IN_EPNUM, JOYSTICK_OUT_EPNUM = JOYSTICK_IN_EPNUM,
#else # else
JOYSTICK_OUT_EPNUM = NEXT_EPNUM, JOYSTICK_OUT_EPNUM = NEXT_EPNUM,
#endif # endif
#endif #endif
}; };

Binary file not shown.