GPIO program for K64F boards

Dependencies:   mbed DigitDisplay LED_Bar

Committer:
Niranjan_ravi
Date:
Thu Apr 18 19:24:12 2019 +0000
Revision:
0:880457ab5a77
Child:
1:04022340010b
Child:
2:a1e7d7fa0db2
GPIO program for K64F

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Niranjan_ravi 0:880457ab5a77 1 #include "mbed.h"
Niranjan_ravi 0:880457ab5a77 2
Niranjan_ravi 0:880457ab5a77 3 DigitalIn enable(PTE24);
Niranjan_ravi 0:880457ab5a77 4 Serial pc(USBTX, USBRX);
Niranjan_ravi 0:880457ab5a77 5
Niranjan_ravi 0:880457ab5a77 6 int main() {
Niranjan_ravi 0:880457ab5a77 7 pc.baud(115200);
Niranjan_ravi 0:880457ab5a77 8 while(1) {
Niranjan_ravi 0:880457ab5a77 9 pc.printf("its inside while loop now\n");
Niranjan_ravi 0:880457ab5a77 10 if(!enable) {
Niranjan_ravi 0:880457ab5a77 11 pc.printf("led is on\n");
Niranjan_ravi 0:880457ab5a77 12 }
Niranjan_ravi 0:880457ab5a77 13 else
Niranjan_ravi 0:880457ab5a77 14 {
Niranjan_ravi 0:880457ab5a77 15 pc.printf("false\n");
Niranjan_ravi 0:880457ab5a77 16 }
Niranjan_ravi 0:880457ab5a77 17 wait(0.25);
Niranjan_ravi 0:880457ab5a77 18 }
Niranjan_ravi 0:880457ab5a77 19 }