This repo contains the libraries of Mbed for LPC1549 with following changes: - IAP commands. - EEPROM write and read. - UART write and read (public) - CAN can_s -> LPC_C_CAN0_Type *can
mbed/us_ticker_api.h@0:820a69dfd200, 2015-04-14 (annotated)
- Committer:
- gmatarrubia
- Date:
- Tue Apr 14 15:00:13 2015 +0200
- Revision:
- 0:820a69dfd200
Initial repo. IAP commands, EEPROM write/read, UART write/read, CAN
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gmatarrubia |
0:820a69dfd200 | 1 | /* mbed Microcontroller Library |
gmatarrubia |
0:820a69dfd200 | 2 | * Copyright (c) 2006-2013 ARM Limited |
gmatarrubia |
0:820a69dfd200 | 3 | * |
gmatarrubia |
0:820a69dfd200 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
gmatarrubia |
0:820a69dfd200 | 5 | * you may not use this file except in compliance with the License. |
gmatarrubia |
0:820a69dfd200 | 6 | * You may obtain a copy of the License at |
gmatarrubia |
0:820a69dfd200 | 7 | * |
gmatarrubia |
0:820a69dfd200 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
gmatarrubia |
0:820a69dfd200 | 9 | * |
gmatarrubia |
0:820a69dfd200 | 10 | * Unless required by applicable law or agreed to in writing, software |
gmatarrubia |
0:820a69dfd200 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
gmatarrubia |
0:820a69dfd200 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
gmatarrubia |
0:820a69dfd200 | 13 | * See the License for the specific language governing permissions and |
gmatarrubia |
0:820a69dfd200 | 14 | * limitations under the License. |
gmatarrubia |
0:820a69dfd200 | 15 | */ |
gmatarrubia |
0:820a69dfd200 | 16 | #ifndef MBED_US_TICKER_API_H |
gmatarrubia |
0:820a69dfd200 | 17 | #define MBED_US_TICKER_API_H |
gmatarrubia |
0:820a69dfd200 | 18 | |
gmatarrubia |
0:820a69dfd200 | 19 | #include <stdint.h> |
gmatarrubia |
0:820a69dfd200 | 20 | |
gmatarrubia |
0:820a69dfd200 | 21 | #ifdef __cplusplus |
gmatarrubia |
0:820a69dfd200 | 22 | extern "C" { |
gmatarrubia |
0:820a69dfd200 | 23 | #endif |
gmatarrubia |
0:820a69dfd200 | 24 | |
gmatarrubia |
0:820a69dfd200 | 25 | typedef uint32_t timestamp_t; |
gmatarrubia |
0:820a69dfd200 | 26 | |
gmatarrubia |
0:820a69dfd200 | 27 | uint32_t us_ticker_read(void); |
gmatarrubia |
0:820a69dfd200 | 28 | |
gmatarrubia |
0:820a69dfd200 | 29 | typedef void (*ticker_event_handler)(uint32_t id); |
gmatarrubia |
0:820a69dfd200 | 30 | void us_ticker_set_handler(ticker_event_handler handler); |
gmatarrubia |
0:820a69dfd200 | 31 | |
gmatarrubia |
0:820a69dfd200 | 32 | typedef struct ticker_event_s { |
gmatarrubia |
0:820a69dfd200 | 33 | timestamp_t timestamp; |
gmatarrubia |
0:820a69dfd200 | 34 | uint32_t id; |
gmatarrubia |
0:820a69dfd200 | 35 | struct ticker_event_s *next; |
gmatarrubia |
0:820a69dfd200 | 36 | } ticker_event_t; |
gmatarrubia |
0:820a69dfd200 | 37 | |
gmatarrubia |
0:820a69dfd200 | 38 | void us_ticker_init(void); |
gmatarrubia |
0:820a69dfd200 | 39 | void us_ticker_set_interrupt(timestamp_t timestamp); |
gmatarrubia |
0:820a69dfd200 | 40 | void us_ticker_disable_interrupt(void); |
gmatarrubia |
0:820a69dfd200 | 41 | void us_ticker_clear_interrupt(void); |
gmatarrubia |
0:820a69dfd200 | 42 | void us_ticker_irq_handler(void); |
gmatarrubia |
0:820a69dfd200 | 43 | |
gmatarrubia |
0:820a69dfd200 | 44 | void us_ticker_insert_event(ticker_event_t *obj, timestamp_t timestamp, uint32_t id); |
gmatarrubia |
0:820a69dfd200 | 45 | void us_ticker_remove_event(ticker_event_t *obj); |
gmatarrubia |
0:820a69dfd200 | 46 | |
gmatarrubia |
0:820a69dfd200 | 47 | #ifdef __cplusplus |
gmatarrubia |
0:820a69dfd200 | 48 | } |
gmatarrubia |
0:820a69dfd200 | 49 | #endif |
gmatarrubia |
0:820a69dfd200 | 50 | |
gmatarrubia |
0:820a69dfd200 | 51 | #endif |