Update to new build system.
[clinton/Smoothieware.git] / mbed / src / capi / us_ticker_api.h
1 /* mbed Microcontroller Library
2 * Copyright (c) 2006-2013 ARM Limited
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 #ifndef MBED_US_TICKER_API_H
17 #define MBED_US_TICKER_API_H
18
19 #include <stdint.h>
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 uint32_t us_ticker_read(void);
26
27 typedef void (*ticker_event_handler)(uint32_t id);
28 void us_ticker_set_handler(ticker_event_handler handler);
29
30 typedef struct ticker_event_s {
31 uint32_t timestamp;
32 uint32_t id;
33 struct ticker_event_s *next;
34 } ticker_event_t;
35
36 void us_ticker_insert_event(ticker_event_t *obj, unsigned int timestamp, uint32_t id);
37 void us_ticker_remove_event(ticker_event_t *obj);
38
39 #ifdef __cplusplus
40 }
41 #endif
42
43 #endif