Partial implementation of BlueGiga's BGAPI for use with the BLE112/3 modules over UART.

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers callbacks.h Source File

callbacks.h

Go to the documentation of this file.
00001 #include "api_datatypes.h"
00002 #ifndef CALLBACKS_H
00003 #define CALLBACKS_H
00004 
00005 /** @file callbacks.h 
00006 * @brief Definitions of function callbacks that BGLib will invoke.
00007 * In order to take advantage of these callbacks, use the corresponding setter in the BGLib API.
00008 */
00009 
00010 /** @brief Function pointer for Hello response handler. 
00011 * This is a pointer to a callback for the Hello response. It should point to a function that takes no arguments.
00012 */
00013 typedef void (*hello_callback_t)();
00014 
00015 /** Function pointer for Get Info response handler. 
00016 * @param ble_msg_system_get_info_rsp_t A data structure containing the response. 
00017 */
00018 typedef void (*get_info_callback_t)(ble_msg_system_get_info_rsp_t);
00019 
00020 /** Function pointer for System Boot event handler. 
00021 * @param ble_msg_system_boot_evt_t A data structure containing the data from the System Boot event.
00022 */
00023 typedef void (*boot_callback_t)(ble_msg_system_boot_evt_t);
00024 
00025 /** Function pointer for timestamping. This is a function that is intended to run whenever there is <em>any</em> data available on the UART.
00026 */
00027 typedef void (*timestamp_callback_t)();
00028 
00029 /** Function pointer for Discover response handler.
00030 * @param ble_msg_gap_discover_rsp_t A data structure containing the response.
00031 */
00032 typedef void (*discover_callback_t)(ble_msg_gap_discover_rsp_t);
00033 
00034 /** Function pointer for Scan Result event handler.
00035 * @param ble_msg_gap_scan_result_evt_t A data structure containing the data from a Scan Result event.
00036 */
00037 typedef void (*scan_result_callback_t)(ble_msg_gap_scan_result_evt_t);
00038 
00039 #endif