diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-06-22 22:10:15 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-06-22 22:10:15 -0400 |
| commit | 140904ec84ad1900f280c1febaa89a499c42b8c5 (patch) | |
| tree | d6d686b2056dc99975f66399ad82428f75ee8dcb /shared-module/bleio/Address.c | |
| parent | 4881e1ff55768c027404cc6a1375c43d4c3acf2a (diff) | |
getting Scanner to work
Diffstat (limited to 'shared-module/bleio/Address.c')
| -rw-r--r-- | shared-module/bleio/Address.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shared-module/bleio/Address.c b/shared-module/bleio/Address.c index e26bbe2ac..6bc458b7c 100644 --- a/shared-module/bleio/Address.c +++ b/shared-module/bleio/Address.c @@ -27,17 +27,17 @@ #include <string.h> -#include "py/objproperty.h" +#include "py/objstr.h" #include "shared-bindings/bleio/Address.h" #include "shared-module/bleio/Address.h" -void common_hal_bleio_address_construct(bleio_address_obj_t *self, uint8_t *bytes, size_t bytes_length, uint8_t address_type) { - memcpy(self->bytes, bytes, bytes_length); +void common_hal_bleio_address_construct(bleio_address_obj_t *self, uint8_t *bytes, uint8_t address_type) { + self->bytes = mp_obj_new_bytes(bytes, NUM_BLEIO_ADDRESS_BYTES); self->type = address_type; } mp_obj_t common_hal_bleio_address_get_address_bytes(bleio_address_obj_t *self) { - return mp_obj_new_bytes(self->bytes, NUM_BLEIO_ADDRESS_BYTES); + return self->bytes; } uint8_t common_hal_bleio_address_get_type(bleio_address_obj_t *self) { |
