| BlueNRG-1 Master/Central Library

- Main Page
- Classes
- Files

- File List
- File Members

Functions
master_basic_profile_events.h File Reference

Header file for BlueNRG-1 master/central library events. More...

Go to the source code of this file.

## Functions

void | Master_Library_encryption_change_event (uint8_t Status, uint16_t Connection_Handle)
void | Master_Library_disconnection_complete_event (uint8_t Status, uint16_t Connection_Handle, uint8_t Reason)
void | Master_Library_le_connection_complete_event (uint8_t Status, uint16_t Connection_Handle, uint8_t Peer_Address[6])
void | Master_Library_le_advertising_report_event (uint8_t Num_Reports, Advertising_Report_t Advertising_Report[])
void | Master_Library_gap_proc_complete_event (uint8_t Procedure_Code)
void | Master_Library_gatt_read_permit_req_event (uint16_t Connection_Handle, uint16_t Attribute_Handle, uint16_t Offset)
void | Master_Library_gatt_write_permit_req_event (uint16_t Connection_Handle, uint16_t Attribute_Handle, uint8_t Data_Length, uint8_t Data[])
void | Master_Library_att_find_info_resp_event (uint16_t Connection_Handle, uint8_t Format, uint8_t Event_Data_Length, uint8_t Handle_UUID_Pair[])
void | Master_Library_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[])
void | Master_Library_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[])
void | Master_Library_gatt_notification_event (uint16_t Connection_Handle, uint16_t Attribute_Handle, uint8_t Attribute_Value_Length, uint8_t Attribute_Value[])
void | Master_Library_gatt_indication_event (uint16_t Connection_Handle, uint16_t Attribute_Handle, uint8_t Attribute_Value_Length, uint8_t Attribute_Value[])
void | Master_Library_gatt_attribute_modified_event (uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Offset, uint8_t Attr_Data_Length, uint8_t Attr_Data[])
void | Master_Library_gatt_proc_complete_event (uint16_t Connection_Handle, uint8_t Error_Code)
void | Master_Library_att_read_resp_event (uint16_t Connection_Handle, uint8_t Event_Data_Length, uint8_t Attribute_Value[])
void | Master_Library_att_read_blob_resp_event (uint16_t Connection_Handle, uint8_t Event_Data_Length, uint8_t Attribute_Value[])
void | Master_Library_gap_pairing_complete_event (uint16_t Connection_Handle, uint8_t Status)
void | Master_Library_gatt_error_resp_event (uint16_t Connection_Handle, uint8_t Req_Opcode, uint16_t Attribute_Handle, uint8_t Error_Code)
void | Master_Library_gap_pass_key_req_event (uint16_t Connection_Handle)
void | Master_Library_l2cap_connection_update_req_event (uint16_t Connection_Handle, uint8_t Identifier, uint16_t Interval_Min, uint16_t Interval_Max, uint16_t Slave_Latency, uint16_t Timeout_Multiplier)

## Detailed Description

Header file for BlueNRG-1 master/central library events.

Author
  AMG - RF Application team

Version
  V1.1.0

Date
  04-November-2016

Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

##
© COPYRIGHT 2016 STMicroelectronics

Definition in file master_basic_profile_events.h.

## Function Documentation

void Master_Library_att_find_info_resp_event | ( | uint16_t | Connection_Handle,
|  | uint8_t | Format,
|  | uint8_t | Event_Data_Length,
|  | uint8_t | Handle_UUID_Pair[]
| ) |  |

Master_Library_att_find_info_resp_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Format | Format of the hanndle-uuid pairs
  [in] | Event_Data_Length | Length of Handle_UUID_Pair in octets
  [in] | Handle_UUID_Pair | A sequence of handle-uuid pairs.

Master basic profile callback which handles actions when a BLE att find info response event happens

Returns
  None

void Master_Library_att_read_blob_resp_event | ( | uint16_t | Connection_Handle,
|  | uint8_t | Event_Data_Length,
|  | uint8_t | Attribute_Value[]
| ) |  |

Master_Library_att_read_blob_resp_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Event_Data_Length | Length of following data
  [in] | Attribute_Value | Part of the attribute value

