Old version
Fork of nRF51822 by
nordic/nrf-sdk/ble/ble_radio_notification.h@94:22533f51b97f, 2016-01-21 (annotated)
- Committer:
- longdh
- Date:
- Thu Jan 21 02:04:47 2016 +0000
- Revision:
- 94:22533f51b97f
- Parent:
- 0:eff01767de02
- Child:
- 37:c29c330d942c
First commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 0:eff01767de02 | 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. |
bogdanm | 0:eff01767de02 | 2 | * |
bogdanm | 0:eff01767de02 | 3 | * The information contained herein is property of Nordic Semiconductor ASA. |
bogdanm | 0:eff01767de02 | 4 | * Terms and conditions of usage are described in detail in NORDIC |
bogdanm | 0:eff01767de02 | 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. |
bogdanm | 0:eff01767de02 | 6 | * |
bogdanm | 0:eff01767de02 | 7 | * Licensees are granted free, non-transferable use of the information. NO |
bogdanm | 0:eff01767de02 | 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from |
bogdanm | 0:eff01767de02 | 9 | * the file. |
bogdanm | 0:eff01767de02 | 10 | */ |
bogdanm | 0:eff01767de02 | 11 | |
bogdanm | 0:eff01767de02 | 12 | /** @file |
bogdanm | 0:eff01767de02 | 13 | * |
bogdanm | 0:eff01767de02 | 14 | * @defgroup ble_radio_notification Radio Notification Event Handler |
bogdanm | 0:eff01767de02 | 15 | * @{ |
bogdanm | 0:eff01767de02 | 16 | * @ingroup ble_sdk_lib |
bogdanm | 0:eff01767de02 | 17 | * @brief Module for propagating Radio Notification events to the application. |
bogdanm | 0:eff01767de02 | 18 | */ |
bogdanm | 0:eff01767de02 | 19 | |
bogdanm | 0:eff01767de02 | 20 | #ifndef BLE_RADIO_NOTIFICATION_H__ |
bogdanm | 0:eff01767de02 | 21 | #define BLE_RADIO_NOTIFICATION_H__ |
bogdanm | 0:eff01767de02 | 22 | |
bogdanm | 0:eff01767de02 | 23 | #include <stdint.h> |
bogdanm | 0:eff01767de02 | 24 | #include <stdbool.h> |
bogdanm | 0:eff01767de02 | 25 | #include "nordic_global.h" |
bogdanm | 0:eff01767de02 | 26 | #include "nrf_soc.h" |
bogdanm | 0:eff01767de02 | 27 | |
bogdanm | 0:eff01767de02 | 28 | /**@brief Application radio notification event handler type. */ |
bogdanm | 0:eff01767de02 | 29 | typedef void (*ble_radio_notification_evt_handler_t) (bool radio_active); |
bogdanm | 0:eff01767de02 | 30 | |
bogdanm | 0:eff01767de02 | 31 | /**@brief Function for initializing the Radio Notification module. |
bogdanm | 0:eff01767de02 | 32 | * |
bogdanm | 0:eff01767de02 | 33 | * @param[in] irq_priority Interrupt priority for the Radio Notification interrupt handler. |
bogdanm | 0:eff01767de02 | 34 | * @param[in] distance The time from an Active event until the radio is activated. |
bogdanm | 0:eff01767de02 | 35 | * @param[in] evt_handler Handler to be executed when a radio notification event has been |
bogdanm | 0:eff01767de02 | 36 | * received. |
bogdanm | 0:eff01767de02 | 37 | * |
bogdanm | 0:eff01767de02 | 38 | * @return NRF_SUCCESS on successful initialization, otherwise an error code. |
bogdanm | 0:eff01767de02 | 39 | */ |
bogdanm | 0:eff01767de02 | 40 | uint32_t ble_radio_notification_init(nrf_app_irq_priority_t irq_priority, |
bogdanm | 0:eff01767de02 | 41 | nrf_radio_notification_distance_t distance, |
bogdanm | 0:eff01767de02 | 42 | ble_radio_notification_evt_handler_t evt_handler); |
bogdanm | 0:eff01767de02 | 43 | |
bogdanm | 0:eff01767de02 | 44 | #endif // BLE_RADIO_NOTIFICATION_H__ |
bogdanm | 0:eff01767de02 | 45 | |
bogdanm | 0:eff01767de02 | 46 | /** @} */ |