Skip to content

Commit

Permalink
Run cformat and dos2unix manually (qmk#11235)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored Dec 17, 2020
1 parent d9dcb71 commit 6ea4b06
Show file tree
Hide file tree
Showing 15 changed files with 550 additions and 570 deletions.
12 changes: 6 additions & 6 deletions drivers/chibios/ws2812_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
*
* @return The bit index
*/
# define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit))
# define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit))

/**
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit
Expand All @@ -130,7 +130,7 @@
*
* @return The bit index
*/
# define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit))
# define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit))

/**
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit
Expand All @@ -142,7 +142,7 @@
*
* @return The bit index
*/
# define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
# define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))

#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB)
/**
Expand All @@ -155,7 +155,7 @@
*
* @return The bit index
*/
# define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 0, (bit))
# define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 0, (bit))

/**
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit
Expand All @@ -167,7 +167,7 @@
*
* @return The bit index
*/
# define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 1, (bit))
# define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 1, (bit))

/**
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit
Expand All @@ -179,7 +179,7 @@
*
* @return The bit index
*/
# define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
# define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
#endif

/* --- PRIVATE VARIABLES ---------------------------------------------------- */
Expand Down
2 changes: 1 addition & 1 deletion drivers/chibios/ws2812_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static void set_led_color_rgb(LED_TYPE color, int pos) {
#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB)
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + j] = get_protocol_eq(color.r, j);
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE + j] = get_protocol_eq(color.g, j);
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.b, j);
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.b, j);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/issi/is31fl3731-simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}};
#elif LED_DRIVER_COUNT == 4
uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}};
#endif
bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false};
bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false};

// This is the bit pattern in the LED control registers
// (for matrix A, add one to register for matrix B)
Expand Down
6 changes: 3 additions & 3 deletions keyboards/mt64rgb/keymaps/default/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Default mt4rgb Layout

This is the default layout that comes flashed on every mt64rgb. All key pins are shown in the file.
# Default mt4rgb Layout

This is the default layout that comes flashed on every mt64rgb. All key pins are shown in the file.
32 changes: 16 additions & 16 deletions keyboards/mt64rgb/readme.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# mt64rgb

![mt64rgb](https://i.imgur.com/kxGGUg9.jpg?1)

A 60% keyboard PCB made by MT.
It supports an ANSI-based 64-key layout, with hotswap sockets and per-key RGB backlight.

* Keyboard Maintainer: [MT](https://github.com/704340378)
* Hardware Supported: mt64rgb (atmega32u4)
* Hardware Availability: [麦田外设](https://shop110310565.taobao.com)

Make example for this keyboard (after setting up your build environment):

make mt64rgb:default

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
# mt64rgb

![mt64rgb](https://i.imgur.com/kxGGUg9.jpg?1)

A 60% keyboard PCB made by MT.
It supports an ANSI-based 64-key layout, with hotswap sockets and per-key RGB backlight.

* Keyboard Maintainer: [MT](https://github.com/704340378)
* Hardware Supported: mt64rgb (atmega32u4)
* Hardware Availability: [麦田外设](https://shop110310565.taobao.com)

Make example for this keyboard (after setting up your build environment):

make mt64rgb:default

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
2 changes: 1 addition & 1 deletion keyboards/zinc/keymaps/default/readme_en.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The Default Zinc Layout
# The Default Zinc Layout
## layout

### Qwerty
Expand Down
10 changes: 5 additions & 5 deletions quantum/debounce/sym_defer_pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ static bool counters_need_update;
#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)

static uint8_t wrapping_timer_read(void) {
static uint16_t time = 0;
static uint16_t time = 0;
static uint8_t last_result = 0;
uint16_t new_time = timer_read();
uint16_t diff = new_time - time;
time = new_time;
last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
uint16_t new_time = timer_read();
uint16_t diff = new_time - time;
time = new_time;
last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
return last_result;
}

Expand Down
20 changes: 5 additions & 15 deletions quantum/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ static inline void setPinOutput_writeLow(pin_t pin) {
}

static inline void setPinInputHigh_atomic(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
setPinInputHigh(pin);
}
ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); }
}

// matrix code
Expand Down Expand Up @@ -82,13 +80,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
#elif defined(DIODE_DIRECTION)
# if (DIODE_DIRECTION == COL2ROW)

static void select_row(uint8_t row) {
setPinOutput_writeLow(row_pins[row]);
}
static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }

static void unselect_row(uint8_t row) {
setPinInputHigh_atomic(row_pins[row]);
}
static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); }

