mbed libraries for KL25Z
us_ticker_api.h@9:663789d7729f, 2013-02-18 (annotated)
- Committer:
- emilmont
- Date:
- Mon Feb 18 09:41:56 2013 +0000
- Revision:
- 9:663789d7729f
- Parent:
- 8:c14af7958ef5
Update mbed-KL25Z to latest build
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 9:663789d7729f | 1 | /* mbed Microcontroller Library |
emilmont | 9:663789d7729f | 2 | * Copyright (c) 2006-2013 ARM Limited |
emilmont | 9:663789d7729f | 3 | * |
emilmont | 9:663789d7729f | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
emilmont | 9:663789d7729f | 5 | * you may not use this file except in compliance with the License. |
emilmont | 9:663789d7729f | 6 | * You may obtain a copy of the License at |
emilmont | 9:663789d7729f | 7 | * |
emilmont | 9:663789d7729f | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
emilmont | 9:663789d7729f | 9 | * |
emilmont | 9:663789d7729f | 10 | * Unless required by applicable law or agreed to in writing, software |
emilmont | 9:663789d7729f | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
emilmont | 9:663789d7729f | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
emilmont | 9:663789d7729f | 13 | * See the License for the specific language governing permissions and |
emilmont | 9:663789d7729f | 14 | * limitations under the License. |
emilmont | 8:c14af7958ef5 | 15 | */ |
emilmont | 0:8024c367e29f | 16 | #ifndef MBED_US_TICKER_API_H |
emilmont | 0:8024c367e29f | 17 | #define MBED_US_TICKER_API_H |
emilmont | 0:8024c367e29f | 18 | |
emilmont | 0:8024c367e29f | 19 | #include <stdint.h> |
emilmont | 0:8024c367e29f | 20 | |
emilmont | 0:8024c367e29f | 21 | #ifdef __cplusplus |
emilmont | 0:8024c367e29f | 22 | extern "C" { |
emilmont | 8:c14af7958ef5 | 23 | #endif |
emilmont | 0:8024c367e29f | 24 | |
emilmont | 0:8024c367e29f | 25 | uint32_t us_ticker_read(void); |
emilmont | 0:8024c367e29f | 26 | |
emilmont | 8:c14af7958ef5 | 27 | typedef void (*ticker_event_handler)(uint32_t id); |
emilmont | 8:c14af7958ef5 | 28 | void us_ticker_set_handler(ticker_event_handler handler); |
emilmont | 0:8024c367e29f | 29 | |
emilmont | 8:c14af7958ef5 | 30 | typedef struct ticker_event_s { |
emilmont | 8:c14af7958ef5 | 31 | uint32_t timestamp; |
emilmont | 8:c14af7958ef5 | 32 | uint32_t id; |
emilmont | 8:c14af7958ef5 | 33 | struct ticker_event_s *next; |
emilmont | 9:663789d7729f | 34 | } ticker_event_t; |
emilmont | 8:c14af7958ef5 | 35 | |
emilmont | 9:663789d7729f | 36 | void us_ticker_insert_event(ticker_event_t *obj, unsigned int timestamp, uint32_t id); |
emilmont | 9:663789d7729f | 37 | void us_ticker_remove_event(ticker_event_t *obj); |
emilmont | 0:8024c367e29f | 38 | |
emilmont | 0:8024c367e29f | 39 | #ifdef __cplusplus |
emilmont | 0:8024c367e29f | 40 | } |
emilmont | 8:c14af7958ef5 | 41 | #endif |
emilmont | 0:8024c367e29f | 42 | |
emilmont | 0:8024c367e29f | 43 | #endif |