,,

Fork of Application by Daniel Sygut

Committer:
Zaitsev
Date:
Sat Dec 16 10:26:48 2017 +0000
Revision:
11:b3f2a8bdac4d
Parent:
10:41552d038a69
Child:
12:3a30cdffa27c
A copy for D.S;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
samux 7:5e693654d5b4 1 #include "mbed.h"
samux 7:5e693654d5b4 2 #include "USBSerial.h"
Zaitsev 10:41552d038a69 3
Zaitsev 10:41552d038a69 4 DigitalOut myled(LED1);
Zaitsev 10:41552d038a69 5
Zaitsev 10:41552d038a69 6 int main() {
Zaitsev 10:41552d038a69 7 //confSysClock(); //Configure system clock (72MHz HSE clock, 48MHz USB clock)
Zaitsev 10:41552d038a69 8 //SYSTEM CLOCK changed in stm32f4xx_hal.c
Zaitsev 10:41552d038a69 9 USBSerial usbSerial;
Zaitsev 11:b3f2a8bdac4d 10 Serial serial(PTE20, PTE21);
Zaitsev 11:b3f2a8bdac4d 11
Zaitsev 10:41552d038a69 12
Zaitsev 10:41552d038a69 13 while(1) {
Zaitsev 11:b3f2a8bdac4d 14 if(serial.readable())
Zaitsev 11:b3f2a8bdac4d 15 {
Zaitsev 11:b3f2a8bdac4d 16 //usbSerial.putc(serial.getc());
Zaitsev 11:b3f2a8bdac4d 17 }
Zaitsev 10:41552d038a69 18 myled = !myled;
Zaitsev 10:41552d038a69 19 if(usbSerial.readable()) //if there is any character to read from usbSerial
Zaitsev 10:41552d038a69 20 {
Zaitsev 11:b3f2a8bdac4d 21 usbSerial.putc('c');
Zaitsev 11:b3f2a8bdac4d 22 usbSerial.putc('h');
Zaitsev 11:b3f2a8bdac4d 23 usbSerial.putc('u');
Zaitsev 11:b3f2a8bdac4d 24 usbSerial.putc('j');
Zaitsev 11:b3f2a8bdac4d 25 usbSerial.getc();
Zaitsev 10:41552d038a69 26 }
samux 7:5e693654d5b4 27 }
samux 7:5e693654d5b4 28 }