x
SystemClock.h@0:86b437ce0d0f, 2018-07-23 (annotated)
- Committer:
- JackB
- Date:
- Mon Jul 23 12:25:39 2018 +0000
- Revision:
- 0:86b437ce0d0f
SC
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JackB | 0:86b437ce0d0f | 1 | ///* mbed library for the ST NUCLEO board F401RE |
JackB | 0:86b437ce0d0f | 2 | // * to change the CPU clock to 84 MHz |
JackB | 0:86b437ce0d0f | 3 | // * |
JackB | 0:86b437ce0d0f | 4 | // * Copyright (c) 2014 Peter Drescher - DC2PD |
JackB | 0:86b437ce0d0f | 5 | // * Released under the MIT License: http://mbed.org/license/mit |
JackB | 0:86b437ce0d0f | 6 | // * |
JackB | 0:86b437ce0d0f | 7 | // * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
JackB | 0:86b437ce0d0f | 8 | // * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
JackB | 0:86b437ce0d0f | 9 | // * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
JackB | 0:86b437ce0d0f | 10 | // * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
JackB | 0:86b437ce0d0f | 11 | // * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
JackB | 0:86b437ce0d0f | 12 | // * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
JackB | 0:86b437ce0d0f | 13 | // * THE SOFTWARE. |
JackB | 0:86b437ce0d0f | 14 | // */ |
JackB | 0:86b437ce0d0f | 15 | //#ifndef MBED_ST_F401_84MHZ_H |
JackB | 0:86b437ce0d0f | 16 | //#define MBED_ST_F401_84MHZ_H |
JackB | 0:86b437ce0d0f | 17 | // |
JackB | 0:86b437ce0d0f | 18 | ///** Setup speed to 84 MHz |
JackB | 0:86b437ce0d0f | 19 | // * |
JackB | 0:86b437ce0d0f | 20 | // * @code |
JackB | 0:86b437ce0d0f | 21 | // * #include "mbed.h" |
JackB | 0:86b437ce0d0f | 22 | // * #include "ST_F401_84MHZ.h" |
JackB | 0:86b437ce0d0f | 23 | // * |
JackB | 0:86b437ce0d0f | 24 | // * // place the init before other code to ensure right timing of other objects ! |
JackB | 0:86b437ce0d0f | 25 | // * F401_init84 myinit(0); // use the internal oscillator |
JackB | 0:86b437ce0d0f | 26 | // * |
JackB | 0:86b437ce0d0f | 27 | // */ |
JackB | 0:86b437ce0d0f | 28 | // |
JackB | 0:86b437ce0d0f | 29 | //class F401_init84 |
JackB | 0:86b437ce0d0f | 30 | //{ |
JackB | 0:86b437ce0d0f | 31 | //public: |
JackB | 0:86b437ce0d0f | 32 | // /** Create a F401_init84 object to change the clock |
JackB | 0:86b437ce0d0f | 33 | // * @param external = 0 use internal oscillator |
JackB | 0:86b437ce0d0f | 34 | // * @param external = 1 use external 8 MHz crystal - you have to add some comonents to the pcb ! |
JackB | 0:86b437ce0d0f | 35 | //*/ |
JackB | 0:86b437ce0d0f | 36 | //F401_init84(unsigned int external); |
JackB | 0:86b437ce0d0f | 37 | // |
JackB | 0:86b437ce0d0f | 38 | //protected: |
JackB | 0:86b437ce0d0f | 39 | //// do the magic ;-) |
JackB | 0:86b437ce0d0f | 40 | //void SystemClock_Config_84MHz_internal(void); |
JackB | 0:86b437ce0d0f | 41 | //void SystemClock_Config_84MHz_external(void); |
JackB | 0:86b437ce0d0f | 42 | //}; |
JackB | 0:86b437ce0d0f | 43 | // |
JackB | 0:86b437ce0d0f | 44 | //#endif |