remove ble_srv_common.c dependency
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
/* Attention!
|
||||
* To maintain compliance with Nordic Semiconductor ASA<EFBFBD>s Bluetooth profile
|
||||
* To maintain compliance with Nordic Semiconductor ASAs Bluetooth profile
|
||||
* qualification listings, this section of source code must not be modified.
|
||||
*/
|
||||
|
||||
|
@ -1005,6 +1005,12 @@ static void service_error_handler(uint32_t nrf_error)
|
||||
}
|
||||
|
||||
|
||||
static void ascii_to_utf8(ble_srv_utf8_str_t * p_utf8, char * p_ascii)
|
||||
{
|
||||
p_utf8->length = (uint16_t)strlen(p_ascii);
|
||||
p_utf8->p_str = (uint8_t *)p_ascii;
|
||||
}
|
||||
|
||||
/**@brief Function for initializing services that will be used by the application.
|
||||
*/
|
||||
static void services_init(void)
|
||||
@ -1026,9 +1032,9 @@ static void services_init(void)
|
||||
ble_dis_init_t dis_init;
|
||||
memset(&dis_init, 0, sizeof(dis_init));
|
||||
|
||||
ble_srv_ascii_to_utf8(&dis_init.manufact_name_str, DIS_MANUFACTURER);
|
||||
ble_srv_ascii_to_utf8(&dis_init.model_num_str, DIS_MODEL);
|
||||
ble_srv_ascii_to_utf8(&dis_init.fw_rev_str, DIS_FIRMWARE);
|
||||
ascii_to_utf8(&dis_init.manufact_name_str, DIS_MANUFACTURER);
|
||||
ascii_to_utf8(&dis_init.model_num_str, DIS_MODEL);
|
||||
ascii_to_utf8(&dis_init.fw_rev_str, DIS_FIRMWARE);
|
||||
|
||||
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&dis_init.dis_attr_md.read_perm);
|
||||
BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&dis_init.dis_attr_md.write_perm);
|
||||
|
Reference in New Issue
Block a user