summaryrefslogtreecommitdiff
path: root/app/include/zmk/events
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/include/zmk/events
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/include/zmk/events')
-rw-r--r--app/include/zmk/events/battery-state-changed.h2
-rw-r--r--app/include/zmk/events/ble-active-profile-changed.h2
-rw-r--r--app/include/zmk/events/keycode-state-changed.h14
-rw-r--r--app/include/zmk/events/layer-state-changed.h6
-rw-r--r--app/include/zmk/events/position-state-changed.h4
-rw-r--r--app/include/zmk/events/sensor-event.h4
6 files changed, 16 insertions, 16 deletions
diff --git a/app/include/zmk/events/battery-state-changed.h b/app/include/zmk/events/battery-state-changed.h
index a590170..a983820 100644
--- a/app/include/zmk/events/battery-state-changed.h
+++ b/app/include/zmk/events/battery-state-changed.h
@@ -12,7 +12,7 @@
struct battery_state_changed {
struct zmk_event_header header;
// TODO: Other battery channels
- u8_t state_of_charge;
+ uint8_t state_of_charge;
};
ZMK_EVENT_DECLARE(battery_state_changed); \ No newline at end of file
diff --git a/app/include/zmk/events/ble-active-profile-changed.h b/app/include/zmk/events/ble-active-profile-changed.h
index 1e3a198..4491dfc 100644
--- a/app/include/zmk/events/ble-active-profile-changed.h
+++ b/app/include/zmk/events/ble-active-profile-changed.h
@@ -14,7 +14,7 @@
struct ble_active_profile_changed {
struct zmk_event_header header;
- u8_t index;
+ uint8_t index;
struct zmk_ble_profile *profile;
};
diff --git a/app/include/zmk/events/keycode-state-changed.h b/app/include/zmk/events/keycode-state-changed.h
index a0e2436..7dc87e2 100644
--- a/app/include/zmk/events/keycode-state-changed.h
+++ b/app/include/zmk/events/keycode-state-changed.h
@@ -14,19 +14,19 @@
struct keycode_state_changed {
struct zmk_event_header header;
- u8_t usage_page;
- u32_t keycode;
- u8_t implicit_modifiers;
+ uint8_t usage_page;
+ uint32_t keycode;
+ uint8_t implicit_modifiers;
bool state;
- s64_t timestamp;
+ int64_t timestamp;
};
ZMK_EVENT_DECLARE(keycode_state_changed);
static inline struct keycode_state_changed *
-keycode_state_changed_from_encoded(u32_t encoded, bool pressed, s64_t timestamp) {
- u16_t page = HID_USAGE_PAGE(encoded) & 0xFF;
- u16_t id = HID_USAGE_ID(encoded);
+keycode_state_changed_from_encoded(uint32_t encoded, bool pressed, int64_t timestamp) {
+ uint16_t page = HID_USAGE_PAGE(encoded) & 0xFF;
+ uint16_t id = HID_USAGE_ID(encoded);
zmk_mod_flags implicit_mods = SELECT_MODS(encoded);
if (!page) {
diff --git a/app/include/zmk/events/layer-state-changed.h b/app/include/zmk/events/layer-state-changed.h
index dc13ed6..352c602 100644
--- a/app/include/zmk/events/layer-state-changed.h
+++ b/app/include/zmk/events/layer-state-changed.h
@@ -11,14 +11,14 @@
struct layer_state_changed {
struct zmk_event_header header;
- u8_t layer;
+ uint8_t layer;
bool state;
- s64_t timestamp;
+ int64_t timestamp;
};
ZMK_EVENT_DECLARE(layer_state_changed);
-static inline struct layer_state_changed *create_layer_state_changed(u8_t layer, bool state) {
+static inline struct layer_state_changed *create_layer_state_changed(uint8_t layer, bool state) {
struct layer_state_changed *ev = new_layer_state_changed();
ev->layer = layer;
ev->state = state;
diff --git a/app/include/zmk/events/position-state-changed.h b/app/include/zmk/events/position-state-changed.h
index e4cbbbe..7058276 100644
--- a/app/include/zmk/events/position-state-changed.h
+++ b/app/include/zmk/events/position-state-changed.h
@@ -11,9 +11,9 @@
struct position_state_changed {
struct zmk_event_header header;
- u32_t position;
+ uint32_t position;
bool state;
- s64_t timestamp;
+ int64_t timestamp;
};
ZMK_EVENT_DECLARE(position_state_changed); \ No newline at end of file
diff --git a/app/include/zmk/events/sensor-event.h b/app/include/zmk/events/sensor-event.h
index 688f7de..d1d72f4 100644
--- a/app/include/zmk/events/sensor-event.h
+++ b/app/include/zmk/events/sensor-event.h
@@ -12,9 +12,9 @@
struct sensor_event {
struct zmk_event_header header;
- u8_t sensor_number;
+ uint8_t sensor_number;
struct device *sensor;
- s64_t timestamp;
+ int64_t timestamp;
};
ZMK_EVENT_DECLARE(sensor_event); \ No newline at end of file