Skip to content

Commit ef4d0e7

Browse files
committed
Merge branch 'master' into develop
2 parents c3fc0db + fc00e2b commit ef4d0e7

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This is a CDC/DFU/UF2 bootloader for nRF52 boards.
66

77
- [Adafruit Feather nRF52832](https://www.adafruit.com/product/3406)
88
- [Adafruit Feather nRF52840 Express](https://www.adafruit.com/product/4062)
9+
- [Adafruit Circuit Playground Bluefruit](https://www.adafruit.com/product/4333)
910
- Adafruit Metro nRF52840 Express
1011
- [Electronut Labs Papyr](https://docs.electronut.in/papyr/)
1112
- MakerDiary MDK nRF52840 USB Dongle

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Adafruit nRF52 Bootloader Changelog
22

3+
## 0.2.12 - 2019.08.22
4+
5+
- Fixed block alignment bug also in dfu_sd_image_validate (single & dual banks), PR #71 thanks to @fanoush
6+
- Added new board: Adafruit Circuit Playground Bluefruit
7+
- Added new board: Adafruit ItsyBitsy nRF52840 Express (WIP)
8+
- Fixed bug in __DOSTIME__ macro, PR #75 thanks to @henrygab
9+
310
## 0.2.11
411

512
- Fixed various FAT issues, thanks to @henrygab

src/boards.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,16 @@
4242
//------------- IMPLEMENTATION -------------//
4343
void button_init(uint32_t pin)
4444
{
45-
nrf_gpio_cfg_sense_input(pin, BUTTON_PULL, NRF_GPIO_PIN_SENSE_LOW);
45+
if (BUTTON_PULL == NRF_GPIO_PIN_PULLDOWN) {
46+
nrf_gpio_cfg_sense_input(pin, BUTTON_PULL, NRF_GPIO_PIN_SENSE_HIGH);
47+
} else {
48+
nrf_gpio_cfg_sense_input(pin, BUTTON_PULL, NRF_GPIO_PIN_SENSE_LOW);
49+
}
4650
}
4751

4852
bool button_pressed(uint32_t pin)
4953
{
50-
return (nrf_gpio_pin_read(pin) == 0) ? true : false;
54+
return (nrf_gpio_pin_read(pin) == BUTTON_DIR) ? true : false;
5155
}
5256

5357
void board_init(void)

src/boards.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
#ifndef BUTTON_FRESET
3939
#define BUTTON_FRESET BUTTON_2
4040
#endif
41+
#ifndef BUTTON_DIR
42+
#if BUTTON_PULL == NRF_GPIO_PIN_PULLDOWN
43+
#define BUTTON_DIR 1
44+
#elif BUTTON_PULL == NRF_GPIO_PIN_PULLUP
45+
#define BUTTON_DIR 0
46+
#endif
47+
#endif
4148

4249
// The primary LED is usually Red but not in all cases.
4350
#define LED_PRIMARY 0

0 commit comments

Comments
 (0)