nRF51 SDK - S110 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Common service definitions

Constants, type definitions and functions that are common to all services. More...

Modules

 Service UUID definitions
 
 Characteristic UUID definitions
 
 Definitions for the Alert Level characteristic values
 

Data Structures

struct  ble_srv_report_ref_t
 Value of a Report Reference descriptor. More...
 
struct  ble_srv_utf8_str_t
 UTF-8 string data type. More...
 
struct  ble_srv_security_mode_t
 Security settings structure. More...
 
struct  ble_srv_cccd_security_mode_t
 Security settings structure. More...
 

Macros

#define BLE_SRV_ENCODED_REPORT_REF_LEN   2
 
#define BLE_CCCD_VALUE_LEN   2
 

Typedefs

typedef void(* ble_srv_error_handler_t )(uint32_t nrf_error)
 Type definition for error handler function which will be called in case of an error in a service or a service library module.
 

Functions

uint8_t ble_srv_report_ref_encode (uint8_t *p_encoded_buffer, const ble_srv_report_ref_t *p_report_ref)
 Function for encoding a Report Reference Descriptor. More...
 
void ble_srv_ascii_to_utf8 (ble_srv_utf8_str_t *p_utf8, char *p_ascii)
 Function for making UTF-8 structure refer to an ASCII string. More...
 

Detailed Description

Constants, type definitions and functions that are common to all services.

Macro Definition Documentation

#define BLE_CCCD_VALUE_LEN   2

The length of a CCCD value.

#define BLE_SRV_ENCODED_REPORT_REF_LEN   2

The length of an encoded Report Reference Descriptor.

Function Documentation

void ble_srv_ascii_to_utf8 ( ble_srv_utf8_str_t p_utf8,
char *  p_ascii 
)

Function for making UTF-8 structure refer to an ASCII string.

Parameters
[out]p_utf8UTF-8 structure to be set.
[in]p_asciiASCII string to be referred to.
uint8_t ble_srv_report_ref_encode ( uint8_t *  p_encoded_buffer,
const ble_srv_report_ref_t p_report_ref 
)

Function for encoding a Report Reference Descriptor.

Parameters
[in]p_encoded_bufferThe buffer of the encoded data.
[in]p_report_refReport Reference value to be encoded.
Returns
Length of the encoded data.