mbed libraries for KL25Z
us_ticker_api.h@8:c14af7958ef5, 2012-11-09 (annotated)
- Committer:
- emilmont
- Date:
- Fri Nov 09 11:33:53 2012 +0000
- Revision:
- 8:c14af7958ef5
- Parent:
- 0:8024c367e29f
- Child:
- 9:663789d7729f
SPI driver; ADC driver; DAC driver; microlib support; general bugfixing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 0:8024c367e29f | 1 | /* mbed Microcontroller Library - us_ticker_api |
emilmont | 0:8024c367e29f | 2 | * Copyright (c) 2009 ARM Limited. All rights reserved. |
emilmont | 8:c14af7958ef5 | 3 | */ |
emilmont | 0:8024c367e29f | 4 | #ifndef MBED_US_TICKER_API_H |
emilmont | 0:8024c367e29f | 5 | #define MBED_US_TICKER_API_H |
emilmont | 0:8024c367e29f | 6 | |
emilmont | 0:8024c367e29f | 7 | #include <stdint.h> |
emilmont | 0:8024c367e29f | 8 | |
emilmont | 0:8024c367e29f | 9 | #ifdef __cplusplus |
emilmont | 0:8024c367e29f | 10 | extern "C" { |
emilmont | 8:c14af7958ef5 | 11 | #endif |
emilmont | 0:8024c367e29f | 12 | |
emilmont | 0:8024c367e29f | 13 | uint32_t us_ticker_read(void); |
emilmont | 0:8024c367e29f | 14 | |
emilmont | 8:c14af7958ef5 | 15 | typedef void (*ticker_event_handler)(uint32_t id); |
emilmont | 8:c14af7958ef5 | 16 | void us_ticker_set_handler(ticker_event_handler handler); |
emilmont | 0:8024c367e29f | 17 | |
emilmont | 8:c14af7958ef5 | 18 | typedef struct ticker_event_s { |
emilmont | 8:c14af7958ef5 | 19 | uint32_t timestamp; |
emilmont | 8:c14af7958ef5 | 20 | uint32_t id; |
emilmont | 8:c14af7958ef5 | 21 | struct ticker_event_s *next; |
emilmont | 8:c14af7958ef5 | 22 | } ticker_event; |
emilmont | 8:c14af7958ef5 | 23 | |
emilmont | 8:c14af7958ef5 | 24 | void us_ticker_insert_event(ticker_event *obj, unsigned int timestamp, uint32_t id); |
emilmont | 8:c14af7958ef5 | 25 | void us_ticker_remove_event(ticker_event *obj); |
emilmont | 0:8024c367e29f | 26 | |
emilmont | 0:8024c367e29f | 27 | #ifdef __cplusplus |
emilmont | 0:8024c367e29f | 28 | } |
emilmont | 8:c14af7958ef5 | 29 | #endif |
emilmont | 0:8024c367e29f | 30 | |
emilmont | 0:8024c367e29f | 31 | #endif |