USB Composite support
Dependents: mbed_cdc_hid_composite
Fork of USBDevice by
Diff: USBDevice/USBHAL_KL25Z.cpp
- Revision:
- 38:dfe51ad5cacf
- Parent:
- 37:9506bdafbf94
- Child:
- 43:c0605f23f916
diff -r 9506bdafbf94 -r dfe51ad5cacf USBDevice/USBHAL_KL25Z.cpp --- a/USBDevice/USBHAL_KL25Z.cpp Wed Nov 19 09:00:30 2014 +0000 +++ b/USBDevice/USBHAL_KL25Z.cpp Fri Nov 28 07:15:18 2014 +0000 @@ -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_KL43Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D50M) | defined(TARGET_K64F) +#if defined(TARGET_KL25Z) | defined(TARGET_KL43Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D50M) | defined(TARGET_K64F) | defined(TARGET_K22F) #include "USBHAL.h" @@ -135,7 +135,8 @@ SIM->SOPT2 |= SIM_SOPT2_USBSRC_MASK; #else // choose usb src as PLL - SIM->SOPT2 |= (SIM_SOPT2_USBSRC_MASK | SIM_SOPT2_PLLFLLSEL_MASK); + SIM->SOPT2 &= ~SIM_SOPT2_PLLFLLSEL_MASK; + SIM->SOPT2 |= (SIM_SOPT2_USBSRC_MASK | (1 << SIM_SOPT2_PLLFLLSEL_SHIFT)); // enable OTG clock SIM->SCGC4 |= SIM_SCGC4_USBOTG_MASK;