*

Dependencies:   mbed-STM32F103C8T6 mbed

main.cpp

Committer:
BaserK
Date:
2017-04-29
Revision:
0:745addf20ca1

File content as of revision 0:745addf20ca1:

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

// Pwm example
// Increases pwm duty cycle gradually 

PwmOut pwm(PA_7);

int main()
{
    confSysClock();     //Configure system clock (72MHz HSE clock, 48MHz USB clock)    
    pwm.period(0.001);
    
    while (1)
    {
        for (pwm = 0; pwm < 1; pwm = pwm + 0.01f, wait_ms(50));
    }    
}