Removed all of the compiler warnings
This commit is contained in:
committed by
Alessandro Genova
parent
994c12cc30
commit
51ca839f3b
+2
-2
@@ -326,13 +326,13 @@ static void _movement_handle_button_presses(uint32_t pending_events) {
|
||||
}
|
||||
|
||||
// If a long press occurred
|
||||
if (pending_events & (1 << button->down_event + 2)) {
|
||||
if (pending_events & (1 << (button->down_event + 2))) {
|
||||
watch_rtc_register_comp_callback_no_schedule(button->cb_longpress, button->down_timestamp + MOVEMENT_REALLY_LONG_PRESS_TICKS, button->timeout_index);
|
||||
any_long = true;
|
||||
}
|
||||
|
||||
// If a really long press occurred
|
||||
if (pending_events & (1 << button->down_event + 4)) {
|
||||
if (pending_events & (1 << (button->down_event + 4))) {
|
||||
watch_rtc_register_comp_callback_no_schedule(button->cb_longpress, button->down_timestamp + MOVEMENT_MAX_LONG_PRESS_TICKS, button->timeout_index);
|
||||
any_long = true;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ static void _rtccount_face_draw(movement_event_t event, rtccount_state_t* state)
|
||||
|
||||
switch (state->status) {
|
||||
case RTCCOUNT_STATUS_COUNTER: {
|
||||
snprintf(buf, sizeof(buf), "%u", counter & COUNTER_MASK);
|
||||
snprintf(buf, sizeof(buf), "%lu", counter & COUNTER_MASK);
|
||||
|
||||
size_t len = strlen(buf);
|
||||
|
||||
@@ -102,7 +102,7 @@ static void _rtccount_face_draw(movement_event_t event, rtccount_state_t* state)
|
||||
}
|
||||
|
||||
case RTCCOUNT_STATUS_COUNTER_SUB: {
|
||||
snprintf(buf, sizeof(buf), "%u", counter & 127);
|
||||
snprintf(buf, sizeof(buf), "%lu", counter & 127);
|
||||
|
||||
size_t len = strlen(buf);
|
||||
|
||||
@@ -111,7 +111,7 @@ static void _rtccount_face_draw(movement_event_t event, rtccount_state_t* state)
|
||||
}
|
||||
|
||||
case RTCCOUNT_STATUS_MINUTES: {
|
||||
snprintf(buf, sizeof(buf), "%u", state->n_top_of_minute & COUNTER_MASK);
|
||||
snprintf(buf, sizeof(buf), "%lu", state->n_top_of_minute & COUNTER_MASK);
|
||||
|
||||
size_t len = strlen(buf);
|
||||
|
||||
@@ -122,7 +122,7 @@ static void _rtccount_face_draw(movement_event_t event, rtccount_state_t* state)
|
||||
case RTCCOUNT_STATUS_MINUTES_DIFF: {
|
||||
uint32_t elapsed_minutes = (movement_get_utc_timestamp() - state->ref_timestamp) / 60;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%u", (elapsed_minutes - state->n_top_of_minute) & COUNTER_MASK);
|
||||
snprintf(buf, sizeof(buf), "%lu", (elapsed_minutes - state->n_top_of_minute) & COUNTER_MASK);
|
||||
|
||||
size_t len = strlen(buf);
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ static const uint32_t RTC_CNT_HZ = RTC_OSC_HZ >> RTC_PRESCALER_DIV; // 1024 / 2^
|
||||
static const uint32_t RTC_CNT_SUBSECOND_MASK = RTC_CNT_HZ - 1;
|
||||
static const uint32_t RTC_CNT_DIV = RTC_OSC_DIV - RTC_PRESCALER_DIV; // 7
|
||||
static const uint32_t RTC_CNT_TICKS_PER_MINUTE = RTC_CNT_HZ * 60;
|
||||
static const uint32_t RTC_CNT_TICKS_PER_HOUR = RTC_CNT_TICKS_PER_MINUTE * 60;
|
||||
|
||||
static const uint32_t RTC_COMP_GRACE_PERIOD = 4;
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ static const uint32_t RTC_CNT_HZ = 128;
|
||||
static const uint32_t RTC_CNT_SUBSECOND_MASK = RTC_CNT_HZ - 1;
|
||||
static const uint32_t RTC_CNT_DIV = 7;
|
||||
static const uint32_t RTC_CNT_TICKS_PER_MINUTE = RTC_CNT_HZ * 60;
|
||||
static const uint32_t RTC_CNT_TICKS_PER_HOUR = RTC_CNT_TICKS_PER_MINUTE * 60;
|
||||
|
||||
static uint32_t counter_interval;
|
||||
static uint32_t counter;
|
||||
|
||||
Reference in New Issue
Block a user