Bluetooth & Notification Functions
/**
* Register to be notified of various OS events like receiving bluetooth data
* (see pulse_types.h and code examples for details)
*
* @param action The OS event to register
* @param callback_function The callback function to call when that event occurs
*
* Simulator status: pulse protocol notification callback implemented
*/
void pulse_register_callback(enum PulseCallbackAction action,
PulseCallback callback_function);
/**
* If connected by bluetooth, sends a 32-bit integer to the host
*
* @param response The integer to send to the host
*
* Simulator status: Not yet implemented
*/
void pulse_send_bluetooth_int(uint32_t response);
/**
* If connected by bluetooth, send the command to enable sniff mode
* (for bluetooth power saving)
*
* @param sniff_on Turn sniff mode on or off (true = on)
* @param sniff_no The sniff interval. Lower means messages are
* received more often, but uses more power.
* (400 - 2500) is a pretty usable range depending on the
* application. Sniff mode of 400 will seem near "instant"
*
* Simulator status: Not yet implemented
*/
void pulse_set_bluetooth_sniff(bool sniff_on, uint16_t sniff_no);
/**
* If you have registered to receive pulse protocol notification
* (see code examples) this function will let you access the message
* contents
*
* @param id The id passed to the registered function for pulse protocol
* notifications
* @return Pointer to a populated PulseNotification struct
* (see pulse_types.h and code examples for details)
*
* Simulator status: Implemented
*/
struct PulseNotification* pulse_get_notification(PulseNotificationId id);
/**
* Gets a list of recently received notification ids by type
*
* @param type The type of notifications you would like in the list
* (see pulse_types.h and code examples for details)
* @param list An array of 8 PulseNotificationIds pre-allocated in memory
* This function will populated this array with
* PulseNotificationIds
*
* Simulator status: Implemented
*/
void pulse_get_notification_list_by_type(enum PulseNotificationType type,
PulseNotificationId list[]);