Mbed SDK for XRange SX1272 LoRa module
Dependents: XRangePingPong XRange-LoRaWAN-lmic-app lora-transceiver
SX1272 LoRa RF module
https://www.netblocks.eu/xrange-sx1272-lora-datasheet/
hal/us_ticker_api.h@339:ac6f3fd999f3, 2016-01-07 (annotated)
- Committer:
- netblocks
- Date:
- Thu Jan 07 13:01:25 2016 +0000
- Revision:
- 339:ac6f3fd999f3
- Parent:
- 336:1e18a06a987b
HSE_VALUE set for XTAL 16Mhz
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dudmuck | 336:1e18a06a987b | 1 | /* mbed Microcontroller Library |
dudmuck | 336:1e18a06a987b | 2 | * Copyright (c) 2006-2013 ARM Limited |
dudmuck | 336:1e18a06a987b | 3 | * |
dudmuck | 336:1e18a06a987b | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
dudmuck | 336:1e18a06a987b | 5 | * you may not use this file except in compliance with the License. |
dudmuck | 336:1e18a06a987b | 6 | * You may obtain a copy of the License at |
dudmuck | 336:1e18a06a987b | 7 | * |
dudmuck | 336:1e18a06a987b | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
dudmuck | 336:1e18a06a987b | 9 | * |
dudmuck | 336:1e18a06a987b | 10 | * Unless required by applicable law or agreed to in writing, software |
dudmuck | 336:1e18a06a987b | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
dudmuck | 336:1e18a06a987b | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
dudmuck | 336:1e18a06a987b | 13 | * See the License for the specific language governing permissions and |
dudmuck | 336:1e18a06a987b | 14 | * limitations under the License. |
dudmuck | 336:1e18a06a987b | 15 | */ |
dudmuck | 336:1e18a06a987b | 16 | #ifndef MBED_US_TICKER_API_H |
dudmuck | 336:1e18a06a987b | 17 | #define MBED_US_TICKER_API_H |
dudmuck | 336:1e18a06a987b | 18 | |
dudmuck | 336:1e18a06a987b | 19 | #include <stdint.h> |
dudmuck | 336:1e18a06a987b | 20 | |
dudmuck | 336:1e18a06a987b | 21 | #ifdef __cplusplus |
dudmuck | 336:1e18a06a987b | 22 | extern "C" { |
dudmuck | 336:1e18a06a987b | 23 | #endif |
dudmuck | 336:1e18a06a987b | 24 | |
dudmuck | 336:1e18a06a987b | 25 | typedef uint64_t timestamp_t; |
dudmuck | 336:1e18a06a987b | 26 | |
dudmuck | 336:1e18a06a987b | 27 | uint32_t us_ticker_read(void); |
dudmuck | 336:1e18a06a987b | 28 | |
dudmuck | 336:1e18a06a987b | 29 | typedef void (*ticker_event_handler)(uint32_t id); |
dudmuck | 336:1e18a06a987b | 30 | void us_ticker_set_handler(ticker_event_handler handler); |
dudmuck | 336:1e18a06a987b | 31 | |
dudmuck | 336:1e18a06a987b | 32 | typedef struct ticker_event_s { |
dudmuck | 336:1e18a06a987b | 33 | timestamp_t timestamp; |
dudmuck | 336:1e18a06a987b | 34 | uint32_t id; |
dudmuck | 336:1e18a06a987b | 35 | struct ticker_event_s *next; |
dudmuck | 336:1e18a06a987b | 36 | } ticker_event_t; |
dudmuck | 336:1e18a06a987b | 37 | |
dudmuck | 336:1e18a06a987b | 38 | void us_ticker_init(void); |
dudmuck | 336:1e18a06a987b | 39 | void us_ticker_set_interrupt(timestamp_t timestamp); |
dudmuck | 336:1e18a06a987b | 40 | void us_ticker_disable_interrupt(void); |
dudmuck | 336:1e18a06a987b | 41 | void us_ticker_clear_interrupt(void); |
dudmuck | 336:1e18a06a987b | 42 | void us_ticker_irq_handler(void); |
dudmuck | 336:1e18a06a987b | 43 | |
dudmuck | 336:1e18a06a987b | 44 | void us_ticker_insert_event(ticker_event_t *obj, timestamp_t timestamp, uint32_t id); |
dudmuck | 336:1e18a06a987b | 45 | void us_ticker_remove_event(ticker_event_t *obj); |
dudmuck | 336:1e18a06a987b | 46 | |
dudmuck | 336:1e18a06a987b | 47 | #ifdef __cplusplus |
dudmuck | 336:1e18a06a987b | 48 | } |
dudmuck | 336:1e18a06a987b | 49 | #endif |
dudmuck | 336:1e18a06a987b | 50 | |
dudmuck | 336:1e18a06a987b | 51 | #endif |