static void unselect_rows(void) {
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
Expand Down Expand Up @@ -133,13 +127,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)

# elif (DIODE_DIRECTION == ROW2COL)

static void select_col(uint8_t col) {
setPinOutput_writeLow(col_pins[col]);
}
static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }

static void unselect_col(uint8_t col) {
setPinInputHigh_atomic(col_pins[col]);
}
static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); }

static void unselect_cols(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
Expand Down
20 changes: 5 additions & 15 deletions quantum/split_common/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ static inline void setPinOutput_writeLow(pin_t pin) {
}

static inline void setPinInputHigh_atomic(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
setPinInputHigh(pin);
}
ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); }
}

// matrix code
Expand Down Expand Up @@ -95,13 +93,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
#elif defined(DIODE_DIRECTION)
# if (DIODE_DIRECTION == COL2ROW)

static void select_row(uint8_t row) {
setPinOutput_writeLow(row_pins[row]);
}
static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }

static void unselect_row(uint8_t row) {
setPinInputHigh_atomic(row_pins[row]);
}
static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); }

static void unselect_rows(void) {
for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
Expand Down Expand Up @@ -146,13 +140,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)

# elif (DIODE_DIRECTION == ROW2COL)

static void select_col(uint8_t col) {
setPinOutput_writeLow(col_pins[col]);
}
static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }

static void unselect_col(uint8_t col) {
setPinInputHigh_atomic(col_pins[col]);
}
static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); }

static void unselect_cols(void) {
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
Expand Down
8 changes: 4 additions & 4 deletions quantum/split_common/split_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) {
uint8_t pin_state = readPin(in_pin);
// Set out_pin to a setting that is less susceptible to noise.
setPinInputHigh(out_pin);
matrix_io_delay(); // Wait for the pull-up to go HIGH.
matrix_io_delay(); // Wait for the pull-up to go HIGH.
return pin_state;
}
#endif
Expand All @@ -106,11 +106,11 @@ __attribute__((weak)) bool is_keyboard_left(void) {
setPinInput(SPLIT_HAND_PIN);
return readPin(SPLIT_HAND_PIN);
#elif defined(SPLIT_HAND_MATRIX_GRID)
# ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
# ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID);
# else
# else
return !peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID);
# endif
# endif
#elif defined(EE_HANDS)
return eeconfig_read_handedness();
#elif defined(MASTER_RIGHT)
Expand Down
4 changes: 2 additions & 2 deletions tmk_core/protocol/arm_atsam/usb/udi_device_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ typedef struct {
extern uint8_t udi_hid_kbd_report_set;

// 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];

COMPILER_PACK_RESET()
Expand Down Expand Up @@ -784,7 +784,7 @@ COMPILER_PACK_RESET()
COMPILER_PACK_SET(1)

typedef struct {
usb_conf_desc_t conf;
usb_conf_desc_t conf;
udi_hid_kbd_desc_t hid_kbd;
#ifdef MOUSE_ENABLE
udi_hid_mou_desc_t hid_mou;
Expand Down
4 changes: 2 additions & 2 deletions tmk_core/protocol/arm_atsam/usb/udi_hid_kbd_desc.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {.bLength = sizeof(usb
#ifdef USB_DEVICE_PRODUCT_NAME
.iProduct = 2,
#else
.iProduct = 0, // No product string
.iProduct = 0, // No product string
#endif
#if (defined USB_DEVICE_SERIAL_NAME || defined USB_DEVICE_GET_SERIAL_NAME_POINTER)
.iSerialNumber = 3,
Expand Down Expand Up @@ -120,7 +120,7 @@ UDC_DESC_STORAGE udc_desc_t udc_desc = {
.conf.iConfiguration = 0,
.conf.bmAttributes = /* USB_CONFIG_ATTR_MUST_SET | */ USB_DEVICE_ATTR,
.conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
.hid_kbd = UDI_HID_KBD_DESC,
.hid_kbd = UDI_HID_KBD_DESC,
#ifdef RAW_ENABLE
.hid_raw = UDI_HID_RAW_DESC,
#endif
Expand Down
Loading

0 comments on commit 6ea4b06

Please sign in to comment.