NUCLEO-F401RE + BlueNRG shield client test (TI Sensortag reading)
bluenrg/SimpleBlueNRG_HCI/includes/bluenrg_hci.h@0:aa1e012ec210, 2014-08-16 (annotated)
- Committer:
- ostapsky
- Date:
- Sat Aug 16 11:00:04 2014 +0000
- Revision:
- 0:aa1e012ec210
CLIENT mode first revision
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ostapsky | 0:aa1e012ec210 | 1 | /******************** (C) COPYRIGHT 2013 STMicroelectronics ******************** |
ostapsky | 0:aa1e012ec210 | 2 | * File Name : bluenrg_hci.h |
ostapsky | 0:aa1e012ec210 | 3 | * Author : AMS - HEA&RF BU |
ostapsky | 0:aa1e012ec210 | 4 | * Version : V1.0.0 |
ostapsky | 0:aa1e012ec210 | 5 | * Date : 4-Oct-2013 |
ostapsky | 0:aa1e012ec210 | 6 | * Description : Header file with HCI commands for BlueNRG FW6.0 and above. |
ostapsky | 0:aa1e012ec210 | 7 | ******************************************************************************** |
ostapsky | 0:aa1e012ec210 | 8 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
ostapsky | 0:aa1e012ec210 | 9 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
ostapsky | 0:aa1e012ec210 | 10 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
ostapsky | 0:aa1e012ec210 | 11 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
ostapsky | 0:aa1e012ec210 | 12 | * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
ostapsky | 0:aa1e012ec210 | 13 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
ostapsky | 0:aa1e012ec210 | 14 | *******************************************************************************/ |
ostapsky | 0:aa1e012ec210 | 15 | |
ostapsky | 0:aa1e012ec210 | 16 | #ifndef __BLUENRG_HCI_H__ |
ostapsky | 0:aa1e012ec210 | 17 | #define __BLUENRG_HCI_H__ |
ostapsky | 0:aa1e012ec210 | 18 | |
ostapsky | 0:aa1e012ec210 | 19 | #include "gatt_server.h" |
ostapsky | 0:aa1e012ec210 | 20 | |
ostapsky | 0:aa1e012ec210 | 21 | tBleStatus aci_gatt_init(void); |
ostapsky | 0:aa1e012ec210 | 22 | tBleStatus aci_gap_init(uint8_t role, |
ostapsky | 0:aa1e012ec210 | 23 | uint16_t* service_handle, |
ostapsky | 0:aa1e012ec210 | 24 | uint16_t* dev_name_char_handle, |
ostapsky | 0:aa1e012ec210 | 25 | uint16_t* appearance_char_handle); |
ostapsky | 0:aa1e012ec210 | 26 | tBleStatus aci_gap_update_adv_data(uint8_t AdvLen, const uint8_t *AdvData); |
ostapsky | 0:aa1e012ec210 | 27 | tBleStatus aci_gap_set_non_discoverable(void); |
ostapsky | 0:aa1e012ec210 | 28 | tBleStatus aci_gap_set_discoverable(uint8_t AdvType, uint16_t AdvIntervMin, uint16_t AdvIntervMax, |
ostapsky | 0:aa1e012ec210 | 29 | uint8_t OwnAddrType, uint8_t AdvFilterPolicy, uint8_t LocalNameLen, |
ostapsky | 0:aa1e012ec210 | 30 | const char *LocalName, uint8_t ServiceUUIDLen, const uint8_t* ServiceUUIDList, |
ostapsky | 0:aa1e012ec210 | 31 | uint16_t SlaveConnIntervMin, uint16_t SlaveConnIntervMax); |
ostapsky | 0:aa1e012ec210 | 32 | tBleStatus aci_gap_set_auth_requirement(uint8_t mitm_mode, |
ostapsky | 0:aa1e012ec210 | 33 | uint8_t oob_enable, |
ostapsky | 0:aa1e012ec210 | 34 | uint8_t oob_data[16], |
ostapsky | 0:aa1e012ec210 | 35 | uint8_t min_encryption_key_size, |
ostapsky | 0:aa1e012ec210 | 36 | uint8_t max_encryption_key_size, |
ostapsky | 0:aa1e012ec210 | 37 | uint8_t use_fixed_pin, |
ostapsky | 0:aa1e012ec210 | 38 | uint32_t fixed_pin, |
ostapsky | 0:aa1e012ec210 | 39 | uint8_t bonding_mode); |
ostapsky | 0:aa1e012ec210 | 40 | tBleStatus aci_gap_start_limited_discovery_proc(uint16_t scanInterval, uint16_t scanWindow, |
ostapsky | 0:aa1e012ec210 | 41 | uint8_t own_address_type, uint8_t filterDuplicates); |
ostapsky | 0:aa1e012ec210 | 42 | tBleStatus aci_gap_start_general_discovery_proc(uint16_t scanInterval, uint16_t scanWindow, |
ostapsky | 0:aa1e012ec210 | 43 | uint8_t own_address_type, uint8_t filterDuplicates); |
ostapsky | 0:aa1e012ec210 | 44 | tBleStatus aci_gap_start_auto_conn_establishment(uint16_t scanInterval, uint16_t scanWindow, |
ostapsky | 0:aa1e012ec210 | 45 | uint8_t own_bdaddr_type, uint16_t conn_min_interval, |
ostapsky | 0:aa1e012ec210 | 46 | uint16_t conn_max_interval, uint16_t conn_latency, |
ostapsky | 0:aa1e012ec210 | 47 | uint16_t supervision_timeout, uint16_t min_conn_length, |
ostapsky | 0:aa1e012ec210 | 48 | uint16_t max_conn_length, uint8_t num_whitelist_entries, |
ostapsky | 0:aa1e012ec210 | 49 | uint8_t *addr_array); |
ostapsky | 0:aa1e012ec210 | 50 | tBleStatus aci_gap_create_connection(uint16_t scanInterval, uint16_t scanWindow, |
ostapsky | 0:aa1e012ec210 | 51 | uint8_t peer_bdaddr_type, tBDAddr peer_bdaddr, |
ostapsky | 0:aa1e012ec210 | 52 | uint8_t own_bdaddr_type, uint16_t conn_min_interval, |
ostapsky | 0:aa1e012ec210 | 53 | uint16_t conn_max_interval, uint16_t conn_latency, |
ostapsky | 0:aa1e012ec210 | 54 | uint16_t supervision_timeout, uint16_t min_conn_length, |
ostapsky | 0:aa1e012ec210 | 55 | uint16_t max_conn_length); |
ostapsky | 0:aa1e012ec210 | 56 | tBleStatus aci_gap_terminate_gap_procedure(uint8_t procedure_code); |
ostapsky | 0:aa1e012ec210 | 57 | tBleStatus aci_gap_terminate(uint16_t conn_handle, uint8_t reason); |
ostapsky | 0:aa1e012ec210 | 58 | tBleStatus aci_gatt_add_serv(tHalUint8 service_uuid_type, |
ostapsky | 0:aa1e012ec210 | 59 | const tHalUint8* service_uuid, |
ostapsky | 0:aa1e012ec210 | 60 | tHalUint8 service_type, |
ostapsky | 0:aa1e012ec210 | 61 | tHalUint8 max_attr_records, |
ostapsky | 0:aa1e012ec210 | 62 | tHalUint16 *serviceHandle); |
ostapsky | 0:aa1e012ec210 | 63 | tBleStatus aci_gatt_add_char(tHalUint16 serviceHandle, |
ostapsky | 0:aa1e012ec210 | 64 | tUuidType charUuidType, |
ostapsky | 0:aa1e012ec210 | 65 | const tHalUint8* charUuid, |
ostapsky | 0:aa1e012ec210 | 66 | tHalUint16 charValueLen, |
ostapsky | 0:aa1e012ec210 | 67 | tHalUint8 charProperties, |
ostapsky | 0:aa1e012ec210 | 68 | tAttrSecurityFlags secPermissions, |
ostapsky | 0:aa1e012ec210 | 69 | tGattServerEvent gattEvtMask, |
ostapsky | 0:aa1e012ec210 | 70 | tHalUint8 encryKeySize, |
ostapsky | 0:aa1e012ec210 | 71 | tHalUint8 isVariable, |
ostapsky | 0:aa1e012ec210 | 72 | tHalUint16* charHandle); |
ostapsky | 0:aa1e012ec210 | 73 | tBleStatus aci_gatt_add_char_desc(tHalUint16 serviceHandle, |
ostapsky | 0:aa1e012ec210 | 74 | tHalUint16 charHandle, |
ostapsky | 0:aa1e012ec210 | 75 | tUuidType descUuidType, |
ostapsky | 0:aa1e012ec210 | 76 | const tHalUint8* uuid, |
ostapsky | 0:aa1e012ec210 | 77 | tHalUint8 descValueMaxLen, |
ostapsky | 0:aa1e012ec210 | 78 | tHalUint8 descValueLen, |
ostapsky | 0:aa1e012ec210 | 79 | const void* descValue, |
ostapsky | 0:aa1e012ec210 | 80 | tAttrSecurityFlags secPermissions, |
ostapsky | 0:aa1e012ec210 | 81 | tAttrSecurityFlags accPermissions, |
ostapsky | 0:aa1e012ec210 | 82 | tGattServerEvent gattEvtMask, |
ostapsky | 0:aa1e012ec210 | 83 | tHalUint8 encryKeySize, |
ostapsky | 0:aa1e012ec210 | 84 | tHalUint8 isVariable, |
ostapsky | 0:aa1e012ec210 | 85 | tHalUint16* descHandle); |
ostapsky | 0:aa1e012ec210 | 86 | tBleStatus aci_gatt_update_char_value(tHalUint16 servHandle, |
ostapsky | 0:aa1e012ec210 | 87 | tHalUint16 charHandle, |
ostapsky | 0:aa1e012ec210 | 88 | tHalUint8 charValOffset, |
ostapsky | 0:aa1e012ec210 | 89 | tHalUint8 charValueLen, |
ostapsky | 0:aa1e012ec210 | 90 | const tHalUint8 *charValue); |
ostapsky | 0:aa1e012ec210 | 91 | |
ostapsky | 0:aa1e012ec210 | 92 | tBleStatus aci_gatt_set_desc_value(tHalUint16 servHandle, |
ostapsky | 0:aa1e012ec210 | 93 | tHalUint16 charHandle, |
ostapsky | 0:aa1e012ec210 | 94 | tHalUint16 charDescHandle, |
ostapsky | 0:aa1e012ec210 | 95 | tHalUint16 charDescValOffset, |
ostapsky | 0:aa1e012ec210 | 96 | tHalUint8 charDescValueLen, |
ostapsky | 0:aa1e012ec210 | 97 | const tHalUint8 *charDescValue); |
ostapsky | 0:aa1e012ec210 | 98 | |
ostapsky | 0:aa1e012ec210 | 99 | tBleStatus aci_l2cap_connection_parameter_update_request(uint16_t conn_handle, uint16_t interval_min, uint16_t interval_max, |
ostapsky | 0:aa1e012ec210 | 100 | uint16_t slave_latency, uint16_t timeout_mult); |
ostapsky | 0:aa1e012ec210 | 101 | |
ostapsky | 0:aa1e012ec210 | 102 | tBleStatus aci_hal_set_tx_power_level(uint8_t en_high_power, uint8_t pa_level); |
ostapsky | 0:aa1e012ec210 | 103 | |
ostapsky | 0:aa1e012ec210 | 104 | tBleStatus aci_hal_write_config_data(tHalUint8 offset, |
ostapsky | 0:aa1e012ec210 | 105 | tHalUint8 len, |
ostapsky | 0:aa1e012ec210 | 106 | const tHalUint8 *val); |
ostapsky | 0:aa1e012ec210 | 107 | tBleStatus aci_hal_tone_start(uint8_t rf_channel); |
ostapsky | 0:aa1e012ec210 | 108 | |
ostapsky | 0:aa1e012ec210 | 109 | tBleStatus aci_gatt_allow_read(tHalUint16 conn_handle); |
ostapsky | 0:aa1e012ec210 | 110 | |
ostapsky | 0:aa1e012ec210 | 111 | tBleStatus aci_gatt_disc_all_prim_services(uint16_t conn_handle); |
ostapsky | 0:aa1e012ec210 | 112 | |
ostapsky | 0:aa1e012ec210 | 113 | tBleStatus aci_gatt_find_included_services(uint16_t conn_handle, uint16_t start_handle, |
ostapsky | 0:aa1e012ec210 | 114 | uint16_t end_handle); |
ostapsky | 0:aa1e012ec210 | 115 | |
ostapsky | 0:aa1e012ec210 | 116 | tBleStatus aci_gatt_disc_all_charac_of_serv(uint16_t conn_handle, uint16_t start_attr_handle, |
ostapsky | 0:aa1e012ec210 | 117 | uint16_t end_attr_handle); |
ostapsky | 0:aa1e012ec210 | 118 | |
ostapsky | 0:aa1e012ec210 | 119 | tBleStatus aci_gatt_disc_all_charac_descriptors(uint16_t conn_handle, uint16_t char_val_handle, |
ostapsky | 0:aa1e012ec210 | 120 | uint16_t char_end_handle); |
ostapsky | 0:aa1e012ec210 | 121 | |
ostapsky | 0:aa1e012ec210 | 122 | tBleStatus aci_gatt_read_charac_val(uint16_t conn_handle, uint16_t attr_handle); |
ostapsky | 0:aa1e012ec210 | 123 | |
ostapsky | 0:aa1e012ec210 | 124 | tBleStatus aci_gatt_read_long_charac_val(uint16_t conn_handle, uint16_t attr_handle, |
ostapsky | 0:aa1e012ec210 | 125 | uint16_t val_offset); |
ostapsky | 0:aa1e012ec210 | 126 | |
ostapsky | 0:aa1e012ec210 | 127 | tBleStatus aci_gatt_write_charac_value(uint16_t conn_handle, uint16_t attr_handle, |
ostapsky | 0:aa1e012ec210 | 128 | uint8_t value_len, uint8_t *attr_value); |
ostapsky | 0:aa1e012ec210 | 129 | |
ostapsky | 0:aa1e012ec210 | 130 | tBleStatus aci_gatt_write_charac_descriptor(uint16_t conn_handle, uint16_t attr_handle, |
ostapsky | 0:aa1e012ec210 | 131 | uint8_t value_len, uint8_t *attr_value); |
ostapsky | 0:aa1e012ec210 | 132 | |
ostapsky | 0:aa1e012ec210 | 133 | tBleStatus aci_gatt_write_without_response(uint16_t conn_handle, uint16_t attr_handle, |
ostapsky | 0:aa1e012ec210 | 134 | uint8_t value_len, uint8_t *attr_value); |
ostapsky | 0:aa1e012ec210 | 135 | |
ostapsky | 0:aa1e012ec210 | 136 | tBleStatus aci_gatt_write_response(uint16_t conn_handle, |
ostapsky | 0:aa1e012ec210 | 137 | uint16_t attr_handle, |
ostapsky | 0:aa1e012ec210 | 138 | uint8_t write_status, |
ostapsky | 0:aa1e012ec210 | 139 | uint8_t err_code, |
ostapsky | 0:aa1e012ec210 | 140 | uint8_t att_val_len, |
ostapsky | 0:aa1e012ec210 | 141 | uint8_t *att_val); |
ostapsky | 0:aa1e012ec210 | 142 | |
ostapsky | 0:aa1e012ec210 | 143 | #endif /* __BLUENRG_HCI_H__ */ |
ostapsky | 0:aa1e012ec210 | 144 |