Patched version of nrf51822 FOTA compatible driver, with GPTIO disabled, as it clashed with the mbed definitions...

Fork of nRF51822 by Nordic Semiconductor

Embed: (wiki syntax)

« Back to documentation index

Common service definitions

Common service definitions

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

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

Modules

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

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

static __INLINE bool ble_srv_is_notification_enabled (uint8_t *p_encoded_data)
 Function for decoding a CCCD value, and then testing if notification is enabled.
static __INLINE bool ble_srv_is_indication_enabled (uint8_t *p_encoded_data)
 Function for decoding a CCCD value, and then testing if indication is enabled.
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.
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.

Detailed Description

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


Typedef Documentation

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.

Definition at line 141 of file ble_srv_common.h.


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.

Definition at line 37 of file ble_srv_common.c.

static __INLINE bool ble_srv_is_indication_enabled ( uint8_t *  p_encoded_data ) [static]

Function for decoding a CCCD value, and then testing if indication is enabled.

Parameters:
[in]p_encoded_dataBuffer where the encoded CCCD is stored.
Returns:
TRUE if indication is enabled, FALSE otherwise.

Definition at line 205 of file ble_srv_common.h.

static __INLINE bool ble_srv_is_notification_enabled ( uint8_t *  p_encoded_data ) [static]

Function for decoding a CCCD value, and then testing if notification is enabled.

Parameters:
[in]p_encoded_dataBuffer where the encoded CCCD is stored.
Returns:
TRUE if notification is enabled, FALSE otherwise.

Definition at line 192 of file ble_srv_common.h.

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.

Definition at line 24 of file ble_srv_common.c.