able to build with 52833

This commit is contained in:
hathach
2019-11-29 01:02:05 +07:00
parent d0389fe8f4
commit e3449cd771
8 changed files with 49 additions and 41 deletions

View File

@ -83,7 +83,7 @@
*/
#define ADAFRUIT_DEVICE_TYPE 0x0052
#ifdef NRF52840_XXAA
#if defined(NRF52840_XXAA) || defined(NRF52833_XXAA)
#define ADAFRUIT_DEV_REV 52840
#elif defined NRF52832_XXAA
#define ADAFRUIT_DEV_REV 0xADAF

View File

@ -68,7 +68,7 @@
#include "nrfx_nvmc.h"
#ifdef NRF52840_XXAA
#ifdef NRF_USBD
#include "nrf_usbd.h"
#include "tusb.h"
@ -120,9 +120,12 @@ enum { BLE_CONN_CFG_HIGH_BANDWIDTH = 1 };
#define APPDATA_ADDR_START (BOOTLOADER_REGION_START-DFU_APP_DATA_RESERVED)
#ifdef NRF52840_XXAA
STATIC_ASSERT( APPDATA_ADDR_START == 0xED000);
// Flash 1024 KB
STATIC_ASSERT( APPDATA_ADDR_START == 0xED000);
#else
STATIC_ASSERT( APPDATA_ADDR_START == 0x6D000);
// Flash 512 KB
STATIC_ASSERT( APPDATA_ADDR_START == 0x6D000);
#endif
@ -423,7 +426,7 @@ uint32_t proc_soc(void)
{
pstorage_sys_event_handler(soc_evt);
#ifdef NRF52840_XXAA
#ifdef NRF_USBD
extern void tusb_hal_nrf_power_event(uint32_t event);
/*------------- usb power event handler -------------*/
int32_t usbevt = (soc_evt == NRF_EVT_POWER_USB_DETECTED ) ? NRFX_POWER_USB_EVT_DETECTED: