mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
host_command: Add host_is_event_set
host_is_event_set checks whether a given event is set or not. BUG=none BRANCH=none TEST=make buildall Change-Id: I7207fa75d155d5b9adc50430bc1ed703bea7c1b9 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/514208 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
8e60deda9d
commit
abb8be8b64
@@ -161,6 +161,17 @@ void host_clear_events(uint32_t mask);
|
||||
* Return the raw event state.
|
||||
*/
|
||||
uint32_t host_get_events(void);
|
||||
|
||||
/**
|
||||
* Check a single host event.
|
||||
*
|
||||
* @param event Event to check
|
||||
* @return true if <event> is set or false otherwise
|
||||
*/
|
||||
static inline int host_is_event_set(enum host_event_code event)
|
||||
{
|
||||
return host_get_events() & EC_HOST_EVENT_MASK(event);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user