mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: targets/TARGET_NUVOTON/TARGET_M480/device/StdDriver/m480_usbd.c
- Revision:
- 173:e131a1973e81
- Parent:
- 172:7d866c31b3c5
--- a/targets/TARGET_NUVOTON/TARGET_M480/device/StdDriver/m480_usbd.c Thu Aug 31 17:27:04 2017 +0100 +++ b/targets/TARGET_NUVOTON/TARGET_M480/device/StdDriver/m480_usbd.c Fri Sep 15 14:59:18 2017 +0100 @@ -267,7 +267,7 @@ if((g_usbd_SetupPacket[0] & 0x80ul) == 0x80ul) { /* request data transfer direction */ /* Device to host */ switch(g_usbd_SetupPacket[1]) { - case GET_CONFIGURATION: { + case USBD_GET_CONFIGURATION: { /* Return current configuration setting */ /* Data stage */ addr = USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP0); @@ -278,12 +278,12 @@ USBD_PrepareCtrlOut(0, 0ul); break; } - case GET_DESCRIPTOR: { + case USBD_GET_DESCRIPTOR: { USBD_GetDescriptor(); USBD_PrepareCtrlOut(0, 0ul); /* For status stage */ break; } - case GET_INTERFACE: { + case USBD_GET_INTERFACE: { /* Return current interface setting */ /* Data stage */ addr = USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP0); @@ -294,7 +294,7 @@ USBD_PrepareCtrlOut(0, 0ul); break; } - case GET_STATUS: { + case USBD_GET_STATUS: { /* Device */ if(g_usbd_SetupPacket[0] == 0x80ul) { uint8_t u8Tmp; @@ -342,7 +342,7 @@ } else { /* Host to device */ switch(g_usbd_SetupPacket[1]) { - case CLEAR_FEATURE: { + case USBD_CLEAR_FEATURE: { if(g_usbd_SetupPacket[2] == FEATURE_ENDPOINT_HALT) { uint32_t epNum, i; @@ -363,7 +363,7 @@ USBD_SET_PAYLOAD_LEN(EP0, 0ul); break; } - case SET_ADDRESS: { + case USBD_SET_ADDRESS: { g_usbd_UsbAddr = g_usbd_SetupPacket[2]; /* Status Stage */ USBD_SET_DATA1(EP0); @@ -371,7 +371,7 @@ break; } - case SET_CONFIGURATION: { + case USBD_SET_CONFIGURATION: { g_usbd_UsbConfig = g_usbd_SetupPacket[2]; if(g_usbd_pfnSetConfigCallback) { @@ -383,7 +383,7 @@ USBD_SET_PAYLOAD_LEN(EP0, 0ul); break; } - case SET_FEATURE: { + case USBD_SET_FEATURE: { if( (g_usbd_SetupPacket[0] & 0xFul) == 0ul ) { /* 0: device */ if((g_usbd_SetupPacket[2] == 3ul) && (g_usbd_SetupPacket[3] == 0ul)) { /* 3: HNP enable */ OTG->CTL |= (OTG_CTL_HNPREQEN_Msk | OTG_CTL_BUSREQ_Msk); @@ -401,7 +401,7 @@ break; } - case SET_INTERFACE: { + case USBD_SET_INTERFACE: { g_usbd_UsbAltInterface = g_usbd_SetupPacket[2]; if(g_usbd_pfnSetInterface != NULL) { g_usbd_pfnSetInterface(g_usbd_UsbAltInterface); @@ -491,7 +491,7 @@ } } else { /* In ACK for Set address */ - if((g_usbd_SetupPacket[0] == REQ_STANDARD) && (g_usbd_SetupPacket[1] == SET_ADDRESS)) { + if((g_usbd_SetupPacket[0] == REQ_STANDARD) && (g_usbd_SetupPacket[1] == USBD_SET_ADDRESS)) { addr = USBD_GET_ADDR(); if((addr != g_usbd_UsbAddr) && (addr == 0ul)) { USBD_SET_ADDR(g_usbd_UsbAddr);