mbed libraries for KL25Z
Diff: us_ticker_api.h
- Revision:
- 8:c14af7958ef5
- Parent:
- 0:8024c367e29f
- Child:
- 9:663789d7729f
--- a/us_ticker_api.h Tue Oct 23 09:20:18 2012 +0000 +++ b/us_ticker_api.h Fri Nov 09 11:33:53 2012 +0000 @@ -1,6 +1,6 @@ /* mbed Microcontroller Library - us_ticker_api * Copyright (c) 2009 ARM Limited. All rights reserved. - */ + */ #ifndef MBED_US_TICKER_API_H #define MBED_US_TICKER_API_H @@ -8,18 +8,24 @@ #ifdef __cplusplus extern "C" { -#endif +#endif uint32_t us_ticker_read(void); -void us_ticker_set_handler(uint32_t vector); +typedef void (*ticker_event_handler)(uint32_t id); +void us_ticker_set_handler(ticker_event_handler handler); -void us_ticker_set_interrupt(unsigned int timestamp); -void us_ticker_disable_interrupt(void); -void us_ticker_clear_interrupt(void); +typedef struct ticker_event_s { + uint32_t timestamp; + uint32_t id; + struct ticker_event_s *next; +} ticker_event; + +void us_ticker_insert_event(ticker_event *obj, unsigned int timestamp, uint32_t id); +void us_ticker_remove_event(ticker_event *obj); #ifdef __cplusplus } -#endif +#endif #endif