mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-26 08:37:16 +00:00
nrf5x usb init before sd works
This commit is contained in:
parent
d8b361fdaa
commit
c81b56eb45
@ -0,0 +1,5 @@
|
|||||||
|
<!DOCTYPE Board_Memory_Definition_File>
|
||||||
|
<root name="nRF52840_xxAA_s140v6">
|
||||||
|
<MemorySegment name="FLASH" start="0x00026000" size="0x000C7000" access="ReadOnly" />
|
||||||
|
<MemorySegment name="RAM" start="0x20004000" size="0x0003C000" access="Read/Write" />
|
||||||
|
</root>
|
@ -116,7 +116,7 @@
|
|||||||
<configuration
|
<configuration
|
||||||
Name="pca10056 s140v6"
|
Name="pca10056 s140v6"
|
||||||
build_treat_warnings_as_errors="No"
|
build_treat_warnings_as_errors="No"
|
||||||
c_preprocessor_definitions="SOFTDEVICE_PRESENT"
|
c_preprocessor_definitions="SOFTDEVICE_PRESENT;S140;NO_VTOR_CONFIG"
|
||||||
c_user_include_directories="$(nrfxDir)/../nrf5x/s140_nrf52_6.1.1_API/include;$(nrfxDir)/../nrf5x/s140_nrf52_6.1.1_API/include/nrf52"
|
c_user_include_directories="$(nrfxDir)/../nrf5x/s140_nrf52_6.1.1_API/include;$(nrfxDir)/../nrf5x/s140_nrf52_6.1.1_API/include/nrf52"
|
||||||
linker_memory_map_file="nRF52840_xxAA_s140v6_MemoryMap.xml" />
|
linker_memory_map_file="nRF52840_xxAA_s140v6_MemoryMap.xml" />
|
||||||
</project>
|
</project>
|
||||||
|
@ -198,7 +198,7 @@ void board_init(void)
|
|||||||
|
|
||||||
sd_power_usbregstatus_get(&usb_reg);
|
sd_power_usbregstatus_get(&usb_reg);
|
||||||
}else
|
}else
|
||||||
#else
|
#endif
|
||||||
{
|
{
|
||||||
// Power module init
|
// Power module init
|
||||||
const nrfx_power_config_t pwr_cfg = { 0 };
|
const nrfx_power_config_t pwr_cfg = { 0 };
|
||||||
@ -212,7 +212,6 @@ void board_init(void)
|
|||||||
|
|
||||||
usb_reg = NRF_POWER->USBREGSTATUS;
|
usb_reg = NRF_POWER->USBREGSTATUS;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( usb_reg & POWER_USBREGSTATUS_VBUSDETECT_Msk ) {
|
if ( usb_reg & POWER_USBREGSTATUS_VBUSDETECT_Msk ) {
|
||||||
tusb_hal_nrf_power_event(NRFX_POWER_USB_EVT_DETECTED);
|
tusb_hal_nrf_power_event(NRFX_POWER_USB_EVT_DETECTED);
|
||||||
@ -251,4 +250,14 @@ void board_uart_putchar(uint8_t c)
|
|||||||
(void) c;
|
(void) c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SOFTDEVICE_PRESENT
|
||||||
|
void SD_EVT_IRQHandler(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void SVC_Handler( void )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user