summaryrefslogtreecommitdiff
path: root/shared-bindings/bleio/Address.h
diff options
context:
space:
mode:
authorsommersoft <sommersoft@users.noreply.github.com>2019-07-27 10:46:53 -0500
committerGitHub <noreply@github.com>2019-07-27 10:46:53 -0500
commitcebdadd0f6122826337c962b3d443bd41d1de69d (patch)
treee2aeb661c3760f7aaf152bc1bbd95fd120161ab8 /shared-bindings/bleio/Address.h
parentc335f170d7d561d07ca7412da60c260e13c5e746 (diff)
parentd99d3bd471920cdd9b2683b7dbd538551f7aee43 (diff)
Merge branch 'master' into dynamic_support_matrix
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