Describes predefine macros for mbed online compiler (armcc)

Committer:
MACRUM
Date:
Thu Mar 16 21:58:09 2017 +0900
Revision:
6:40e873bbc5f7
Add licence header info

Who changed what in which revision?

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