USBDevice with Nucleo 32L476RG support
Dependents: ObCP_ENSMM_V2020_Test_Accelero
Revision 22:5b7d31d9d3f3, committed 2014-04-02
- Comitter:
- mbed_official
- Date:
- Wed Apr 02 21:00:41 2014 +0100
- Parent:
- 21:ee9f2fa6bdbc
- Child:
- 23:ecbbaf64bc3d
- Child:
- 64:c7639faed2eb
- Commit message:
- Synchronized with git revision d537c51d26da35e031d537f7fc90380fc74cb207
Full URL: https://github.com/mbedmicro/mbed/commit/d537c51d26da35e031d537f7fc90380fc74cb207/
target K64F
Changed in this revision
USBDevice/USBEndpoints.h | Show annotated file Show diff for this revision Revisions of this file |
USBDevice/USBHAL_KL25Z.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/USBDevice/USBEndpoints.h Thu Mar 27 09:45:42 2014 +0000 +++ b/USBDevice/USBEndpoints.h Wed Apr 02 21:00:41 2014 +0100 @@ -41,7 +41,7 @@ #include "USBEndpoints_LPC17_LPC23.h" #elif defined(TARGET_LPC11UXX) || defined(TARGET_LPC1347) #include "USBEndpoints_LPC11U.h" -#elif defined(TARGET_KL25Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D5M) +#elif defined(TARGET_KL25Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D5M) | defined(TARGET_K64F) #include "USBEndpoints_KL25Z.h" #elif defined (TARGET_STM32F4XX) #include "USBEndpoints_STM32F4.h"
--- a/USBDevice/USBHAL_KL25Z.cpp Thu Mar 27 09:45:42 2014 +0000 +++ b/USBDevice/USBHAL_KL25Z.cpp Wed Apr 02 21:00:41 2014 +0100 @@ -16,7 +16,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if defined(TARGET_KL25Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D5M) +#if defined(TARGET_KL25Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D5M) | defined(TARGET_K64F) #include "USBHAL.h" @@ -86,6 +86,9 @@ // Disable IRQ NVIC_DisableIRQ(USB0_IRQn); +#if defined(TARGET_K64F) + MPU->CESR=0; +#endif // fill in callback array epCallback[0] = &USBHAL::EP1_OUT_callback; epCallback[1] = &USBHAL::EP1_IN_callback; @@ -136,9 +139,9 @@ while(USB0->USBTRC0 & USB_USBTRC0_USBRESET_MASK); // Set BDT Base Register - USB0->BDTPAGE1=(uint8_t)((uint32_t)bdt>>8); - USB0->BDTPAGE2=(uint8_t)((uint32_t)bdt>>16); - USB0->BDTPAGE3=(uint8_t)((uint32_t)bdt>>24); + USB0->BDTPAGE1 = (uint8_t)((uint32_t)bdt>>8); + USB0->BDTPAGE2 = (uint8_t)((uint32_t)bdt>>16); + USB0->BDTPAGE3 = (uint8_t)((uint32_t)bdt>>24); // Clear interrupt flag USB0->ISTAT = 0xff;