test
Fork of nRF51822 by
Embed:
(wiki syntax)
Show/hide line numbers
ble_radio_notification.h
Go to the documentation of this file.
00001 /* 00002 * Copyright (c) Nordic Semiconductor ASA 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without modification, 00006 * are permitted provided that the following conditions are met: 00007 * 00008 * 1. Redistributions of source code must retain the above copyright notice, this 00009 * list of conditions and the following disclaimer. 00010 * 00011 * 2. Redistributions in binary form must reproduce the above copyright notice, this 00012 * list of conditions and the following disclaimer in the documentation and/or 00013 * other materials provided with the distribution. 00014 * 00015 * 3. Neither the name of Nordic Semiconductor ASA nor the names of other 00016 * contributors to this software may be used to endorse or promote products 00017 * derived from this software without specific prior written permission. 00018 * 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00021 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00022 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00023 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 00024 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00025 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00026 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00027 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00028 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00029 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 * 00031 */ 00032 00033 /** @file 00034 * 00035 * @defgroup ble_radio_notification Radio Notification Event Handler 00036 * @{ 00037 * @ingroup ble_sdk_lib 00038 * @brief Module for propagating Radio Notification events to the application. 00039 */ 00040 00041 #ifndef BLE_RADIO_NOTIFICATION_H__ 00042 #define BLE_RADIO_NOTIFICATION_H__ 00043 00044 #include <stdint.h> 00045 #include <stdbool.h> 00046 #include "nrf_soc.h" 00047 00048 #ifdef __cplusplus 00049 extern "C" { 00050 #endif 00051 00052 /**@brief Application radio notification event handler type. */ 00053 typedef void (*ble_radio_notification_evt_handler_t) (bool radio_active); 00054 00055 /**@brief Function for initializing the Radio Notification module. 00056 * 00057 * @param[in] irq_priority Interrupt priority for the Radio Notification interrupt handler. 00058 * @param[in] distance The time from an Active event until the radio is activated. 00059 * @param[in] evt_handler Handler to be executed when a radio notification event has been 00060 * received. 00061 * 00062 * @return NRF_SUCCESS on successful initialization, otherwise an error code. 00063 */ 00064 uint32_t ble_radio_notification_init(nrf_app_irq_priority_t irq_priority, 00065 nrf_radio_notification_distance_t distance, 00066 ble_radio_notification_evt_handler_t evt_handler); 00067 00068 #ifdef __cplusplus 00069 } 00070 #endif 00071 00072 #endif // BLE_RADIO_NOTIFICATION_H__ 00073 00074 /** @} */
Generated on Tue Jul 12 2022 21:00:16 by 1.7.2