forked from kofal.net/zmk
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
This commit is contained in:
@@ -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);
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user