diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2019-07-18 10:08:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-18 10:08:58 -0700 |
| commit | 74be29cbf923fc2a40c103ab722e996045b72827 (patch) | |
| tree | 30e6f405cd6da1fc0067ca304c2b0ebd4460e9fe /shared-bindings/bleio/Address.h | |
| parent | d12e1a8d74ebb8d5d32ab0de47d3097e80c5d4fd (diff) | |
| parent | 1c31cf5f6a6d9cff6f086114f6e0a03b5247c623 (diff) | |
Merge pull request #1993 from dhalbert/ble-scanner5.0.0-alpha.0
bleio: add central and scanner functionality, cleanup bleio API, some code restructure
Diffstat (limited to 'shared-bindings/bleio/Address.h')
| -rw-r--r-- | shared-bindings/bleio/Address.h | 14 |
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 |
