summaryrefslogtreecommitdiff
path: root/keyboards/ploopyco
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ploopyco')
-rw-r--r--keyboards/ploopyco/mouse/mouse.c4
-rw-r--r--keyboards/ploopyco/trackball/trackball.c4
-rw-r--r--keyboards/ploopyco/trackball_mini/trackball_mini.c4
-rw-r--r--keyboards/ploopyco/trackball_nano/trackball_nano.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/keyboards/ploopyco/mouse/mouse.c b/keyboards/ploopyco/mouse/mouse.c
index 19bc17738e..abcaa276d9 100644
--- a/keyboards/ploopyco/mouse/mouse.c
+++ b/keyboards/ploopyco/mouse/mouse.c
@@ -49,7 +49,7 @@
keyboard_config_t keyboard_config;
uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS;
-#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t))
+#define DPI_OPTION_SIZE ARRAY_SIZE(dpi_array)
// TODO: Implement libinput profiles
// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html
@@ -202,7 +202,7 @@ void keyboard_pre_init_kb(void) {
#ifdef UNUSABLE_PINS
const pin_t unused_pins[] = UNUSABLE_PINS;
- for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) {
+ for (uint8_t i = 0; i < ARRAY_SIZE(unused_pins); i++) {
setPinOutput(unused_pins[i]);
writePinLow(unused_pins[i]);
}
diff --git a/keyboards/ploopyco/trackball/trackball.c b/keyboards/ploopyco/trackball/trackball.c
index 786b40f9e8..c96bf15cba 100644
--- a/keyboards/ploopyco/trackball/trackball.c
+++ b/keyboards/ploopyco/trackball/trackball.c
@@ -49,7 +49,7 @@
keyboard_config_t keyboard_config;
uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS;
-#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t))
+#define DPI_OPTION_SIZE ARRAY_SIZE(dpi_array)
// TODO: Implement libinput profiles
// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html
@@ -207,7 +207,7 @@ void keyboard_pre_init_kb(void) {
#ifdef UNUSABLE_PINS
const pin_t unused_pins[] = UNUSABLE_PINS;
- for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) {
+ for (uint8_t i = 0; i < ARRAY_SIZE(unused_pins); i++) {
setPinOutput(unused_pins[i]);
writePinLow(unused_pins[i]);
}
diff --git a/keyboards/ploopyco/trackball_mini/trackball_mini.c b/keyboards/ploopyco/trackball_mini/trackball_mini.c
index df13912af4..dc3708fd51 100644
--- a/keyboards/ploopyco/trackball_mini/trackball_mini.c
+++ b/keyboards/ploopyco/trackball_mini/trackball_mini.c
@@ -57,7 +57,7 @@
keyboard_config_t keyboard_config;
uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS;
-#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t))
+#define DPI_OPTION_SIZE ARRAY_SIZE(dpi_array)
// TODO: Implement libinput profiles
// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html
@@ -203,7 +203,7 @@ void keyboard_pre_init_kb(void) {
#ifdef UNUSABLE_PINS
const pin_t unused_pins[] = UNUSABLE_PINS;
- for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) {
+ for (uint8_t i = 0; i < ARRAY_SIZE(unused_pins); i++) {
setPinOutput(unused_pins[i]);
writePinLow(unused_pins[i]);
}
diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.c b/keyboards/ploopyco/trackball_nano/trackball_nano.c
index eb1d8e10b0..366918e134 100644
--- a/keyboards/ploopyco/trackball_nano/trackball_nano.c
+++ b/keyboards/ploopyco/trackball_nano/trackball_nano.c
@@ -50,7 +50,7 @@
keyboard_config_t keyboard_config;
uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS;
-#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t))
+#define DPI_OPTION_SIZE ARRAY_SIZE(dpi_array)
void cycle_dpi(void) {
keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE;
@@ -89,7 +89,7 @@ void keyboard_pre_init_kb(void) {
#ifdef UNUSABLE_PINS
const pin_t unused_pins[] = UNUSABLE_PINS;
- for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) {
+ for (uint8_t i = 0; i < ARRAY_SIZE(unused_pins); i++) {
setPinOutput(unused_pins[i]);
writePinLow(unused_pins[i]);
}