mbed library for NZ32-SC151

Committer:
modtronix
Date:
Fri Jul 24 21:01:44 2015 +1000
Revision:
1:71204b8406f2
Current mbed v103 (594)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
modtronix 1:71204b8406f2 1 /* mbed Microcontroller Library
modtronix 1:71204b8406f2 2 * Copyright (c) 2006-2015 ARM Limited
modtronix 1:71204b8406f2 3 *
modtronix 1:71204b8406f2 4 * Licensed under the Apache License, Version 2.0 (the "License");
modtronix 1:71204b8406f2 5 * you may not use this file except in compliance with the License.
modtronix 1:71204b8406f2 6 * You may obtain a copy of the License at
modtronix 1:71204b8406f2 7 *
modtronix 1:71204b8406f2 8 * http://www.apache.org/licenses/LICENSE-2.0
modtronix 1:71204b8406f2 9 *
modtronix 1:71204b8406f2 10 * Unless required by applicable law or agreed to in writing, software
modtronix 1:71204b8406f2 11 * distributed under the License is distributed on an "AS IS" BASIS,
modtronix 1:71204b8406f2 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
modtronix 1:71204b8406f2 13 * See the License for the specific language governing permissions and
modtronix 1:71204b8406f2 14 * limitations under the License.
modtronix 1:71204b8406f2 15 */
modtronix 1:71204b8406f2 16 #ifndef MBED_US_TICKER_API_H
modtronix 1:71204b8406f2 17 #define MBED_US_TICKER_API_H
modtronix 1:71204b8406f2 18
modtronix 1:71204b8406f2 19 #include <stdint.h>
modtronix 1:71204b8406f2 20 #include "ticker_api.h"
modtronix 1:71204b8406f2 21
modtronix 1:71204b8406f2 22 #ifdef __cplusplus
modtronix 1:71204b8406f2 23 extern "C" {
modtronix 1:71204b8406f2 24 #endif
modtronix 1:71204b8406f2 25
modtronix 1:71204b8406f2 26 /**
modtronix 1:71204b8406f2 27 * \defgroup UsTicker Microseconds Ticker Functions
modtronix 1:71204b8406f2 28 * @{
modtronix 1:71204b8406f2 29 */
modtronix 1:71204b8406f2 30
modtronix 1:71204b8406f2 31 /** Get ticker's data
modtronix 1:71204b8406f2 32 *
modtronix 1:71204b8406f2 33 * @return The low power ticker data
modtronix 1:71204b8406f2 34 */
modtronix 1:71204b8406f2 35 const ticker_data_t* get_us_ticker_data(void);
modtronix 1:71204b8406f2 36
modtronix 1:71204b8406f2 37
modtronix 1:71204b8406f2 38 /** The wrapper for ticker_irq_handler, to pass us ticker's data
modtronix 1:71204b8406f2 39 *
modtronix 1:71204b8406f2 40 */
modtronix 1:71204b8406f2 41 void us_ticker_irq_handler(void);
modtronix 1:71204b8406f2 42
modtronix 1:71204b8406f2 43 /* HAL us ticker */
modtronix 1:71204b8406f2 44
modtronix 1:71204b8406f2 45 /** Initialize the ticker
modtronix 1:71204b8406f2 46 *
modtronix 1:71204b8406f2 47 */
modtronix 1:71204b8406f2 48 void us_ticker_init(void);
modtronix 1:71204b8406f2 49
modtronix 1:71204b8406f2 50 /** Read the current counter
modtronix 1:71204b8406f2 51 *
modtronix 1:71204b8406f2 52 * @return The current timer's counter value in microseconds
modtronix 1:71204b8406f2 53 */
modtronix 1:71204b8406f2 54 uint32_t us_ticker_read(void);
modtronix 1:71204b8406f2 55
modtronix 1:71204b8406f2 56 /** Set interrupt for specified timestamp
modtronix 1:71204b8406f2 57 *
modtronix 1:71204b8406f2 58 * @param timestamp The time in microseconds to be set
modtronix 1:71204b8406f2 59 */
modtronix 1:71204b8406f2 60 void us_ticker_set_interrupt(timestamp_t timestamp);
modtronix 1:71204b8406f2 61
modtronix 1:71204b8406f2 62 /** Disable us ticker interrupt
modtronix 1:71204b8406f2 63 *
modtronix 1:71204b8406f2 64 */
modtronix 1:71204b8406f2 65 void us_ticker_disable_interrupt(void);
modtronix 1:71204b8406f2 66
modtronix 1:71204b8406f2 67 /** Clear us ticker interrupt
modtronix 1:71204b8406f2 68 *
modtronix 1:71204b8406f2 69 */
modtronix 1:71204b8406f2 70 void us_ticker_clear_interrupt(void);
modtronix 1:71204b8406f2 71
modtronix 1:71204b8406f2 72 /**@}*/
modtronix 1:71204b8406f2 73
modtronix 1:71204b8406f2 74 #ifdef __cplusplus
modtronix 1:71204b8406f2 75 }
modtronix 1:71204b8406f2 76 #endif
modtronix 1:71204b8406f2 77
modtronix 1:71204b8406f2 78 #endif