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 /ports/nrf/bluetooth | |
| 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 'ports/nrf/bluetooth')
| -rw-r--r-- | ports/nrf/bluetooth/ble_drv.c | 3 | ||||
| -rw-r--r-- | ports/nrf/bluetooth/ble_drv.h | 10 | ||||
| -rw-r--r-- | ports/nrf/bluetooth/ble_uart.c | 3 |
3 files changed, 9 insertions, 7 deletions
diff --git a/ports/nrf/bluetooth/ble_drv.c b/ports/nrf/bluetooth/ble_drv.c index f6e575a8c..6b17e7af2 100644 --- a/ports/nrf/bluetooth/ble_drv.c +++ b/ports/nrf/bluetooth/ble_drv.c @@ -3,8 +3,9 @@ * * The MIT License (MIT) * - * Copyright (c) 2016 Glenn Ruben Bakke + * Copyright (c) 2019 Dan Halbert for Adafruit Industries * Copyright (c) 2018 Artur Pacholec + * Copyright (c) 2016 Glenn Ruben Bakke * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/ports/nrf/bluetooth/ble_drv.h b/ports/nrf/bluetooth/ble_drv.h index cdb4c9b03..a066f588f 100644 --- a/ports/nrf/bluetooth/ble_drv.h +++ b/ports/nrf/bluetooth/ble_drv.h @@ -3,8 +3,9 @@ * * The MIT License (MIT) * - * Copyright (c) 2016 Glenn Ruben Bakke + * Copyright (c) 2019 Dan Halbert for Adafruit Industries * Copyright (c) 2018 Artur Pacholec + * Copyright (c) 2016 Glenn Ruben Bakke * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -30,10 +31,6 @@ #include "ble.h" -#if (BLUETOOTH_SD == 132) && (BLE_API_VERSION == 2) -#define NRF52 -#endif - #define MAX_TX_IN_PROGRESS 10 #ifndef BLE_GATT_ATT_MTU_DEFAULT @@ -43,9 +40,12 @@ #define BLE_CONN_CFG_TAG_CUSTOM 1 #define MSEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000) / (RESOLUTION)) +#define SEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000000) / (RESOLUTION)) // 0.625 msecs (625 usecs) #define ADV_INTERVAL_UNIT_FLOAT_SECS (0.000625) +// Microseconds is the base unit. The macros above know that. #define UNIT_0_625_MS (625) +#define UNIT_1_25_MS (1250) #define UNIT_10_MS (10000) typedef void (*ble_drv_evt_handler_t)(ble_evt_t*, void*); diff --git a/ports/nrf/bluetooth/ble_uart.c b/ports/nrf/bluetooth/ble_uart.c index 7faaafb0e..91d10cff1 100644 --- a/ports/nrf/bluetooth/ble_uart.c +++ b/ports/nrf/bluetooth/ble_uart.c @@ -3,8 +3,9 @@ * * The MIT License (MIT) * - * Copyright (c) 2017 Glenn Ruben Bakke + * Copyright (c) 2019 Dan Halbert for Adafruit Industries * Copyright (c) 2018 Artur Pacholec + * Copyright (c) 2017 Glenn Ruben Bakke * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal |
