summaryrefslogtreecommitdiff
path: root/shared-bindings/bleio/Address.h
diff options
context:
space:
mode:
Diffstat (limited to 'shared-bindings/bleio/Address.h')
-rw-r--r--shared-bindings/bleio/Address.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/shared-bindings/bleio/Address.h b/shared-bindings/bleio/Address.h
index 9c9e20968..5e02ee210 100644
--- a/shared-bindings/bleio/Address.h
+++ b/shared-bindings/bleio/Address.h
@@ -3,6 +3,7 @@
*
* The MIT License (MIT)
*
+ * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -28,7 +29,20 @@
#define MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_ADDRESS_H
#include "py/objtype.h"
+#include "shared-module/bleio/Address.h"
+
+#define BLEIO_ADDRESS_TYPE_PUBLIC (0)
+#define BLEIO_ADDRESS_TYPE_RANDOM_STATIC (1)
+#define BLEIO_ADDRESS_TYPE_RANDOM_PRIVATE_RESOLVABLE (2)
+#define BLEIO_ADDRESS_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE (3)
+
+#define BLEIO_ADDRESS_TYPE_MIN BLEIO_ADDRESS_TYPE_PUBLIC
+#define BLEIO_ADDRESS_TYPE_MAX BLEIO_ADDRESS_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE
extern const mp_obj_type_t bleio_address_type;
+extern void common_hal_bleio_address_construct(bleio_address_obj_t *self, uint8_t *bytes, uint8_t address_type);
+extern mp_obj_t common_hal_bleio_address_get_address_bytes(bleio_address_obj_t *self);
+extern uint8_t common_hal_bleio_address_get_type(bleio_address_obj_t *self);
+
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_ADDRESS_H