source: asp3_tinet_ecnl_arm/trunk/asp3_dcre/mbed/hal/mbed_lp_ticker_wrapper.h@ 374

Last change on this file since 374 was 374, checked in by coas-nagasima, 5 years ago

mbed関連を更新
シリアルドライバをmbedのHALを使うよう変更
ファイルディスクリプタの処理を更新

  • Property charset set to UTF-8
  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 1.8 KB
Line 
1
2/** \addtogroup hal */
3/** @{*/
4/* mbed Microcontroller Library
5 * Copyright (c) 2018 ARM Limited
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19#ifndef MBED_LP_TICKER_WRAPPER_H
20#define MBED_LP_TICKER_WRAPPER_H
21
22#include "device.h"
23
24#if DEVICE_LPTICKER
25
26#include "hal/ticker_api.h"
27#include <stdbool.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33typedef void (*ticker_irq_handler_type)(const ticker_data_t *const);
34
35/**
36 * Interrupt handler for the wrapped lp ticker
37 *
38 * @param handler the function which would normally be called by the
39 * lp ticker handler when it is not wrapped
40 */
41void lp_ticker_wrapper_irq_handler(ticker_irq_handler_type handler);
42
43/**
44 * Get wrapped lp ticker data
45 *
46 * @param data hardware low power ticker object
47 * @return wrapped low power ticker object
48 */
49const ticker_data_t *get_lp_ticker_wrapper_data(const ticker_data_t *data);
50
51/**
52 * Suspend the wrapper layer code
53 *
54 * Pass through all interrupts to the low power ticker and stop using
55 * the microsecond ticker.
56 */
57void lp_ticker_wrapper_suspend(void);
58
59/**
60 * Resume the wrapper layer code
61 *
62 * Resume operation of the wrapper layer. Interrupts will be filtered
63 * as normal and the microsecond timer will be used for interrupts scheduled
64 * too quickly back-to-back.
65 */
66void lp_ticker_wrapper_resume(void);
67
68/**@}*/
69
70#ifdef __cplusplus
71}
72#endif
73
74#endif
75
76#endif
77
78/** @}*/
Note: See TracBrowser for help on using the repository browser.