STM32F103C8T6_Internal_RTC

Dependencies:   mbed-STM32F103C8T6 mbed

Fork of STM32F103C8T6_GPRS_TCP by Shivanand Gowda

main.cpp

Committer:
hudakz
Date:
2016-07-05
Revision:
5:3c3ef17a17a6
Parent:
4:a81f44fc487e
Child:
6:d99931fc19c0

File content as of revision 5:3c3ef17a17a6:

#include "stm32f103c8t6.h"
#include "mbed.h"

Serial      pc(USBTX, USBRX);
DigitalOut  myled(LED1);

int main() {
    configSysClock();   // selecting 72MHz High-speed External clock and 32MHz APB1 peripheral clock
    while(1) {
        // The on-board LED is connected, via a resistor, to +3.3V (not to GND). 
        // So to turn the LED on or off we have to set it to 0 or 1 respectively
        myled = 0; // turn the LED on
        wait(0.2); // 200 ms
        myled = 1; // turn the LED off
        wait(1.0); // 1 sec
        pc.printf("Blink\r\n");
    }
}