Life is random and unfair!
Fork of mbed-dev by
Embed:
(wiki syntax)
Show/hide line numbers
lp_ticker_api.h
00001 00002 /** \addtogroup hal */ 00003 /** @{*/ 00004 /* mbed Microcontroller Library 00005 * Copyright (c) 2015 ARM Limited 00006 * 00007 * Licensed under the Apache License, Version 2.0 (the "License"); 00008 * you may not use this file except in compliance with the License. 00009 * You may obtain a copy of the License at 00010 * 00011 * http://www.apache.org/licenses/LICENSE-2.0 00012 * 00013 * Unless required by applicable law or agreed to in writing, software 00014 * distributed under the License is distributed on an "AS IS" BASIS, 00015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00016 * See the License for the specific language governing permissions and 00017 * limitations under the License. 00018 */ 00019 #ifndef MBED_LPTICKER_API_H 00020 #define MBED_LPTICKER_API_H 00021 00022 #include "device.h" 00023 00024 #if DEVICE_LOWPOWERTIMER 00025 00026 #include "hal/ticker_api.h" 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 /** 00033 * \defgroup hal_LpTicker Low Power Ticker Functions 00034 * @{ 00035 */ 00036 00037 /** Get low power ticker's data 00038 * 00039 * @return The low power ticker data 00040 */ 00041 const ticker_data_t* get_lp_ticker_data(void); 00042 00043 /** The wrapper for ticker_irq_handler, to pass lp ticker's data 00044 * 00045 */ 00046 void lp_ticker_irq_handler(void); 00047 00048 /* HAL lp ticker */ 00049 00050 /** Initialize the low power ticker 00051 * 00052 */ 00053 void lp_ticker_init(void); 00054 00055 /** Read the current counter 00056 * 00057 * @return The current timer's counter value in microseconds 00058 */ 00059 uint32_t lp_ticker_read(void); 00060 00061 /** Set interrupt for specified timestamp 00062 * 00063 * @param timestamp The time in microseconds to be set 00064 */ 00065 void lp_ticker_set_interrupt(timestamp_t timestamp); 00066 00067 /** Disable low power ticker interrupt 00068 * 00069 */ 00070 void lp_ticker_disable_interrupt(void); 00071 00072 /** Clear the low power ticker interrupt 00073 * 00074 */ 00075 void lp_ticker_clear_interrupt(void); 00076 00077 /**@}*/ 00078 00079 #ifdef __cplusplus 00080 } 00081 #endif 00082 00083 #endif 00084 00085 #endif 00086 00087 /** @}*/
Generated on Tue Jul 12 2022 19:28:24 by 1.7.2