Master basic profile callback which handles actions when a BLE att read blob response event happens

Returns
  None

void Master_Library_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[]
| ) |  |

Master_Library_att_read_by_group_type_resp_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Attribute_Data_Length | The size of each attribute data
  [in] | Data_Length | Length of Attribute_Data_List in octets
  [in] | Attribute_Data_List | Attribute Data List as defined in Bluetooth Core v4.1 spec.

Master basic profile callback which handles actions when a BLE att read by group type response event happens

Returns
  None

void Master_Library_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[]
| ) |  |

Master_Library_att_read_by_type_resp_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Handle_Value_Pair_Length | The size of each attribute handle-value pair
  [in] | Data_Length | Length of Attribute_Data_List in octets
  [in] | Handle_Value_Pair_Data | Attribute Data List as defined in Bluetooth Core v4.1 spec.

Master basic profile callback which handles actions when a BLE att read by type response event happens

Returns
  None

void Master_Library_att_read_resp_event | ( | uint16_t | Connection_Handle,
|  | uint8_t | Event_Data_Length,
|  | uint8_t | Attribute_Value[]
| ) |  |

Master_Library_att_read_resp_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Event_Data_Length | Length of following data
  [in] | Attribute_Value | The value of the attribute

Master basic profile callback which handles actions when a BLE att read response event happens

Returns
  None

void Master_Library_disconnection_complete_event | ( | uint8_t | Status,
|  | uint16_t | Connection_Handle,
|  | uint8_t | Reason
| ) |  |

Master_Library_disconnection_complete_event

Parameters

  [in] | Status | BLE status related to the disconnection complete event
  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Reason | Reason for disconnection.

Master basic profile callback which handles actions when a BLE disconnection complete event happens

Returns
  None

void Master_Library_encryption_change_event | ( | uint8_t | Status,
|  | uint16_t | Connection_Handle
| ) |  |

Master_Library_encryption_change_event

Parameters

  [in] | Status | BLE status related to the encryption change event
  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.

Master basic profile callback which handles actions when a BLE encryption change event happens

Returns
  None

void Master_Library_gap_pairing_complete_event | ( | uint16_t | Connection_Handle,
|  | uint8_t | Status
| ) |  |

Master_Library_gap_pairing_complete_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Status | Pairing status

Master basic profile callback which handles actions when a BLE gap pairing complete event happens

Returns
  None

void Master_Library_gap_pass_key_req_event | ( | uint16_t | Connection_Handle | ) |

Master_Library_gap_pass_key_req_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.

Master basic profile callback which handles actions when a BLE gap pass key request event happens

Returns
  None

void Master_Library_gap_proc_complete_event | ( | uint8_t | Procedure_Code | ) |

Master_Library_gap_proc_complete_event

Parameters

  [in] | Procedure_Code | code of terminated procedure

Master basic profile callback which handles actions when a BLE gap procedure complete event happens

Returns
  None

void Master_Library_gatt_attribute_modified_event | ( | uint16_t | Connection_Handle,
|  | uint16_t | Attr_Handle,
|  | uint16_t | Offset,
|  | uint8_t | Attr_Data_Length,
|  | uint8_t | Attr_Data[]
| ) |  |

Master_Library_gatt_attribute_modified_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Attribute_Handle | The handle of the attribute
  [in] | Offset | Offset from which the write has been performed by the peer device.
  [in] | Attr_Data_Length | Length of Attr_Data in octets
  [in] | Attr_Data | The modified value

Master basic profile callback which handles actions when a BLE gatt attribute modified event happens

Returns
  None

void Master_Library_gatt_error_resp_event | ( | uint16_t | Connection_Handle,
|  | uint8_t | Req_Opcode,
|  | uint16_t | Attribute_Handle,
|  | uint8_t | Error_Code
| ) |  |

Master_Library_gatt_error_resp_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Req_Opcode | The request that generated this error response
  [in] | Attribute_Handle | The attribute handle that generated this error response
  [in] | Error_Code | The reason why the request has generated an error response

Master basic profile callback which handles actions when a BLE gatt error response event happens

Returns
  None

