Merge branch 'master' into develop

This commit is contained in:
hathach committed 2019-11-05 15:59:26 +07:00
commit 0bcf55cc44
9 files changed
+71 -11

No files matched your search

+8 -2
View File
@@ -5,8 +5,14 @@ git:
quiet: true
env:
- BSP_PATH="$HOME/.arduino15/packages/adafruit/hardware/nrf52"
global:
- BSP_PATH="$HOME/.arduino15/packages/adafruit/hardware/nrf52"
jobs:
# Split into one job per board (aka variant)
- VARIANT="feather52840"
- VARIANT="cplaynrf52840"
- VARIANT="feather52832"
addons:
apt:
packages:
+5
View File
@@ -1,5 +1,10 @@
# Adafruit nRF52 Arduino Core Changelog
## 0.14.6 - 2019.10.30
- Added power switch pin for Circuit Playground Bluefruit
- Make min/max templates
## 0.14.5 - 2019.10.21
- Added Itsy nRF52840 Express support
+27 -2
View File
@@ -85,8 +85,33 @@ void suspendLoop(void);
#undef abs
#endif // abs
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#ifdef __cplusplus
template<class T, class L>
auto min(const T& a, const L& b) -> decltype((b < a) ? b : a)
{
return (b < a) ? b : a;
}
template<class T, class L>
auto max(const T& a, const L& b) -> decltype((b < a) ? b : a)
{
return (a < b) ? b : a;
}
#else
#ifndef min
#define min(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a < _b ? _a : _b; })
#endif
#ifndef max
#define max(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; })
#endif
#endif
#define abs(x) ((x)>0?(x):-(x))
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
+8
View File
@@ -144,6 +144,10 @@ void detachInterrupt(uint32_t pin)
void GPIOTE_IRQHandler()
{
#if CFG_DEBUG >= 3
SEGGER_SYSVIEW_RecordEnterISR();
#endif
uint32_t event = offsetof(NRF_GPIOTE_Type, EVENTS_IN[0]);
for (int ch = 0; ch < NUMBER_OF_GPIO_TE; ch++) {
@@ -166,4 +170,8 @@ void GPIOTE_IRQHandler()
event = (uint32_t)((uint32_t)event + 4);
}
#if CFG_DEBUG >= 3
SEGGER_SYSVIEW_RecordExitISR();
#endif
}
+1 -1
View File
@@ -1,5 +1,5 @@
name=Adafruit Bluefruit nRF52 Libraries
version=0.14.5
version=0.14.6
author=Adafruit
maintainer=Adafruit <info@adafruit.com>
sentence=Arduino library for nRF52-based Adafruit Bluefruit LE modules
+1 -1
View File
@@ -17,7 +17,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
name=Adafruit nRF52 Boards
version=0.14.5
version=0.14.6
# Compile variables
# -----------------
+17 -2
View File
@@ -65,8 +65,23 @@ def build_examples(variant):
build_time = time.monotonic()
for var in variants_dict:
build_examples(var)
ENV_VARIABLE_NAME = 'VARIANT'
# build only one variant if the environment variable is specified
if (ENV_VARIABLE_NAME in os.environ):
variant = os.environ.get(ENV_VARIABLE_NAME)
# only use the environment variable if the variant exists in the dictionary
if (variant in variants_dict):
build_examples(variant)
else:
print('\033[31failed\033[0m - invalid variant name "{}"'.format(variant))
fail_count += 1
exit_status = -1
else: # no environment variable specified, so build all variants
for var in variants_dict:
build_examples(var)
print(build_separator)
build_time = time.monotonic() - build_time
@@ -69,7 +69,8 @@ const uint32_t g_ADigitalPinMap[] =
32, // D33 is P1.00 (QSPI Data 2)
22, // D34 is P0.22 (QSPI Data 3)
// D35 power switch
6, // D36 is P0.06 (NeoPixel / Sensor switch)
};
void initVariant()
@@ -37,8 +37,8 @@ extern "C"
#endif // __cplusplus
// Number of pins defined in PinDescription array
#define PINS_COUNT (35)
#define NUM_DIGITAL_PINS (35)
#define PINS_COUNT (36)
#define NUM_DIGITAL_PINS (36)
#define NUM_ANALOG_INPUTS (8)
#define NUM_ANALOG_OUTPUTS (0)