gpio example for the Freescale freedom platform

Dependencies:   mbed

Fork of frdm_gpio by Freescale

Committer:
Kojto
Date:
Thu Feb 20 17:03:29 2014 +0000
Revision:
6:a80519d6fdda
Parent:
5:a03b579ee48d
Child:
9:32e85f1fcd15
gpio pin to D0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chris 0:0024ab6b9624 1 #include "mbed.h"
chris 0:0024ab6b9624 2
emilmont 1:4f62fc36c30d 3 int main() {
Kojto 6:a80519d6fdda 4 DigitalOut gpo(D0);
chris 0:0024ab6b9624 5 DigitalOut led(LED_RED);
chris 0:0024ab6b9624 6
emilmont 2:f37d74a0e3e2 7 while (true) {
chris 0:0024ab6b9624 8 gpo = 1;
Kojto 5:a03b579ee48d 9 led = 1; // off
chris 0:0024ab6b9624 10 wait(2);
chris 0:0024ab6b9624 11 gpo = 0;
emilmont 1:4f62fc36c30d 12 led = 0; // on
chris 0:0024ab6b9624 13 wait(2);
chris 0:0024ab6b9624 14 }
chris 0:0024ab6b9624 15 }