test

Dependencies:   mbed Watchdog

Dependents:   STM32-MC_node

Committer:
ommpy
Date:
Mon Jul 06 17:18:59 2020 +0530
Revision:
0:d383e2dee0f7
first commit

Who changed what in which revision?

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