FRDM-K64F, Avnet M14A2A, Grove Shield, to create smart home system. In use with AT&Ts M2x & Flow.
Dependencies: mbed FXOS8700CQ MODSERIAL
mbed/us_ticker_api.h@85:0cf65ceb4492, 2019-04-29 (annotated)
- Committer:
- jwhammel
- Date:
- Mon Apr 29 04:24:38 2019 +0000
- Revision:
- 85:0cf65ceb4492
- Parent:
- 84:fc8c9b39723a
We have added an alarm trigger that gets sent to AT&T Flow.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jwhammel | 84:fc8c9b39723a | 1 | /* mbed Microcontroller Library |
jwhammel | 84:fc8c9b39723a | 2 | * Copyright (c) 2006-2013 ARM Limited |
jwhammel | 84:fc8c9b39723a | 3 | * |
jwhammel | 84:fc8c9b39723a | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
jwhammel | 84:fc8c9b39723a | 5 | * you may not use this file except in compliance with the License. |
jwhammel | 84:fc8c9b39723a | 6 | * You may obtain a copy of the License at |
jwhammel | 84:fc8c9b39723a | 7 | * |
jwhammel | 84:fc8c9b39723a | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
jwhammel | 84:fc8c9b39723a | 9 | * |
jwhammel | 84:fc8c9b39723a | 10 | * Unless required by applicable law or agreed to in writing, software |
jwhammel | 84:fc8c9b39723a | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
jwhammel | 84:fc8c9b39723a | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
jwhammel | 84:fc8c9b39723a | 13 | * See the License for the specific language governing permissions and |
jwhammel | 84:fc8c9b39723a | 14 | * limitations under the License. |
jwhammel | 84:fc8c9b39723a | 15 | */ |
jwhammel | 84:fc8c9b39723a | 16 | #ifndef MBED_US_TICKER_API_H |
jwhammel | 84:fc8c9b39723a | 17 | #define MBED_US_TICKER_API_H |
jwhammel | 84:fc8c9b39723a | 18 | |
jwhammel | 84:fc8c9b39723a | 19 | #include <stdint.h> |
jwhammel | 84:fc8c9b39723a | 20 | |
jwhammel | 84:fc8c9b39723a | 21 | #ifdef __cplusplus |
jwhammel | 84:fc8c9b39723a | 22 | extern "C" { |
jwhammel | 84:fc8c9b39723a | 23 | #endif |
jwhammel | 84:fc8c9b39723a | 24 | |
jwhammel | 84:fc8c9b39723a | 25 | uint32_t us_ticker_read(void); |
jwhammel | 84:fc8c9b39723a | 26 | |
jwhammel | 84:fc8c9b39723a | 27 | typedef void (*ticker_event_handler)(uint32_t id); |
jwhammel | 84:fc8c9b39723a | 28 | void us_ticker_set_handler(ticker_event_handler handler); |
jwhammel | 84:fc8c9b39723a | 29 | |
jwhammel | 84:fc8c9b39723a | 30 | typedef struct ticker_event_s { |
jwhammel | 84:fc8c9b39723a | 31 | uint32_t timestamp; |
jwhammel | 84:fc8c9b39723a | 32 | uint32_t id; |
jwhammel | 84:fc8c9b39723a | 33 | struct ticker_event_s *next; |
jwhammel | 84:fc8c9b39723a | 34 | } ticker_event_t; |
jwhammel | 84:fc8c9b39723a | 35 | |
jwhammel | 84:fc8c9b39723a | 36 | void us_ticker_init(void); |
jwhammel | 84:fc8c9b39723a | 37 | void us_ticker_set_interrupt(unsigned int timestamp); |
jwhammel | 84:fc8c9b39723a | 38 | void us_ticker_disable_interrupt(void); |
jwhammel | 84:fc8c9b39723a | 39 | void us_ticker_clear_interrupt(void); |
jwhammel | 84:fc8c9b39723a | 40 | void us_ticker_irq_handler(void); |
jwhammel | 84:fc8c9b39723a | 41 | |
jwhammel | 84:fc8c9b39723a | 42 | void us_ticker_insert_event(ticker_event_t *obj, unsigned int timestamp, uint32_t id); |
jwhammel | 84:fc8c9b39723a | 43 | void us_ticker_remove_event(ticker_event_t *obj); |
jwhammel | 84:fc8c9b39723a | 44 | |
jwhammel | 84:fc8c9b39723a | 45 | #ifdef __cplusplus |
jwhammel | 84:fc8c9b39723a | 46 | } |
jwhammel | 84:fc8c9b39723a | 47 | #endif |
jwhammel | 84:fc8c9b39723a | 48 | |
jwhammel | 84:fc8c9b39723a | 49 | #endif |
jwhammel | 84:fc8c9b39723a | 50 |