summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
authorarturo182 <arturo182@tlen.pl>2018-07-22 16:06:19 +0200
committerarturo182 <arturo182@tlen.pl>2018-10-21 15:54:13 +0200
commit17f13ecc2cf10975bf5ff0631ce4326b9ffbbcf5 (patch)
tree32c1de123b15baa5e6bc77cc0dd516e5c5cff331 /shared-module
parent77eeecbfd92ab24504f0081630a3c3633c5be18b (diff)
nrf: Cleanup of the ble driver
Moved the functions to classes that they belong to.
Diffstat (limited to 'shared-module')
-rw-r--r--shared-module/bleio/Characteristic.h2
-rw-r--r--shared-module/bleio/Device.h2
-rw-r--r--shared-module/bleio/Service.h3
3 files changed, 4 insertions, 3 deletions
diff --git a/shared-module/bleio/Characteristic.h b/shared-module/bleio/Characteristic.h
index 2347c9c30..13f75b2c9 100644
--- a/shared-module/bleio/Characteristic.h
+++ b/shared-module/bleio/Characteristic.h
@@ -33,7 +33,7 @@
typedef struct {
mp_obj_base_t base;
bleio_service_obj_t *service;
- uint16_t service_handle;
+ uint16_t service_handle; // TODO: Is this needed?
bleio_uuid_obj_t *uuid;
mp_obj_t value_data;
uint16_t handle;
diff --git a/shared-module/bleio/Device.h b/shared-module/bleio/Device.h
index afbd8f063..8d9ece5ef 100644
--- a/shared-module/bleio/Device.h
+++ b/shared-module/bleio/Device.h
@@ -36,7 +36,7 @@ typedef struct {
bool is_peripheral;
mp_obj_t name;
bleio_address_obj_t address;
- uint16_t conn_handle;
+ volatile uint16_t conn_handle;
mp_obj_t service_list;
mp_obj_t notif_handler;
mp_obj_t conn_handler;
diff --git a/shared-module/bleio/Service.h b/shared-module/bleio/Service.h
index 1e3f09119..ff506d3f3 100644
--- a/shared-module/bleio/Service.h
+++ b/shared-module/bleio/Service.h
@@ -28,13 +28,14 @@
#define MICROPY_INCLUDED_SHARED_MODULE_BLEIO_SERVICE_H
#include "common-hal/bleio/UUID.h"
+#include "shared-module/bleio/Device.h"
typedef struct {
mp_obj_base_t base;
uint16_t handle;
bool is_secondary;
bleio_uuid_obj_t *uuid;
- mp_obj_t device;
+ bleio_device_obj_t *device;
mp_obj_t char_list;
uint16_t start_handle;
uint16_t end_handle;