Skip to content

Commit 3177973

Browse files
committed
Add BLE serial service
1 parent 5a4a803 commit 3177973

29 files changed

+791
-700
lines changed

locale/circuitpython.pot

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,6 @@ msgstr ""
147147
msgid "%q must of type %q"
148148
msgstr ""
149149

150-
#: shared-bindings/keypad/KeyMatrix.c shared-bindings/keypad/Keys.c
151-
#: shared-bindings/keypad/ShiftRegisterKeys.c
152-
msgid "%q must store bytes"
153-
msgstr ""
154-
155150
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
156151
#: shared-bindings/canio/Match.c
157152
msgid "%q out of range"

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171

7272
#if CIRCUITPY_BLEIO
7373
#include "shared-bindings/_bleio/__init__.h"
74-
#include "supervisor/shared/bluetooth.h"
74+
#include "supervisor/shared/bluetooth/bluetooth.h"
7575
#endif
7676

7777
#if CIRCUITPY_BOARD

ports/nrf/background.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@
4141
#include "common-hal/audiopwmio/PWMAudioOut.h"
4242
#endif
4343

44-
#if CIRCUITPY_BLEIO
45-
#include "supervisor/shared/bluetooth.h"
46-
#include "common-hal/_bleio/bonding.h"
47-
#endif
48-
4944
void port_start_background_task(void) {
5045
}
5146
void port_finish_background_task(void) {

ports/nrf/bluetooth/ble_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "py/misc.h"
3939
#include "py/mpstate.h"
4040

41-
#include "supervisor/shared/bluetooth.h"
41+
// #include "supervisor/shared/bluetooth.h"
4242

4343
nrf_nvic_state_t nrf_nvic_state = { 0 };
4444

ports/nrf/bluetooth/ble_uart.c

Lines changed: 0 additions & 191 deletions
This file was deleted.

ports/nrf/bluetooth/ringbuffer.h

Lines changed: 0 additions & 99 deletions
This file was deleted.

ports/nrf/common-hal/_bleio/Adapter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include "py/gc.h"
4141
#include "py/objstr.h"
4242
#include "py/runtime.h"
43-
#include "supervisor/shared/bluetooth.h"
43+
#include "supervisor/shared/bluetooth/bluetooth.h"
4444
#include "supervisor/shared/safe_mode.h"
4545
#include "supervisor/shared/tick.h"
4646
#include "supervisor/usb.h"

ports/nrf/common-hal/_bleio/Characteristic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ STATIC void characteristic_gatts_notify_indicate(uint16_t handle, uint16_t conn_
8686
void common_hal_bleio_characteristic_construct(bleio_characteristic_obj_t *self, bleio_service_obj_t *service,
8787
uint16_t handle, bleio_uuid_obj_t *uuid, bleio_characteristic_properties_t props,
8888
bleio_attribute_security_mode_t read_perm, bleio_attribute_security_mode_t write_perm,
89-
mp_int_t max_length, bool fixed_length, mp_buffer_info_t *initial_value_bufinfo) {
89+
mp_int_t max_length, bool fixed_length, mp_buffer_info_t *initial_value_bufinfo,
90+
const char *user_description) {
9091
self->service = service;
9192
self->uuid = uuid;
9293
self->handle = BLE_GATT_HANDLE_INVALID;
@@ -125,7 +126,7 @@ void common_hal_bleio_characteristic_construct(bleio_characteristic_obj_t *self,
125126
if (service->is_remote) {
126127
self->handle = handle;
127128
} else {
128-
common_hal_bleio_service_add_characteristic(self->service, self, initial_value_bufinfo);
129+
common_hal_bleio_service_add_characteristic(self->service, self, initial_value_bufinfo, user_description);
129130
}
130131
}
131132

0 commit comments

Comments
 (0)