update repo to work with latest tinyusb and nrfx module

This commit is contained in:
hathach
2019-11-11 15:27:44 +07:00
parent 3d99a55940
commit 126115a2cb
12 changed files with 213 additions and 359 deletions

View File

@ -119,9 +119,9 @@ static void wait_for_events(void)
// Feed all Watchdog just in case application enable it
// WDT cannot be disabled once started. It even last through soft reset (NVIC Reset)
if ( nrf_wdt_started() )
if ( nrf_wdt_started(NRF_WDT) )
{
for (uint8_t i=0; i<8; i++) nrf_wdt_reload_request_set(i);
for (uint8_t i=0; i<8; i++) nrf_wdt_reload_request_set(NRF_WDT, i);
}
// Event received. Process it from the scheduler.
@ -194,8 +194,8 @@ static void bootloader_settings_save(bootloader_settings_t * p_settings)
}
else
{
nrf_nvmc_page_erase(BOOTLOADER_SETTINGS_ADDRESS);
nrf_nvmc_write_words(BOOTLOADER_SETTINGS_ADDRESS, (uint32_t *) p_settings, sizeof(bootloader_settings_t) / 4);
nrfx_nvmc_page_erase(BOOTLOADER_SETTINGS_ADDRESS);
nrfx_nvmc_words_write(BOOTLOADER_SETTINGS_ADDRESS, (uint32_t *) p_settings, sizeof(bootloader_settings_t) / 4);
pstorage_callback_handler(&m_bootsettings_handle, PSTORAGE_STORE_OP_CODE, NRF_SUCCESS, (uint8_t *) p_settings, sizeof(bootloader_settings_t));
}

View File

@ -151,7 +151,7 @@ static void dfu_prepare_func_app_erase(uint32_t image_size)
for ( uint32_t i = 0; i < page_count; i++ )
{
nrf_nvmc_page_erase(DFU_BANK_0_REGION_START + i * CODE_PAGE_SIZE);
nrfx_nvmc_page_erase(DFU_BANK_0_REGION_START + i * CODE_PAGE_SIZE);
}
// invoke complete callback