![]() |
Synergy Software Package User's Manual
|
RTOS-integrated BLE Framework example. Implementation of RL78G1D BLE Driver. It implements the following interfaces: More...
Data Structures | |
| struct | sf_ble_on_rl78g1d_cfg_t |
Macros | |
| #define | SF_BLE_RL78G1D_CODE_VERSION_MAJOR (2U) |
| #define | SF_BLE_RL78G1D_CODE_VERSION_MINOR (0U) |
Functions | |
| ssp_err_t | SF_BLE_RL78G1D_Open (sf_ble_ctrl_t *const p_ctrl, sf_ble_cfg_t const *const p_cfg) |
| Initialize BLE RL78G1D driver Implements sf_ble_api_t::open Following tasks are performed Initialize module Store user specified configuration in internal driver data for further use. More... | |
| ssp_err_t | SF_BLE_RL78G1D_Close (sf_ble_ctrl_t *const p_ctrl) |
| De-Initialize BLE driver Implements sf_ble_api_t::close Following tasks are performed Terminate working threads and timers Reset internal driver data. More... | |
| ssp_err_t | SF_BLE_RL78G1D_InfoGet (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_info_t *const p_ble_info) |
| Get BLE module information Implements sf_ble_api_t::infoGet Gets module information like chip-set information and RSSI value. More... | |
| ssp_err_t | SF_BLE_RL78G1D_ProvisioningGet (sf_ble_ctrl_t *const p_ctrl, sf_ble_provisioning_t *const p_ble_provisioning) |
| Reads the current BLE Provisioning information. More... | |
| ssp_err_t | SF_BLE_RL78G1D_ProvisioningSet (sf_ble_ctrl_t *const p_ctrl, sf_ble_provisioning_t const *const p_ble_provisioning) |
| Provisions the RL78G1D BLE Driver. More... | |
| ssp_err_t | SF_BLE_RL78G1D_Scan (sf_ble_ctrl_t *const p_ctrl, sf_ble_scan_t *const p_scan, uint8_t *const p_cnt, sf_ble_scan_info_t *p_scan_info) |
| Scans for available BLE devices. More... | |
| ssp_err_t | SF_BLE_RL78G1D_AdvertisementStart (sf_ble_ctrl_t *const p_ctrl, sf_ble_adv_info_t *const p_adv_info) |
| Make the device discoverable Implements sf_ble_api_t::advertisementStart Broadcasts device information to make it discoverable for other BLE modules. More... | |
| ssp_err_t | SF_BLE_RL78G1D_AdvertisementStop (sf_ble_ctrl_t *const p_ctrl) |
| Stop the device from being discoverable Implements sf_ble_api_t::advertisementStop Stop broadcasting device information to other BLE modules. More... | |
| ssp_err_t | SF_BLE_RL78G1D_WhitelistAdd (sf_ble_ctrl_t *const p_ctrl, uint8_t const *const p_bd_addr) |
| Add specified devices to whitelist Implements sf_ble_api_t::whitelistAdd Adds the devices to whitelist. More... | |
| ssp_err_t | SF_BLE_RL78G1D_WhitelistDel (sf_ble_ctrl_t *const p_ctrl, uint8_t const *const p_bd_addr) |
| Remove specified devices from whitelist Implements sf_ble_api_t::whitelistDel Removes devices from whiteList. More... | |
| ssp_err_t | SF_BLE_RL78G1D_BondingStart (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint8_t const *const p_bd_addr, sf_ble_bonding_start_t *p_bonding_start) |
| Initiate bonding process with remote BLE device Implements sf_ble_api_t::bondingStart Initiates bonding process and exchange security keys if enabled. More... | |
| ssp_err_t | SF_BLE_RL78G1D_BondingResponse (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint8_t const *const p_bd_addr, sf_ble_bonding_response_t *p_bonding_resp) |
| Respond to the bonding request from the remote BLE device Implements sf_ble_api_t::bondingResponse Send bonding response on reception of SF_BLE_EVENT_BONDING_INDICATION. More... | |
| ssp_err_t | SF_BLE_RL78G1D_StartEncryption (sf_ble_ctrl_t *const p_ctrl, sf_ble_sm_enc_info_t const *p_enc_info) |
| Start encryption with remote BLE device Implements sf_ble_api_t::startEncryption Encrypts with remote BLE device. More... | |
| ssp_err_t | SF_BLE_RL78G1D_Connect (sf_ble_ctrl_t *const p_ctrl, sf_ble_connection_t const *const p_conn, sf_ble_conn_handle_t *p_handle) |
| Connect to a remote BLE device Implements sf_ble_api_t::connect Initiate a connection with remote BLE device. More... | |
| ssp_err_t | SF_BLE_RL78G1D_Listen (sf_ble_ctrl_t *const p_ctrl) |
| Listen for connection request from remote device Implements sf_ble_api_t::listen. More... | |
| ssp_err_t | SF_BLE_RL78G1D_Authorization (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle) |
| Specifies remote device has been authorized by user Implements sf_ble_api_t::authorization Indicates that the specified remote device has been authorized by user. More... | |
| ssp_err_t | SF_BLE_RL78G1D_Disconnect (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle) |
| Terminate connection with remote BLE device Implements sf_ble_api_t::disconnect Disconnects with remote BLE device. More... | |
| ssp_err_t | SF_BLE_RL78G1D_SetTxPower (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *const p_handle, sf_ble_set_tx_pwr_info_t *p_tx_power_info) |
| Sets the transmit power for the procedure specified by the connection handle Implements sf_ble_api_t::setTxPower Sets the transmit power for the procedure. Valid values of TX power level (p_tx_power_info->power_lvl) for RL78G1D in dBm are -15, -10, -7, -2, -1 and 0. More... | |
| ssp_err_t | SF_BLE_RL78G1D_AddCustomProfiles (sf_ble_ctrl_t *const p_ctrl, sf_ble_svc_attribute_t *p_svc_attr, uint32_t svc_attr_len, sf_ble_char_attribute_t *p_char_attr, uint32_t char_attr_len) |
| Add GATT Attributes to create Custom GATT Profile Implements sf_ble_api_t::gattAddCustomProfiles This function is called with list of service and characteristics which is to be added to GATT database. Services and characteristics which were previously added will be removed and newly passed services and characteristics will be added. More... | |
| ssp_err_t | SF_BLE_RL78G1D_GATTServiceDiscovery (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_service_discovery_req_t const *const p_sf_ble_svc_dscv_req, sf_ble_service_discovery_rsp_t *const p_sf_ble_svc_dscv_rsp, uint32_t *const p_rsp_cnt) |
| Perform service discovery used by GATT client Implements sf_ble_api_t::gattServiceDiscovery GATT client performs service discovery of GATT server. More... | |
| ssp_err_t | SF_BLE_RL78G1D_GATTCharDiscovery (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_char_discovery_req_t const *const p_sf_ble_char_dscv_req, sf_ble_char_discovery_rsp_t *const p_sf_ble_char_dscv_rsp, uint32_t *const p_rsp_cnt) |
| Perform characteristics discovery used by GATT client Implements sf_ble_api_t::gattCharDiscovery GATT client performs characteristics discovery of GATT server. More... | |
| ssp_err_t | SF_BLE_RL78G1D_GATTCharDescDiscovery (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint16_t start_handle, uint16_t end_handle, sf_ble_char_desc_discovery_rsp_t *const p_sf_ble_chardesc_dscv_rsp, uint32_t *const p_rsp_cnt) |
| Perform characteristics descriptor discovery used by GATT client Implements sf_ble_api_t::gattCharDescDiscovery GATT client performs characteristics descriptor discovery of GATT server. More... | |
| ssp_err_t | SF_BLE_RL78G1D_GATTCharRead (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_char_read_req_t const *const p_char_read_req, sf_ble_char_read_rsp_t *const p_char_read_rsp) |
| Perform read characteristic used by GATT client Implements sf_ble_api_t::gattCharRead GATT client reads from GATT server. More... | |
| ssp_err_t | SF_BLE_RL78G1D_GATTCharWrite (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_char_write_req_t const *const p_char_write_req) |
| Perform write characteristic used by GATT client Implements sf_ble_api_t::gattCharWrite GATT client performs write operation on GATT server. More... | |
| ssp_err_t | SF_BLE_RL78G1D_GATTCharExecuteWrite (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_execute_write_t execute_flag) |
| Perform execute write on all pending write operations, used by GATT client Implements sf_ble_api_t::gattCharExecuteWrite GATT client performs execute write on all pending write operations on GATT server. More... | |
| ssp_err_t | SF_BLE_RL78G1D_GATTCharWriteLocal (sf_ble_ctrl_t *const p_ctrl, uint16_t char_handle, uint16_t data_length, uint8_t *const p_data) |
| Perform local characteristic write used by GATT server Implements sf_ble_api_t::gattCharWriteLocal GATT server performs local characteristic write. More... | |
| ssp_err_t | SF_BLE_RL78G1D_GATTSendNotify (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint16_t char_handle) |
| Send notification to GATT client, used by GATT server Implements sf_ble_api_t::gattSendNotify GATT server sends notification to GATT client. More... | |
| ssp_err_t | SF_BLE_RL78G1D_GATTSendIndicate (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint16_t char_handle) |
| Send indication to GATT client, used by GATT server Implements sf_ble_api_t::gattSendIndicate GATT server sends indication to GATT client. More... | |
| ssp_err_t | SF_BLE_RL78G1D_GATTWriteResponse (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint16_t handle, sf_ble_attribute_error_code_t error_code) |
| Send response to write operation received by GATT client, used by GATT server Implements sf_ble_api_t::gattWriteResponse GATT server sends response of write operation to GATT client. More... | |
| ssp_err_t | SF_BLE_RL78G1D_VersionGet (ssp_version_t *const p_version) |
| Get driver version based on compile time macros. Implements sf_ble_api_t::versionGet. More... | |
RTOS-integrated BLE Framework example. Implementation of RL78G1D BLE Driver. It implements the following interfaces:
| #define SF_BLE_RL78G1D_CODE_VERSION_MAJOR (2U) |
BLE Interface. Major Version of code that implements the API defined in this file
| #define SF_BLE_RL78G1D_CODE_VERSION_MINOR (0U) |
Minor Version of code that implements the API defined in this file
| ssp_err_t SF_BLE_RL78G1D_AddCustomProfiles | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_svc_attribute_t * | p_svc_attr, | ||
| uint32_t | svc_attr_len, | ||
| sf_ble_char_attribute_t * | p_char_attr, | ||
| uint32_t | char_attr_len | ||
| ) |
Add GATT Attributes to create Custom GATT Profile Implements sf_ble_api_t::gattAddCustomProfiles This function is called with list of service and characteristics which is to be added to GATT database. Services and characteristics which were previously added will be removed and newly passed services and characteristics will be added.
If services and characteristics were previously added and now those services and characteristics are to be removed and no new services and characteristics are to be added , then call this API with service and characteristics length as zero
| SSP_ERR_UNSUPPORTED | Unsupported Feature |
| ssp_err_t SF_BLE_RL78G1D_AdvertisementStart | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_adv_info_t *const | p_adv_info | ||
| ) |
Make the device discoverable Implements sf_ble_api_t::advertisementStart Broadcasts device information to make it discoverable for other BLE modules.
| SSP_SUCCESS | Start the advertisement of device successfully |
| SSP_ERR_BLE_FAILED | Advertisement Start failure |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| SSP_ERR_INVALID_MODE | Invalid GAP Role |
| ssp_err_t SF_BLE_RL78G1D_AdvertisementStop | ( | sf_ble_ctrl_t *const | p_ctrl | ) |
Stop the device from being discoverable Implements sf_ble_api_t::advertisementStop Stop broadcasting device information to other BLE modules.
| SSP_SUCCESS | Stop the advertisement of device successfully |
| SSP_ERR_BLE_FAILED | Advertisement Stop failure |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_Authorization | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle | ||
| ) |
Specifies remote device has been authorized by user Implements sf_ble_api_t::authorization Indicates that the specified remote device has been authorized by user.
| SSP_SUCCESS | Authorization success |
| SSP_ERR_BLE_FAILED | Authorization failed |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_BondingResponse | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint8_t const *const | p_bd_addr, | ||
| sf_ble_bonding_response_t * | p_bonding_resp | ||
| ) |
Respond to the bonding request from the remote BLE device Implements sf_ble_api_t::bondingResponse Send bonding response on reception of SF_BLE_EVENT_BONDING_INDICATION.
| SSP_SUCCESS | Bonding response success |
| SSP_ERR_BLE_FAILED | Failed getting bonding response |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_BondingStart | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint8_t const *const | p_bd_addr, | ||
| sf_ble_bonding_start_t * | p_bonding_start | ||
| ) |
Initiate bonding process with remote BLE device Implements sf_ble_api_t::bondingStart Initiates bonding process and exchange security keys if enabled.
| SSP_SUCCESS | Bonding start success |
| SSP_ERR_BLE_FAILED | Bonding start failure |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_Close | ( | sf_ble_ctrl_t *const | p_ctrl | ) |
De-Initialize BLE driver Implements sf_ble_api_t::close Following tasks are performed Terminate working threads and timers Reset internal driver data.
| SSP_SUCCESS | Suspend the driver functionality |
| SSP_ERR_BLE_FAILED | Close failure |
| SSP_ERR_NOT_OPEN | Module is not opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_Connect | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_connection_t const *const | p_conn, | ||
| sf_ble_conn_handle_t * | p_handle | ||
| ) |
Connect to a remote BLE device Implements sf_ble_api_t::connect Initiate a connection with remote BLE device.
| SSP_SUCCESS | Connect success |
| SSP_ERR_BLE_FAILED | Failed to connect |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_INVALID_MODE | Invalid GAP Role |
| ssp_err_t SF_BLE_RL78G1D_Disconnect | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle | ||
| ) |
Terminate connection with remote BLE device Implements sf_ble_api_t::disconnect Disconnects with remote BLE device.
| SSP_SUCCESS | Disconnect success |
| SSP_ERR_BLE_FAILED | Disconnect failed |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_GATTCharDescDiscovery | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint16_t | start_handle, | ||
| uint16_t | end_handle, | ||
| sf_ble_char_desc_discovery_rsp_t *const | p_sf_ble_chardesc_dscv_rsp, | ||
| uint32_t *const | p_rsp_cnt | ||
| ) |
Perform characteristics descriptor discovery used by GATT client Implements sf_ble_api_t::gattCharDescDiscovery GATT client performs characteristics descriptor discovery of GATT server.
| SSP_ERR_BLE_FAILED | Characteristics descriptor discovery failed |
| SSP_SUCCESS | Characteristics descriptor discovery successful |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_GATTCharDiscovery | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_char_discovery_req_t const *const | p_sf_ble_char_dscv_req, | ||
| sf_ble_char_discovery_rsp_t *const | p_sf_ble_char_dscv_rsp, | ||
| uint32_t *const | p_rsp_cnt | ||
| ) |
Perform characteristics discovery used by GATT client Implements sf_ble_api_t::gattCharDiscovery GATT client performs characteristics discovery of GATT server.
| SSP_ERR_BLE_FAILED | Characteristics discovery failed |
| SSP_SUCCESS | Characteristics discovery successful |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_GATTCharExecuteWrite | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_execute_write_t | execute_flag | ||
| ) |
Perform execute write on all pending write operations, used by GATT client Implements sf_ble_api_t::gattCharExecuteWrite GATT client performs execute write on all pending write operations on GATT server.
| SSP_ERR_BLE_FAILED | Execute write failed |
| SSP_SUCCESS | Execute write successful |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_GATTCharRead | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_char_read_req_t const *const | p_char_read_req, | ||
| sf_ble_char_read_rsp_t *const | p_char_read_rsp | ||
| ) |
Perform read characteristic used by GATT client Implements sf_ble_api_t::gattCharRead GATT client reads from GATT server.
| SSP_ERR_BLE_FAILED | Characteristic read failed |
| SSP_SUCCESS | Characteristic read successful |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_GATTCharWrite | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_char_write_req_t const *const | p_char_write_req | ||
| ) |
Perform write characteristic used by GATT client Implements sf_ble_api_t::gattCharWrite GATT client performs write operation on GATT server.
| SSP_ERR_BLE_FAILED | Characteristic write failed |
| SSP_SUCCESS | Characteristic write successful |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_GATTCharWriteLocal | ( | sf_ble_ctrl_t *const | p_ctrl, |
| uint16_t | char_handle, | ||
| uint16_t | data_length, | ||
| uint8_t *const | p_data | ||
| ) |
Perform local characteristic write used by GATT server Implements sf_ble_api_t::gattCharWriteLocal GATT server performs local characteristic write.
| SSP_ERR_BLE_FAILED | Local characteristic write failed |
| SSP_SUCCESS | Local characteristic write successful |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_GATTSendIndicate | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint16_t | char_handle | ||
| ) |
Send indication to GATT client, used by GATT server Implements sf_ble_api_t::gattSendIndicate GATT server sends indication to GATT client.
| SSP_ERR_BLE_FAILED | Send Indication failed |
| SSP_SUCCESS | Send Indication successful |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_GATTSendNotify | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint16_t | char_handle | ||
| ) |
Send notification to GATT client, used by GATT server Implements sf_ble_api_t::gattSendNotify GATT server sends notification to GATT client.
| SSP_ERR_BLE_FAILED | Send notification failed |
| SSP_SUCCESS | Send notification successful |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_GATTServiceDiscovery | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_service_discovery_req_t const *const | p_sf_ble_svc_dscv_req, | ||
| sf_ble_service_discovery_rsp_t *const | p_sf_ble_svc_dscv_rsp, | ||
| uint32_t *const | p_rsp_cnt | ||
| ) |
Perform service discovery used by GATT client Implements sf_ble_api_t::gattServiceDiscovery GATT client performs service discovery of GATT server.
| SSP_ERR_BLE_FAILED | Service discovery failed |
| SSP_SUCCESS | Service discovery successful |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_GATTWriteResponse | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint16_t | handle, | ||
| sf_ble_attribute_error_code_t | error_code | ||
| ) |
Send response to write operation received by GATT client, used by GATT server Implements sf_ble_api_t::gattWriteResponse GATT server sends response of write operation to GATT client.
| SSP_ERR_BLE_FAILED | Send write response failed |
| SSP_SUCCESS | Send write response successful |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_InfoGet | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_info_t *const | p_ble_info | ||
| ) |
Get BLE module information Implements sf_ble_api_t::infoGet Gets module information like chip-set information and RSSI value.
| SSP_SUCCESS | Successfully get the BLE information |
| SSP_ERR_BLE_FAILED | Info get failure |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| SSP_ERR_TIMEOUT | BLE event timeout |
Initialize RSSI to zero and do not check return value of Read RSSI API since InfoGet API can be called before connection is established and in that case Read RSSI API will return error but InfoGet API should return Success with 0 RSSI
| ssp_err_t SF_BLE_RL78G1D_Listen | ( | sf_ble_ctrl_t *const | p_ctrl | ) |
Listen for connection request from remote device Implements sf_ble_api_t::listen.
| SSP_ERR_UNSUPPORTED | Functionality is not supported. |
| ssp_err_t SF_BLE_RL78G1D_Open | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_cfg_t const *const | p_cfg | ||
| ) |
Initialize BLE RL78G1D driver Implements sf_ble_api_t::open Following tasks are performed Initialize module Store user specified configuration in internal driver data for further use.
| SSP_SUCCESS | Module initialization successful |
| SSP_ERR_BLE_FAILED | Failed to initialize module |
| SSP_ERR_ALREADY_OPEN | Device is already open |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| SSP_ERR_INTERNAL | GATT Initialization failure |
If mutex is already created then mutex create returns TX_MUTEX_ERROR which is a valid condition
| ssp_err_t SF_BLE_RL78G1D_ProvisioningGet | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_provisioning_t *const | p_ble_provisioning | ||
| ) |
Reads the current BLE Provisioning information.
Implements sf_ble_api_t::provisionGet Reads the provisioning information
| SSP_SUCCESS | Successfully reads provisioning information |
| SSP_ERR_BLE_FAILED | Provisioning get failure |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_ProvisioningSet | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_provisioning_t const *const | p_ble_provisioning | ||
| ) |
Provisions the RL78G1D BLE Driver.
Implements sf_ble_api_t::provisionSet This function performs the following tasks: Provisions the BLE driver. Set bonding and security modes as provisioned.
| SSP_SUCCESS | Successfully provisioned the device. |
| SSP_ERR_BLE_FAILED | Provisioning set failure |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| SSP_ERR_UNSUPPORTED | Unsupported feature |
| ssp_err_t SF_BLE_RL78G1D_Scan | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_scan_t *const | p_scan, | ||
| uint8_t *const | p_cnt, | ||
| sf_ble_scan_info_t * | p_scan_info | ||
| ) |
Scans for available BLE devices.
Implements sf_ble_api_t::scan Scans for available BLE devices and return the list to caller.
| SSP_SUCCESS | Successful scan of available BLE devices |
| SSP_ERR_BLE_FAILED | Scan failure |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| SSP_ERR_INVALID_MODE | Invalid GAP Role |
| ssp_err_t SF_BLE_RL78G1D_SetTxPower | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t *const | p_handle, | ||
| sf_ble_set_tx_pwr_info_t * | p_tx_power_info | ||
| ) |
Sets the transmit power for the procedure specified by the connection handle Implements sf_ble_api_t::setTxPower Sets the transmit power for the procedure. Valid values of TX power level (p_tx_power_info->power_lvl) for RL78G1D in dBm are -15, -10, -7, -2, -1 and 0.
| SSP_SUCCESS | TX power set successfully |
| SSP_ERR_BLE_FAILED | TX power set failed |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| SSP_ERR_INVALID_ARGUMENT | Invalid transmit power level parameter not supported by device |
| ssp_err_t SF_BLE_RL78G1D_StartEncryption | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_sm_enc_info_t const * | p_enc_info | ||
| ) |
Start encryption with remote BLE device Implements sf_ble_api_t::startEncryption Encrypts with remote BLE device.
| SSP_SUCCESS | in case of success |
| SSP_ERR_BLE_FAILED | Failed to start encryption |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_VersionGet | ( | ssp_version_t *const | p_version | ) |
Get driver version based on compile time macros. Implements sf_ble_api_t::versionGet.
| SSP_SUCCESS | Success |
| SSP_ERR_ASSERTION | Argument NULL is passed |
| ssp_err_t SF_BLE_RL78G1D_WhitelistAdd | ( | sf_ble_ctrl_t *const | p_ctrl, |
| uint8_t const *const | p_bd_addr | ||
| ) |
Add specified devices to whitelist Implements sf_ble_api_t::whitelistAdd Adds the devices to whitelist.
| SSP_SUCCESS | Whitelist add success |
| SSP_ERR_BLE_FAILED | Whitelist add failure |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |
| ssp_err_t SF_BLE_RL78G1D_WhitelistDel | ( | sf_ble_ctrl_t *const | p_ctrl, |
| uint8_t const *const | p_bd_addr | ||
| ) |
Remove specified devices from whitelist Implements sf_ble_api_t::whitelistDel Removes devices from whiteList.
| SSP_SUCCESS | Whitelist delete success |
| SSP_ERR_BLE_FAILED | Whitelist delete failure |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_ASSERTION | Invalid Arguments |