Skip to content

Commit

Permalink
To avoid concurrency issue, do not touch queue time in ISR land
Browse files Browse the repository at this point in the history
  • Loading branch information
pichenettes committed May 25, 2012
1 parent c7a4814 commit 8bf4e30
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ui/event_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class EventQueue {
};

static void AddEvent(uint8_t control_type, uint8_t id, uint8_t data) {
Touch();
Word v;
v.bytes[0] = U8ShiftLeft4(control_type) | (id & 0x0f);
v.bytes[1] = data;
Expand All @@ -69,7 +68,7 @@ class EventQueue {
return events_.readable();
}

static uint32_t idle_time() {
static uint16_t idle_time() {
uint32_t now = milliseconds();
return static_cast<uint16_t>(now - last_event_time_) >> 8;
}
Expand Down

0 comments on commit 8bf4e30

Please sign in to comment.