...
Dependents: 2doejemplo Labo_TRSE_Drone
Fork of mbed by
us_ticker_api.h@59:0883845fe643, 2013-02-18 (annotated)
- Committer:
- emilmont
- Date:
- Mon Feb 18 11:12:58 2013 +0000
- Revision:
- 59:0883845fe643
- Parent:
- 54:71b101360fb9
- Child:
- 62:7e6c9f46b3bd
Add pinmap NC terminators for LPC1768 CAN.
Update the license from MIT to Apache v2.
Make the semihost code target independent using opportune defines for the UID and MAC.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 44:24d45a770a51 | 1 | /* mbed Microcontroller Library |
emilmont | 54:71b101360fb9 | 2 | * Copyright (c) 2006-2013 ARM Limited |
emilmont | 44:24d45a770a51 | 3 | * |
emilmont | 59:0883845fe643 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
emilmont | 59:0883845fe643 | 5 | * you may not use this file except in compliance with the License. |
emilmont | 59:0883845fe643 | 6 | * You may obtain a copy of the License at |
emilmont | 59:0883845fe643 | 7 | * |
emilmont | 59:0883845fe643 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
emilmont | 44:24d45a770a51 | 9 | * |
emilmont | 59:0883845fe643 | 10 | * Unless required by applicable law or agreed to in writing, software |
emilmont | 59:0883845fe643 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
emilmont | 59:0883845fe643 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
emilmont | 59:0883845fe643 | 13 | * See the License for the specific language governing permissions and |
emilmont | 59:0883845fe643 | 14 | * limitations under the License. |
emilmont | 44:24d45a770a51 | 15 | */ |
emilmont | 40:976df7c37ad5 | 16 | #ifndef MBED_US_TICKER_API_H |
emilmont | 40:976df7c37ad5 | 17 | #define MBED_US_TICKER_API_H |
emilmont | 40:976df7c37ad5 | 18 | |
emilmont | 40:976df7c37ad5 | 19 | #include <stdint.h> |
emilmont | 40:976df7c37ad5 | 20 | |
emilmont | 40:976df7c37ad5 | 21 | #ifdef __cplusplus |
emilmont | 40:976df7c37ad5 | 22 | extern "C" { |
emilmont | 44:24d45a770a51 | 23 | #endif |
emilmont | 40:976df7c37ad5 | 24 | |
emilmont | 40:976df7c37ad5 | 25 | uint32_t us_ticker_read(void); |
emilmont | 40:976df7c37ad5 | 26 | |
emilmont | 44:24d45a770a51 | 27 | typedef void (*ticker_event_handler)(uint32_t id); |
emilmont | 44:24d45a770a51 | 28 | void us_ticker_set_handler(ticker_event_handler handler); |
emilmont | 44:24d45a770a51 | 29 | |
emilmont | 44:24d45a770a51 | 30 | typedef struct ticker_event_s { |
emilmont | 44:24d45a770a51 | 31 | uint32_t timestamp; |
emilmont | 44:24d45a770a51 | 32 | uint32_t id; |
emilmont | 44:24d45a770a51 | 33 | struct ticker_event_s *next; |
emilmont | 44:24d45a770a51 | 34 | } ticker_event_t; |
emilmont | 44:24d45a770a51 | 35 | |
emilmont | 44:24d45a770a51 | 36 | void us_ticker_insert_event(ticker_event_t *obj, unsigned int timestamp, uint32_t id); |
emilmont | 44:24d45a770a51 | 37 | void us_ticker_remove_event(ticker_event_t *obj); |
emilmont | 44:24d45a770a51 | 38 | |
emilmont | 40:976df7c37ad5 | 39 | #ifdef __cplusplus |
emilmont | 40:976df7c37ad5 | 40 | } |
emilmont | 44:24d45a770a51 | 41 | #endif |
emilmont | 40:976df7c37ad5 | 42 | |
emilmont | 40:976df7c37ad5 | 43 | #endif |