summaryrefslogtreecommitdiff
path: root/app/src/kscan.c
diff options
context:
space:
mode:
authorinnovaker <66737976+innovaker@users.noreply.github.com>2020-12-02 16:41:57 +0000
committerPete Johanson <peter@peterjohanson.com>2020-12-14 12:41:25 -0500
commitbac1f17cf6ce225876dc7b6b2a809bcd98010391 (patch)
tree9783743b31fdadd66d1b3c9e5a3e14dc661ec313 /app/src/kscan.c
parenta4652fa25da83ae036613157fb566eb1ce1426fe (diff)
refactor(app): replace Zephyr integer types with C99 integer types
u8_t → uint8_t u16_t → uint16_t u32_t → uint32_t u64_t → uint64_t s8_t → int8_t s16_t → int16_t s32_t → int32_t s64_t → int64_t Prerequisite for #223 See: https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v2.4.0 PR: #467
Diffstat (limited to 'app/src/kscan.c')
-rw-r--r--app/src/kscan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/src/kscan.c b/app/src/kscan.c
index 8575e70..b6ffc37 100644
--- a/app/src/kscan.c
+++ b/app/src/kscan.c
@@ -19,9 +19,9 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#define ZMK_KSCAN_EVENT_STATE_RELEASED 1
struct zmk_kscan_event {
- u32_t row;
- u32_t column;
- u32_t state;
+ uint32_t row;
+ uint32_t column;
+ uint32_t state;
};
struct zmk_kscan_msg_processor {
@@ -30,7 +30,7 @@ struct zmk_kscan_msg_processor {
K_MSGQ_DEFINE(zmk_kscan_msgq, sizeof(struct zmk_kscan_event), CONFIG_ZMK_KSCAN_EVENT_QUEUE_SIZE, 4);
-static void zmk_kscan_callback(struct device *dev, u32_t row, u32_t column, bool pressed) {
+static void zmk_kscan_callback(struct device *dev, uint32_t row, uint32_t column, bool pressed) {
struct zmk_kscan_event ev = {
.row = row,
.column = column,
@@ -45,7 +45,7 @@ void zmk_kscan_process_msgq(struct k_work *item) {
while (k_msgq_get(&zmk_kscan_msgq, &ev, K_NO_WAIT) == 0) {
bool pressed = (ev.state == ZMK_KSCAN_EVENT_STATE_PRESSED);
- u32_t position = zmk_matrix_transform_row_column_to_position(ev.row, ev.column);
+ uint32_t position = zmk_matrix_transform_row_column_to_position(ev.row, ev.column);
struct position_state_changed *pos_ev;
LOG_DBG("Row: %d, col: %d, position: %d, pressed: %s\n", ev.row, ev.column, position,
(pressed ? "true" : "false"));