Updated functions to deal with USB clocking. (PPL1) See http://www.nxp.com/documents/user_manual/UM10360.pdf Section 4.6 & 4.7.3
Fork of ClockControl by
ClockControl/ClockControl.h@2:ab85c20317b5, 2016-09-12 (annotated)
- Committer:
- aidan1971
- Date:
- Mon Sep 12 13:11:32 2016 +0000
- Revision:
- 2:ab85c20317b5
- Parent:
- 1:8b04bd33c7cd
Added comments and command to change TIMER3 prescaler
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
no2chem | 0:b5d3bd64d2dc | 1 | /* mbed PowerControl Library |
no2chem | 0:b5d3bd64d2dc | 2 | * Copyright (c) 2010 Michael Wei |
no2chem | 0:b5d3bd64d2dc | 3 | */ |
no2chem | 0:b5d3bd64d2dc | 4 | |
no2chem | 0:b5d3bd64d2dc | 5 | //shouldn't have to include, but fixes weird problems with defines |
aidan1971 | 1:8b04bd33c7cd | 6 | #include "LPC1768.h" |
no2chem | 0:b5d3bd64d2dc | 7 | |
no2chem | 0:b5d3bd64d2dc | 8 | #ifndef MBED_CLOCKCONTROL_H |
no2chem | 0:b5d3bd64d2dc | 9 | #define MBED_CLOCKCONTROL_H |
no2chem | 0:b5d3bd64d2dc | 10 | |
aidan1971 | 1:8b04bd33c7cd | 11 | unsigned int setSystemFrequency(unsigned char USBclkDivider,unsigned char clkDivider, unsigned char clkSrc, unsigned short M, unsigned char N); |
aidan1971 | 1:8b04bd33c7cd | 12 | void setPPL1forUSB(unsigned short M, unsigned char P); |
no2chem | 0:b5d3bd64d2dc | 13 | void setPLL0Frequency(unsigned char clkSrc, unsigned short M, unsigned char N); |
no2chem | 0:b5d3bd64d2dc | 14 | void setPLL1Frequency(unsigned char clkSrc, unsigned short M, unsigned char N); |
no2chem | 0:b5d3bd64d2dc | 15 | #endif |