void Master_Library_gatt_indication_event | ( | uint16_t | Connection_Handle,
|  | uint16_t | Attribute_Handle,
|  | uint8_t | Attribute_Value_Length,
|  | uint8_t | Attribute_Value[]
| ) |  |

Master_Library_gatt_indication_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Attribute_Handle | The handle of the attribute
  [in] | Attribute_Value_Length | Length of Attribute_Value in octets
  [in] | Attribute_Value | The current value of the attribute

Master basic profile callback which handles actions when a BLE gatt indication event happens

Returns
  None

void Master_Library_gatt_notification_event | ( | uint16_t | Connection_Handle,
|  | uint16_t | Attribute_Handle,
|  | uint8_t | Attribute_Value_Length,
|  | uint8_t | Attribute_Value[]
| ) |  |

Master_Library_gatt_notification_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Attribute_Handle | The handle of the attribute
  [in] | Attribute_Value_Length | Length of Attribute_Value in octets
  [in] | Attribute_Value | The current value of the attribute

Master basic profile callback which handles actions when a BLE gatt notification event happens

Returns
  None

void Master_Library_gatt_proc_complete_event | ( | uint16_t | Connection_Handle,
|  | uint8_t | Error_Code
| ) |  |

Master_Library_gatt_proc_complete_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Error_Code | Indicates whether the procedure completed with an error or was successful

Master basic profile callback which handles actions when a BLE gatt procedure complete event happens

Returns
  None

void Master_Library_gatt_read_permit_req_event | ( | uint16_t | Connection_Handle,
|  | uint16_t | Attribute_Handle,
|  | uint16_t | Offset
| ) |  |

Master_Library_gatt_read_permit_req_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Attribute_Handle | handle of the attribute
  [in] | Offset | offset from which the read has been requested

Master basic profile callback which handles actions when a BLE gatt read permit request event happens

Returns
  None

void Master_Library_gatt_write_permit_req_event | ( | uint16_t | Connection_Handle,
|  | uint16_t | Attribute_Handle,
|  | uint8_t | Data_Length,
|  | uint8_t | Data[]
| ) |  |

Master_Library_gatt_write_permit_req_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Attribute_Handle | handle of the attribute
  [in] | Data_Length | Length of Data field
  [in] | Data | The data that the client has requested to write

Master basic profile callback which handles actions when a BLE gatt write permit request event happens

Returns
  None

void Master_Library_l2cap_connection_update_req_event | ( | uint16_t | Connection_Handle,
|  | uint8_t | Identifier,
|  | uint16_t | Interval_Min,
|  | uint16_t | Interval_Max,
|  | uint16_t | Slave_Latency,
|  | uint16_t | Timeout_Multiplier
| ) |  |

Master_Library_l2cap_connection_update_req_event

Parameters

  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Identifier | This is the identifier which associate the request to the response.
  [in] | Interval_Min | Minimum value for the connection event interval
  [in] | Interval_Max | Maximum value for the connection event interval.
  [in] | Slave_Latency | Slave latency for the connection in number of connection events
  [in] | Timeout_Multiplier | Defines connection timeout parameter

Master basic profile callback which handles actions when a BLE l2cap connection update request event happens

Returns
  None

void Master_Library_le_advertising_report_event | ( | uint8_t | Num_Reports,
|  | Advertising_Report_t | Advertising_Report[]
| ) |  |

Master_Library_le_advertising_report_event

Parameters

  [in] | Status | BLE status related to the advertising report event
  [in] | Advertising_Report | advertising report data

Master basic profile callback which handles actions when a BLE advertising report event happens

Returns
  None

void Master_Library_le_connection_complete_event | ( | uint8_t | Status,
|  | uint16_t | Connection_Handle,
|  | uint8_t | Peer_Address[6]
| ) |  |

Master_Library_le_connection_complete_event

Parameters

  [in] | Status | BLE status related to the connection complete event
  [in] | Connection_Handle | Connection_Handle to be used to identify a connection between two Bluetooth devices.
  [in] | Peer_Address | Public Device Address or Random Device Address of the peer device

Master basic profile callback which handles actions when a BLE connection complete event happens

Returns
  None