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...
 

Detailed Description

RTOS-integrated BLE Framework example. Implementation of RL78G1D BLE Driver. It implements the following interfaces:

Macro Definition Documentation

◆ SF_BLE_RL78G1D_CODE_VERSION_MAJOR

#define SF_BLE_RL78G1D_CODE_VERSION_MAJOR   (2U)

BLE Interface. Major Version of code that implements the API defined in this file

◆ SF_BLE_RL78G1D_CODE_VERSION_MINOR

#define SF_BLE_RL78G1D_CODE_VERSION_MINOR   (0U)

Minor Version of code that implements the API defined in this file

Function Documentation

◆ SF_BLE_RL78G1D_AddCustomProfiles()

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

Return values
SSP_ERR_UNSUPPORTEDUnsupported Feature

◆ SF_BLE_RL78G1D_AdvertisementStart()

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.

Return values
SSP_SUCCESSStart the advertisement of device successfully
SSP_ERR_BLE_FAILEDAdvertisement Start failure
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments
SSP_ERR_INVALID_MODEInvalid GAP Role

◆ SF_BLE_RL78G1D_AdvertisementStop()

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.

Return values
SSP_SUCCESSStop the advertisement of device successfully
SSP_ERR_BLE_FAILEDAdvertisement Stop failure
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_Authorization()

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.

Return values
SSP_SUCCESSAuthorization success
SSP_ERR_BLE_FAILEDAuthorization failed
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_BondingResponse()

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.

Return values
SSP_SUCCESSBonding response success
SSP_ERR_BLE_FAILEDFailed getting bonding response
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_BondingStart()

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.

Return values
SSP_SUCCESSBonding start success
SSP_ERR_BLE_FAILEDBonding start failure
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_Close()

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.

Return values
SSP_SUCCESSSuspend the driver functionality
SSP_ERR_BLE_FAILEDClose failure
SSP_ERR_NOT_OPENModule is not opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_Connect()

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.

Return values
SSP_SUCCESSConnect success
SSP_ERR_BLE_FAILEDFailed to connect
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_INVALID_MODEInvalid GAP Role

◆ SF_BLE_RL78G1D_Disconnect()

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.

Return values
SSP_SUCCESSDisconnect success
SSP_ERR_BLE_FAILEDDisconnect failed
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_GATTCharDescDiscovery()

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.

Return values
SSP_ERR_BLE_FAILEDCharacteristics descriptor discovery failed
SSP_SUCCESSCharacteristics descriptor discovery successful
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_GATTCharDiscovery()

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.

Return values
SSP_ERR_BLE_FAILEDCharacteristics discovery failed
SSP_SUCCESSCharacteristics discovery successful
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_GATTCharExecuteWrite()

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.

Return values
SSP_ERR_BLE_FAILEDExecute write failed
SSP_SUCCESSExecute write successful
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_GATTCharRead()

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.

Return values
SSP_ERR_BLE_FAILEDCharacteristic read failed
SSP_SUCCESSCharacteristic read successful
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_GATTCharWrite()

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.

Return values
SSP_ERR_BLE_FAILEDCharacteristic write failed
SSP_SUCCESSCharacteristic write successful
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_GATTCharWriteLocal()

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.

Return values
SSP_ERR_BLE_FAILEDLocal characteristic write failed
SSP_SUCCESSLocal characteristic write successful
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_GATTSendIndicate()

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.

Return values
SSP_ERR_BLE_FAILEDSend Indication failed
SSP_SUCCESSSend Indication successful
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_GATTSendNotify()

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.

Return values
SSP_ERR_BLE_FAILEDSend notification failed
SSP_SUCCESSSend notification successful
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_GATTServiceDiscovery()

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.

Return values
SSP_ERR_BLE_FAILEDService discovery failed
SSP_SUCCESSService discovery successful
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_GATTWriteResponse()

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.

Return values
SSP_ERR_BLE_FAILEDSend write response failed
SSP_SUCCESSSend write response successful
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_InfoGet()

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.

Return values
SSP_SUCCESSSuccessfully get the BLE information
SSP_ERR_BLE_FAILEDInfo get failure
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments
SSP_ERR_TIMEOUTBLE 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

◆ SF_BLE_RL78G1D_Listen()

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.

Return values
SSP_ERR_UNSUPPORTEDFunctionality is not supported.

◆ SF_BLE_RL78G1D_Open()

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.

Return values
SSP_SUCCESSModule initialization successful
SSP_ERR_BLE_FAILEDFailed to initialize module
SSP_ERR_ALREADY_OPENDevice is already open
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments
SSP_ERR_INTERNALGATT Initialization failure

If mutex is already created then mutex create returns TX_MUTEX_ERROR which is a valid condition

◆ SF_BLE_RL78G1D_ProvisioningGet()

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

Return values
SSP_SUCCESSSuccessfully reads provisioning information
SSP_ERR_BLE_FAILEDProvisioning get failure
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_ProvisioningSet()

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.

Return values
SSP_SUCCESSSuccessfully provisioned the device.
SSP_ERR_BLE_FAILEDProvisioning set failure
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments
SSP_ERR_UNSUPPORTEDUnsupported feature

◆ SF_BLE_RL78G1D_Scan()

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.

Return values
SSP_SUCCESSSuccessful scan of available BLE devices
SSP_ERR_BLE_FAILEDScan failure
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments
SSP_ERR_INVALID_MODEInvalid GAP Role

◆ SF_BLE_RL78G1D_SetTxPower()

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.

Return values
SSP_SUCCESSTX power set successfully
SSP_ERR_BLE_FAILEDTX power set failed
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments
SSP_ERR_INVALID_ARGUMENTInvalid transmit power level parameter not supported by device

◆ SF_BLE_RL78G1D_StartEncryption()

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.

Return values
SSP_SUCCESSin case of success
SSP_ERR_BLE_FAILEDFailed to start encryption
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_VersionGet()

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.

Return values
SSP_SUCCESSSuccess
SSP_ERR_ASSERTIONArgument NULL is passed

◆ SF_BLE_RL78G1D_WhitelistAdd()

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.

Return values
SSP_SUCCESSWhitelist add success
SSP_ERR_BLE_FAILEDWhitelist add failure
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments

◆ SF_BLE_RL78G1D_WhitelistDel()

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.

Return values
SSP_SUCCESSWhitelist delete success
SSP_ERR_BLE_FAILEDWhitelist delete failure
SSP_ERR_NOT_OPENDevice Not Opened
SSP_ERR_IN_USEModule in use
SSP_ERR_TIMEOUTBLE event timeout
SSP_ERR_ASSERTIONInvalid Arguments