I need to copy a string, but i don't know how to define nor how to copy.
This is the string that i have to copy dev_name.p_data.
I use soft device S130 in NRF51
I need to copy a string, but i don't know how to define nor how to copy.
This is the string that i have to copy dev_name.p_data.
I use soft device S130 in NRF51
Hi,
You can use memcpy for that.
You can copy the content of dev_name.p_data to device_name like this:
char device_name[31];
memcpy(device_name, dev_name.p_data, dev_name.data_len);
Hi,
You can use memcpy for that.
You can copy the content of dev_name.p_data to device_name like this:
char device_name[31];
memcpy(device_name, dev_name.p_data, dev_name.data_len);