Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of USBDevice by
Diff: USBDevice/USBHAL_KL25Z.cpp
- Revision:
- 22:5b7d31d9d3f3
- Parent:
- 20:d38b72fed893
- Child:
- 23:c7639faed2eb
diff -r ee9f2fa6bdbc -r 5b7d31d9d3f3 USBDevice/USBHAL_KL25Z.cpp
--- 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;
