etti

Dependencies:   FastPWM MMA8451Q ThreePhaseBridge mbed

main.cpp

Committer:
acracan
Date:
2014-03-11
Revision:
0:40cac44d709c

File content as of revision 0:40cac44d709c:

#include "mbed.h"
#include "ThreePhaseBridge.h"

ThreePhaseBridge bridge1(
    PTD4,  /* SW1 */
    PTC3,  /* SW2 */
    PTA5, /* SW3 */
    PTC4,  /* SW4 */
    PTA4,  /* SW5 */
    PTC5,  /* SW6 */
    ThreePhaseBridge::activeLow);

    
int delay = 7000;

int main() {
    bridge1.setPwmPeriod_us(200);
    bridge1.setPwmPulseWidth_us(40);
    while(1) {
        bridge1.spin(ThreePhaseBridge::CW);
        wait_us(delay);
    }
}