this hurts

Dependencies:   FFT

Committer:
shyamgatech
Date:
Thu Dec 03 18:15:35 2020 +0000
Revision:
7:0d62545e6d73
Parent:
0:d6c9b09b4042
addded gui mbed code;

Who changed what in which revision?

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