Merge pull request #117 from adafruit/develop

follow up to #114
This commit is contained in:
Ha Thach 2020-03-12 13:00:51 +07:00 committed by GitHub
commit 3718aaeeaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 11 deletions

View File

@ -4,9 +4,12 @@
This is a CDC/DFU/UF2 bootloader for nRF52 boards. This is a CDC/DFU/UF2 bootloader for nRF52 boards.
- [Adafruit CLUE](https://www.adafruit.com/product/4500)
- [Adafruit Circuit Playground Bluefruit](https://www.adafruit.com/product/4333)
- [Adafruit Feather nRF52832](https://www.adafruit.com/product/3406) - [Adafruit Feather nRF52832](https://www.adafruit.com/product/3406)
- [Adafruit Feather nRF52840 Express](https://www.adafruit.com/product/4062) - [Adafruit Feather nRF52840 Express](https://www.adafruit.com/product/4062)
- [Adafruit Circuit Playground Bluefruit](https://www.adafruit.com/product/4333) - [Adafruit Feather nRF52840 Sense](https://www.adafruit.com/product/4516)
- [Adafruit ItsyBitsy nRF52840 Express](https://www.adafruit.com/product/4481)
- Adafruit Metro nRF52840 Express - Adafruit Metro nRF52840 Express
- [Electronut Labs Papyr](https://docs.electronut.in/papyr/) - [Electronut Labs Papyr](https://docs.electronut.in/papyr/)
- MakerDiary MDK nRF52840 USB Dongle - MakerDiary MDK nRF52840 USB Dongle

View File

@ -104,7 +104,6 @@ void board_teardown(void)
#if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN) #if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN)
neopixel_teardown(); neopixel_teardown();
#endif #endif
// Button
// Stop RTC1 used by app_timer // Stop RTC1 used by app_timer
NVIC_DisableIRQ(RTC1_IRQn); NVIC_DisableIRQ(RTC1_IRQn);
@ -117,12 +116,10 @@ void board_teardown(void)
NRF_CLOCK->TASKS_LFCLKSTOP = 1UL; NRF_CLOCK->TASKS_LFCLKSTOP = 1UL;
// make sure all pins are back in reset state // make sure all pins are back in reset state
for (int i = 0; i < 32; ++i) // NUMBER_OF_PINS is defined in nrf_gpio.h
for (int i = 0; i < NUMBER_OF_PINS; ++i)
{ {
NRF_P0->PIN_CNF[i] = 2; nrf_gpio_cfg_default(i);
#ifdef NRF_P1
NRF_P1->PIN_CNF[i] = 2;
#endif
} }
} }

View File

@ -28,6 +28,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include "nrf.h"
#include "nrf_gpio.h" #include "nrf_gpio.h"
#include "board.h" #include "board.h"

View File

@ -57,7 +57,7 @@
// Used as model string in OTA mode // Used as model string in OTA mode
#define BLEDIS_MANUFACTURER "Adafruit Industries" #define BLEDIS_MANUFACTURER "Adafruit Industries"
#define BLEDIS_MODEL "Clue nRF52840" #define BLEDIS_MODEL "CLUE nRF52840"
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
// USB // USB
@ -67,9 +67,9 @@
#define USB_DESC_CDC_ONLY_PID 0x0071 #define USB_DESC_CDC_ONLY_PID 0x0071
//------------- UF2 -------------// //------------- UF2 -------------//
#define UF2_PRODUCT_NAME "Adafruit Clue nRF52840" #define UF2_PRODUCT_NAME "Adafruit CLUE nRF52840"
#define UF2_VOLUME_LABEL "CLUEBOOT" #define UF2_VOLUME_LABEL "CLUEBOOT"
#define UF2_BOARD_ID "nRF52840-Clue-revA" #define UF2_BOARD_ID "nRF52840-CLUE-revA"
#define UF2_INDEX_URL "https://www.adafruit.com/" #define UF2_INDEX_URL "https://www.adafruit.com/product/4500"
#endif // _CLUE_NRF52840_H #endif // _CLUE_NRF52840_H