| BlueNRG-1 ACI APIs and events callbacks

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

bluenrg1_events.h
Go to the documentation of this file.
1 #ifndef __BLUENRG1_EVENTS_H__
2 #define __BLUENRG1_EVENTS_H__
3
4
25 #include <stdint.h>
31 /* HCI events */
33 typedef struct Handle_Packets_Pair_Entry_t_s {
34 uint16_t Connection_Handle ;
35 uint16_t HC_Num_Of_Completed_Packets ;
39 } Handle_Packets_Pair_Entry_t;
55 void hci_disconnection_complete_event(uint8_t Status,
56 uint16_t Connection_Handle,
57 uint8_t Reason);
87 void hci_encryption_change_event(uint8_t Status,
88 uint16_t Connection_Handle,
89 uint8_t Encryption_Enabled);
119 void hci_read_remote_version_information_complete_event(uint8_t Status,
120 uint16_t Connection_Handle,
121 uint8_t Version,
122 uint16_t Manufacturer_Name,
123 uint16_t Subversion);
134 void hci_hardware_error_event(uint8_t Hardware_Code);
154 void hci_number_of_completed_packets_event(uint8_t Number_of_Handles,
155 Handle_Packets_Pair_Entry_t Handle_Packets_Pair_Entry[]);
165 void hci_data_buffer_overflow_event(uint8_t Link_Type);
183 void hci_encryption_key_refresh_complete_event(uint8_t Status,
184 uint16_t Connection_Handle);
193 /* HCI LE meta events */
195 typedef struct Advertising_Report_t_s {
196 uint8_t Event_Type ;
202 uint8_t Address_Type ;
205 uint8_t Address[6] ;
207 uint8_t Length_Data ;
209 uint8_t *Data ;
211 uint8_t RSSI ;
216 } Advertising_Report_t;
265 void hci_le_connection_complete_event(uint8_t Status,
266 uint16_t Connection_Handle,
267 uint8_t Role,
268 uint8_t Peer_Address_Type,
269 uint8_t Peer_Address[6],
270 uint16_t Conn_Interval,
271 uint16_t Conn_Latency,
272 uint16_t Supervision_Timeout,
273 uint8_t Master_Clock_Accuracy);
283 void hci_le_advertising_report_event(uint8_t Num_Reports,
284 Advertising_Report_t Advertising_Report[]);
309 void hci_le_connection_update_complete_event(uint8_t Status,
310 uint16_t Connection_Handle,
311 uint16_t Conn_Interval,
312 uint16_t Conn_Latency,
313 uint16_t Supervision_Timeout);
325 void hci_le_read_remote_used_features_complete_event(uint8_t Status,
326 uint16_t Connection_Handle,
327 uint8_t LE_Features[8]);
339 void hci_le_long_term_key_request_event(uint16_t Connection_Handle,
340 uint8_t Random_Number[8],
341 uint16_t Encrypted_Diversifier);
350 /* ACI GAP events */
356 void aci_gap_limited_discoverable_event(void);
366 void aci_gap_pairing_complete_event(uint16_t Connection_Handle,
367 uint8_t Status);
375 void aci_gap_pass_key_req_event(uint16_t Connection_Handle);
384 void aci_gap_authorization_req_event(uint16_t Connection_Handle);
389 void aci_gap_slave_security_initiated_event(void);
397 void aci_gap_bond_lost_event(void);
416 void aci_gap_proc_complete_event(uint8_t Procedure_Code,
417 uint8_t Status,
418 uint8_t Data_Length,
419 uint8_t Data[]);
428 void aci_gap_addr_not_resolved_event(uint16_t Connection_Handle);
437 /* ACI GATT/ATT events */
439 typedef struct Attribute_Group_Handle_Pair_t_s {
440 uint16_t Found_Attribute_Handle ;
441 uint16_t Group_End_Handle ;
442 } Attribute_Group_Handle_Pair_t;
444 typedef struct Handle_Item_t_s {
445 uint16_t Handle ;
446 } Handle_Item_t;
462 void aci_gatt_attribute_modified_event(uint16_t Connection_Handle,
463 uint16_t Attr_Handle,
464 uint16_t Offset,
465 uint8_t Attr_Data_Length,
466 uint8_t Attr_Data[]);
473 void aci_gatt_proc_timeout_event(uint16_t Connection_Handle);
481 void aci_att_exchange_mtu_resp_event(uint16_t Connection_Handle,
482 uint16_t Server_RX_MTU);
493 void aci_att_find_info_resp_event(uint16_t Connection_Handle,
494 uint8_t Format,
495 uint8_t Event_Data_Length,
496 uint8_t Handle_UUID_Pair[]);
504 void aci_att_find_by_type_value_resp_event(uint16_t Connection_Handle,
505 uint8_t Num_of_Handle_Pair,
506 Attribute_Group_Handle_Pair_t Attribute_Group_Handle_Pair[]);
516 void aci_att_read_by_type_resp_event(uint16_t Connection_Handle,
517 uint8_t Handle_Value_Pair_Length,
518 uint8_t Data_Length,
519 uint8_t Handle_Value_Pair_Data[]);
527 void aci_att_read_resp_event(uint16_t Connection_Handle,
528 uint8_t Event_Data_Length,
529 uint8_t Attribute_Value[]);
537 void aci_att_read_blob_resp_event(uint16_t Connection_Handle,
538 uint8_t Event_Data_Length,
539 uint8_t Attribute_Value[]);
548 void aci_att_read_multiple_resp_event(uint16_t Connection_Handle,
549 uint8_t Event_Data_Length,
550 uint8_t Set_Of_Values[]);
560 void aci_att_read_by_group_type_resp_event(uint16_t Connection_Handle,
561 uint8_t Attribute_Data_Length,
562 uint8_t Data_Length,
563 uint8_t Attribute_Data_List[]);
573 void aci_att_prepare_write_resp_event(uint16_t Connection_Handle,
574 uint16_t Attribute_Handle,
575 uint16_t Offset,
576 uint8_t Part_Attribute_Value_Length,
577 uint8_t Part_Attribute_Value[]);
583 void aci_att_exec_write_resp_event(uint16_t Connection_Handle);
592 void aci_gatt_indication_event(uint16_t Connection_Handle,
593 uint16_t Attribute_Handle,
594 uint8_t Attribute_Value_Length,
595 uint8_t Attribute_Value[]);
604 void aci_gatt_notification_event(uint16_t Connection_Handle,
605 uint16_t Attribute_Handle,
606 uint8_t Attribute_Value_Length,
607 uint8_t Attribute_Value[]);
615 void aci_gatt_proc_complete_event(uint16_t Connection_Handle,
616 uint8_t Error_Code);
628 void aci_gatt_error_resp_event(uint16_t Connection_Handle,
629 uint8_t Req_Opcode,
630 uint16_t Attribute_Handle,
631 uint8_t Error_Code);
647 void aci_gatt_disc_read_char_by_uuid_resp_event(uint16_t Connection_Handle,
648 uint16_t Attribute_Handle,
649 uint8_t Attribute_Value_Length,
650 uint8_t Attribute_Value[]);
669 void aci_gatt_write_permit_req_event(uint16_t Connection_Handle,
670 uint16_t Attribute_Handle,
671 uint8_t Data_Length,
672 uint8_t Data[]);
685 void aci_gatt_read_permit_req_event(uint16_t Connection_Handle,
686 uint16_t Attribute_Handle,
687 uint16_t Offset);
700 void aci_gatt_read_multi_permit_req_event(uint16_t Connection_Handle,
701 uint8_t Number_of_Handles,
702 Handle_Item_t Handle_Item[]);
712 void aci_gatt_tx_pool_available_event(uint16_t Connection_Handle,
713 uint16_t Available_Buffers);
719 void aci_gatt_server_confirmation_event(uint16_t Connection_Handle);
736 void aci_gatt_prepare_write_permit_req_event(uint16_t Connection_Handle,
737 uint16_t Attribute_Handle,
738 uint16_t Offset,
739 uint8_t Data_Length,
740 uint8_t Data[]);
749 /* ACI L2CAP events */
757 void aci_l2cap_connection_update_resp_event(uint16_t Connection_Handle,
758 uint16_t Result);
769 void aci_l2cap_proc_timeout_event(uint16_t Connection_Handle,
770 uint8_t Data_Length,
771 uint8_t Data[]);
798 void aci_l2cap_connection_update_req_event(uint16_t Connection_Handle,
799 uint8_t Identifier,
800 uint16_t L2CAP_Length,
801 uint16_t Interval_Min,
802 uint16_t Interval_Max,
803 uint16_t Slave_Latency,
804 uint16_t Timeout_Multiplier);
816 void aci_l2cap_command_reject_event(uint16_t Connection_Handle,
817 uint8_t Identifier,
818 uint16_t Reason,
819 uint8_t Data_Length,
820 uint8_t Data[]);
829 /* ACI HAL events */
840 void aci_hal_end_of_radio_activity_event(uint8_t Last_State,
841 uint8_t Next_State,
842 uint32_t Next_State_SysTime);
846 #endif /* __BLUENRG1_EVENTS_H__*/
Advertising_Report_t_s::Length_Data
uint8_t Length_Data
Definition: bluenrg1_events.h:208
aci_att_read_resp_event
void aci_att_read_resp_event(uint16_t Connection_Handle, uint8_t Event_Data_Length, uint8_t Attribute_Value[])
This event is generated in response to a Read Request. See aci_gatt_read_char_value.
aci_l2cap_connection_update_resp_event
void aci_l2cap_connection_update_resp_event(uint16_t Connection_Handle, uint16_t Result)
This event is generated when the master responds to the connection update request packet with a conne...
aci_gap_authorization_req_event
void aci_gap_authorization_req_event(uint16_t Connection_Handle)
This event is generated by the Security manager to the application when the application has set that ...
aci_att_prepare_write_resp_event
void aci_att_prepare_write_resp_event(uint16_t Connection_Handle, uint16_t Attribute_Handle, uint16_t Offset, uint8_t Part_Attribute_Value_Length, uint8_t Part_Attribute_Value[])
This event is generated in response to a aci_att_prepare_write_req.
Attribute_Group_Handle_Pair_t_s
Definition: bluenrg1_events.h:439
Handle_Packets_Pair_Entry_t_s::HC_Num_Of_Completed_Packets
uint16_t HC_Num_Of_Completed_Packets
Definition: bluenrg1_events.h:38
aci_gatt_attribute_modified_event
void aci_gatt_attribute_modified_event(uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Offset, uint8_t Attr_Data_Length, uint8_t Attr_Data[])
This event is generated to the application by the GATT server when a client modifies any attribute on...
hci_read_remote_version_information_complete_event
void hci_read_remote_version_information_complete_event(uint8_t Status, uint16_t Connection_Handle, uint8_t Version, uint16_t Manufacturer_Name, uint16_t Subversion)
The Read Remote Version Information Complete event is used to indicate the completion of the process ...
hci_encryption_change_event
void hci_encryption_change_event(uint8_t Status, uint16_t Connection_Handle, uint8_t Encryption_Enabled)
The Encryption Change event is used to indicate that the change of the encryption mode has been compl...
Advertising_Report_t_s::Event_Type
uint8_t Event_Type
Definition: bluenrg1_events.h:201
hci_data_buffer_overflow_event
void hci_data_buffer_overflow_event(uint8_t Link_Type)
This event is used to indicate that the Controller's data buffers have been overflowed. This can occur if the Host has sent more packets than allowed. The Link_Type parameter is used to indicate that the overflow was caused by ACL data.
aci_gap_limited_discoverable_event
void aci_gap_limited_discoverable_event(void)
This event is generated by the controller when the limited discoverable mode ends due to timeout...
aci_gatt_tx_pool_available_event
void aci_gatt_tx_pool_available_event(uint16_t Connection_Handle, uint16_t Available_Buffers)
Each time BLE FW stack raises the error code BLE_STATUS_INSUFFICIENT_RESOURCES (0x64), the aci_gatt_tx_pool_available_event event is generated as soon as there are at least two buffers available for notifications or write commands.
aci_att_read_blob_resp_event
void aci_att_read_blob_resp_event(uint16_t Connection_Handle, uint8_t Event_Data_Length, uint8_t Attribute_Value[])
This event is generated in response to a Read Request. See aci_gatt_read_char_value.
hci_le_advertising_report_event
void hci_le_advertising_report_event(uint8_t Num_Reports, Advertising_Report_t Advertising_Report[])
The LE Advertising Report event indicates that a Bluetooth device or multiple Bluetooth devices have ...
Advertising_Report_t
struct Advertising_Report_t_s Advertising_Report_t
Handle_Packets_Pair_Entry_t
struct Handle_Packets_Pair_Entry_t_s Handle_Packets_Pair_Entry_t
hci_le_long_term_key_request_event
void hci_le_long_term_key_request_event(uint16_t Connection_Handle, uint8_t Random_Number[8], uint16_t Encrypted_Diversifier)
The LE Long Term Key Request event indicates that the master device is attempting to encrypt or re-en...
aci_gatt_read_multi_permit_req_event
void aci_gatt_read_multi_permit_req_event(uint16_t Connection_Handle, uint8_t Number_of_Handles, Handle_Item_t Handle_Item[])
This event is given to the application when a read multiple request or read by type request is receiv...
aci_l2cap_command_reject_event
void aci_l2cap_command_reject_event(uint16_t Connection_Handle, uint8_t Identifier, uint16_t Reason, uint8_t Data_Length, uint8_t Data[])
This event is generated when the master responds to the connection update request packet with a comma...
aci_gatt_server_confirmation_event
void aci_gatt_server_confirmation_event(uint16_t Connection_Handle)
This event is generated when the client has sent the confirmation to a previously sent indication...
aci_att_read_multiple_resp_event
void aci_att_read_multiple_resp_event(uint16_t Connection_Handle, uint8_t Event_Data_Length, uint8_t Set_Of_Values[])
This event is generated in response to a Read Multiple Request.
aci_att_find_by_type_value_resp_event
void aci_att_find_by_type_value_resp_event(uint16_t Connection_Handle, uint8_t Num_of_Handle_Pair, Attribute_Group_Handle_Pair_t Attribute_Group_Handle_Pair[])
This event is generated in response to a aci_att_find_by_type_value_req.
aci_gatt_prepare_write_permit_req_event
void aci_gatt_prepare_write_permit_req_event(uint16_t Connection_Handle, uint16_t Attribute_Handle, uint16_t Offset, uint8_t Data_Length, uint8_t Data[])
This event is given to the application when a prepare write request is received by the server from th...
aci_gap_pass_key_req_event
void aci_gap_pass_key_req_event(uint16_t Connection_Handle)
This event is generated by the Security manager to the application when a passkey is required for pai...
aci_l2cap_proc_timeout_event
void aci_l2cap_proc_timeout_event(uint16_t Connection_Handle, uint8_t Data_Length, uint8_t Data[])
This event is generated when the master does not respond to the connection update request packet with...
aci_gatt_indication_event
void aci_gatt_indication_event(uint16_t Connection_Handle, uint16_t Attribute_Handle, uint8_t Attribute_Value_Length, uint8_t Attribute_Value[])
This event is generated when an indication is received from the server.
Advertising_Report_t_s::RSSI
uint8_t RSSI
Definition: bluenrg1_events.h:215
aci_gatt_notification_event
void aci_gatt_notification_event(uint16_t Connection_Handle, uint16_t Attribute_Handle, uint8_t Attribute_Value_Length, uint8_t Attribute_Value[])
This event is generated when a notification is received from the server.
Handle_Item_t
struct Handle_Item_t_s Handle_Item_t
aci_gap_proc_complete_event
void aci_gap_proc_complete_event(uint8_t Procedure_Code, uint8_t Status, uint8_t Data_Length, uint8_t Data[])
This event is sent by the GAP to the upper layers when a procedure previously started has been termin...
aci_gap_pairing_complete_event
void aci_gap_pairing_complete_event(uint16_t Connection_Handle, uint8_t Status)
This event is generated when the pairing process has completed successfully or a pairing procedure ti...
aci_hal_end_of_radio_activity_event
void aci_hal_end_of_radio_activity_event(uint8_t Last_State, uint8_t Next_State, uint32_t Next_State_SysTime)
This event is generated when the device completes a radio activity and provide information when a new...
Attribute_Group_Handle_Pair_t
struct Attribute_Group_Handle_Pair_t_s Attribute_Group_Handle_Pair_t
Handle_Packets_Pair_Entry_t_s
Definition: bluenrg1_events.h:33
hci_le_read_remote_used_features_complete_event
void hci_le_read_remote_used_features_complete_event(uint8_t Status, uint16_t Connection_Handle, uint8_t LE_Features[8])
The LE Read Remote Used Features Complete event is used to indicate the completion of the process of ...
aci_gatt_disc_read_char_by_uuid_resp_event
void aci_gatt_disc_read_char_by_uuid_resp_event(uint16_t Connection_Handle, uint16_t Attribute_Handle, uint8_t Attribute_Value_Length, uint8_t Attribute_Value[])
This event can be generated during a "Discover Characteristics By UUID" procedure or a "Read using Ch...
aci_l2cap_connection_update_req_event
void aci_l2cap_connection_update_req_event(uint16_t Connection_Handle, uint8_t Identifier, uint16_t L2CAP_Length, uint16_t Interval_Min, uint16_t Interval_Max, uint16_t Slave_Latency, uint16_t Timeout_Multiplier)
The event is given by the L2CAP layer when a connection update request is received from the slave...
hci_hardware_error_event
void hci_hardware_error_event(uint8_t Hardware_Code)
The Hardware Error event is used to indicate some implementation specific type of hardware failure fo...
aci_att_exec_write_resp_event
void aci_att_exec_write_resp_event(uint16_t Connection_Handle)
This event is generated in response to an Execute Write Request.
aci_gap_slave_security_initiated_event
void aci_gap_slave_security_initiated_event(void)
This event is generated when the slave security request is successfully sent to the master...
hci_encryption_key_refresh_complete_event
void hci_encryption_key_refresh_complete_event(uint8_t Status, uint16_t Connection_Handle)
The Encryption Key Refresh Complete event is used to indicate to the Host that the encryption key was...
Attribute_Group_Handle_Pair_t_s::Found_Attribute_Handle
uint16_t Found_Attribute_Handle
Definition: bluenrg1_events.h:440
hci_le_connection_complete_event
void hci_le_connection_complete_event(uint8_t Status, uint16_t Connection_Handle, uint8_t Role, uint8_t Peer_Address_Type, uint8_t Peer_Address[6], uint16_t Conn_Interval, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint8_t Master_Clock_Accuracy)
The LE Connection Complete event indicates to both of the Hosts forming the connection that a new con...
Handle_Packets_Pair_Entry_t_s::Connection_Handle
uint16_t Connection_Handle
Definition: bluenrg1_events.h:34
hci_le_connection_update_complete_event
void hci_le_connection_update_complete_event(uint8_t Status, uint16_t Connection_Handle, uint16_t Conn_Interval, uint16_t Conn_Latency, uint16_t Supervision_Timeout)
The LE Connection Update Complete event is used to indicate that the Controller process to update the...
Handle_Item_t_s
Definition: bluenrg1_events.h:444
aci_gatt_write_permit_req_event
void aci_gatt_write_permit_req_event(uint16_t Connection_Handle, uint16_t Attribute_Handle, uint8_t Data_Length, uint8_t Data[])
This event is given to the application when a write request, write command or signed write command is...
aci_gatt_error_resp_event
void aci_gatt_error_resp_event(uint16_t Connection_Handle, uint8_t Req_Opcode, uint16_t Attribute_Handle, uint8_t Error_Code)
This event is generated when an Error Response is received from the server. The error response can be...
aci_gatt_read_permit_req_event
void aci_gatt_read_permit_req_event(uint16_t Connection_Handle, uint16_t Attribute_Handle, uint16_t Offset)
This event is given to the application when a read request or read blob request is received by the se...
aci_att_read_by_type_resp_event
void aci_att_read_by_type_resp_event(uint16_t Connection_Handle, uint8_t Handle_Value_Pair_Length, uint8_t Data_Length, uint8_t Handle_Value_Pair_Data[])
This event is generated in response to a aci_att_read_by_type_req. See aci_gatt_find_included_service...
Advertising_Report_t_s::Data
uint8_t * Data
Definition: bluenrg1_events.h:210
aci_gatt_proc_timeout_event
void aci_gatt_proc_timeout_event(uint16_t Connection_Handle)
This event is generated by the client/server to the application on a GATT timeout (30 seconds)...
hci_disconnection_complete_event
void hci_disconnection_complete_event(uint8_t Status, uint16_t Connection_Handle, uint8_t Reason)
The Disconnection Complete event occurs when a connection is terminated. The status parameter indicat...
aci_gap_addr_not_resolved_event
void aci_gap_addr_not_resolved_event(uint16_t Connection_Handle)
This event is sent only by a privacy enabled Peripheral. The event is sent to the upper layers when t...
aci_gatt_proc_complete_event
void aci_gatt_proc_complete_event(uint16_t Connection_Handle, uint8_t Error_Code)
This event is generated when a GATT client procedure completes either with error or successfully...
Advertising_Report_t_s
Definition: bluenrg1_events.h:195
aci_att_read_by_group_type_resp_event
void aci_att_read_by_group_type_resp_event(uint16_t Connection_Handle, uint8_t Attribute_Data_Length, uint8_t Data_Length, uint8_t Attribute_Data_List[])
This event is generated in response to a Read By Group Type Request. See aci_gatt_disc_all_primary_se...
aci_gap_bond_lost_event
void aci_gap_bond_lost_event(void)
This event is generated when a pairing request is issued in response to a slave security request from...
Advertising_Report_t_s::Address
uint8_t Address[6]
Definition: bluenrg1_events.h:206
aci_att_exchange_mtu_resp_event
void aci_att_exchange_mtu_resp_event(uint16_t Connection_Handle, uint16_t Server_RX_MTU)
This event is generated in response to an Exchange MTU request. See aci_gatt_exchange_config.
Attribute_Group_Handle_Pair_t_s::Group_End_Handle
uint16_t Group_End_Handle
Definition: bluenrg1_events.h:441
hci_number_of_completed_packets_event
void hci_number_of_completed_packets_event(uint8_t Number_of_Handles, Handle_Packets_Pair_Entry_t Handle_Packets_Pair_Entry[])
The Number Of Completed Packets event is used by the Controller to indicate to the Host how many HCI ...
Handle_Item_t_s::Handle
uint16_t Handle
Definition: bluenrg1_events.h:445
aci_att_find_info_resp_event
void aci_att_find_info_resp_event(uint16_t Connection_Handle, uint8_t Format, uint8_t Event_Data_Length, uint8_t Handle_UUID_Pair[])
This event is generated in response to a Find Information Request. See aci_att_find_info_req and Find...
Advertising_Report_t_s::Address_Type
uint8_t Address_Type
Definition: bluenrg1_events.h:204