update
This commit is contained in:
@@ -66,7 +66,7 @@ void board_init(void)
|
|||||||
SysTick_Config(CONF_CPU_FREQUENCY / 1000);
|
SysTick_Config(CONF_CPU_FREQUENCY / 1000);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// USB
|
// USB Pin, Clock init
|
||||||
|
|
||||||
/* Clear SYSIO 10 & 11 for USB DM & DP */
|
/* Clear SYSIO 10 & 11 for USB DM & DP */
|
||||||
hri_matrix_clear_CCFG_SYSIO_reg(MATRIX, CCFG_SYSIO_SYSIO10 | CCFG_SYSIO_SYSIO11);
|
hri_matrix_clear_CCFG_SYSIO_reg(MATRIX, CCFG_SYSIO_SYSIO10 | CCFG_SYSIO_SYSIO11);
|
||||||
@@ -77,8 +77,6 @@ void board_init(void)
|
|||||||
/* USB Device mode & Transceiver active */
|
/* USB Device mode & Transceiver active */
|
||||||
hri_matrix_write_CCFG_USBMR_reg(MATRIX, CCFG_USBMR_USBMODE);
|
hri_matrix_write_CCFG_USBMR_reg(MATRIX, CCFG_USBMR_USBMODE);
|
||||||
|
|
||||||
// NVIC_EnableIRQ(UDP_IRQn);
|
|
||||||
|
|
||||||
// Attach
|
// Attach
|
||||||
hri_udp_write_TXVC_reg(UDP, UDP_TXVC_PUON);
|
hri_udp_write_TXVC_reg(UDP, UDP_TXVC_PUON);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#if CFG_TUSB_MCU == OPT_MCU_SAMG
|
#if CFG_TUSB_MCU == OPT_MCU_SAMG
|
||||||
|
|
||||||
#include "device/dcd.h"
|
#include "device/dcd.h"
|
||||||
|
#include "sam.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// MACRO TYPEDEF CONSTANT ENUM DECLARATION
|
// MACRO TYPEDEF CONSTANT ENUM DECLARATION
|
||||||
@@ -49,12 +50,14 @@ void dcd_init (uint8_t rhport)
|
|||||||
void dcd_int_enable (uint8_t rhport)
|
void dcd_int_enable (uint8_t rhport)
|
||||||
{
|
{
|
||||||
(void) rhport;
|
(void) rhport;
|
||||||
|
NVIC_EnableIRQ(UDP_IRQn);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable device interrupt
|
// Disable device interrupt
|
||||||
void dcd_int_disable (uint8_t rhport)
|
void dcd_int_disable (uint8_t rhport)
|
||||||
{
|
{
|
||||||
(void) rhport;
|
(void) rhport;
|
||||||
|
NVIC_DisableIRQ(UDP_IRQn);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Receive Set Address request, mcu port must also include status IN response
|
// Receive Set Address request, mcu port must also include status IN response
|
||||||
|
|||||||
Reference in New Issue
Block a user