[Utils] btn_wait_timeout

- Allow btn_wait_timeout to be triggered immediately
- Make power options global
This commit is contained in:
Kostas Missos
2019-03-08 00:22:15 +02:00
parent 0ddc1c71a8
commit e7f72b711a
5 changed files with 70 additions and 64 deletions

View File

@@ -20,12 +20,12 @@
#include "types.h"
#define BTN_POWER 0x1
#define BTN_VOL_DOWN 0x2
#define BTN_VOL_UP 0x4
#define BTN_POWER (1 << 0)
#define BTN_VOL_DOWN (1 << 1)
#define BTN_VOL_UP (1 << 2)
u32 btn_read();
u32 btn_wait();
u32 btn_wait_timeout(u32 time_ms, u32 mask);
u8 btn_read();
u8 btn_wait();
u8 btn_wait_timeout(u32 time_ms, u8 mask);
#endif