nrf5/drivers/bluetooth: Renaming attr_write and attr_notify to attr_s_write and attr_s_notify to prepare for introduction of attribute write for gatt client.

This commit is contained in:
Glenn Ruben Bakke 2017-05-14 18:57:58 +02:00 committed by glennrub
parent 5d9c191a19
commit fd52691f02
4 changed files with 16 additions and 16 deletions

View File

@ -604,7 +604,7 @@ void ble_drv_attr_s_read(uint16_t conn_handle, uint16_t handle, uint16_t len, ui
}
void ble_drv_attr_write(uint16_t conn_handle, uint16_t handle, uint16_t len, uint8_t * p_data) {
void ble_drv_attr_s_write(uint16_t conn_handle, uint16_t handle, uint16_t len, uint8_t * p_data) {
ble_gatts_value_t gatts_value;
memset(&gatts_value, 0, sizeof(gatts_value));
@ -620,7 +620,7 @@ void ble_drv_attr_write(uint16_t conn_handle, uint16_t handle, uint16_t len, uin
}
}
void ble_drv_attr_notify(uint16_t conn_handle, uint16_t handle, uint16_t len, uint8_t * p_data) {
void ble_drv_attr_s_notify(uint16_t conn_handle, uint16_t handle, uint16_t len, uint8_t * p_data) {
uint16_t hvx_len = len;
ble_gatts_hvx_params_t hvx_params;

View File

@ -100,9 +100,9 @@ void ble_drv_attr_s_read(uint16_t conn_handle, uint16_t handle, uint16_t len, ui
void ble_drv_attr_c_read(uint16_t conn_handle, uint16_t handle, mp_obj_t obj, ble_drv_gattc_char_data_callback_t cb);
void ble_drv_attr_write(uint16_t conn_handle, uint16_t handle, uint16_t len, uint8_t * p_data);
void ble_drv_attr_s_write(uint16_t conn_handle, uint16_t handle, uint16_t len, uint8_t * p_data);
void ble_drv_attr_notify(uint16_t conn_handle, uint16_t handle, uint16_t len, uint8_t * p_data);
void ble_drv_attr_s_notify(uint16_t conn_handle, uint16_t handle, uint16_t len, uint8_t * p_data);
void ble_drv_scan_start(void);

View File

@ -118,10 +118,10 @@ void mp_hal_stdout_tx_strn(const char *str, size_t len) {
ubluepy_characteristic_obj_t * p_char = &ble_uart_char_tx;
ble_drv_attr_notify(p_char->p_service->p_periph->conn_handle,
p_char->handle,
send_len,
buf);
ble_drv_attr_s_notify(p_char->p_service->p_periph->conn_handle,
p_char->handle,
send_len,
buf);
len -= send_len;
buf += send_len;

View File

@ -121,15 +121,15 @@ STATIC mp_obj_t char_write(mp_obj_t self_in, mp_obj_t data) {
mp_get_buffer_raise(data, &bufinfo, MP_BUFFER_READ);
if (self->props & UBLUEPY_PROP_NOTIFY) {
ble_drv_attr_notify(self->p_service->p_periph->conn_handle,
self->handle,
bufinfo.len,
bufinfo.buf);
ble_drv_attr_s_notify(self->p_service->p_periph->conn_handle,
self->handle,
bufinfo.len,
bufinfo.buf);
} else {
ble_drv_attr_write(self->p_service->p_periph->conn_handle,
self->handle,
bufinfo.len,
bufinfo.buf);
ble_drv_attr_s_write(self->p_service->p_periph->conn_handle,
self->handle,
bufinfo.len,
bufinfo.buf);
}
return mp_const_none;