![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
PROJ515-MASTER-No-PWM
Dependencies: mbed mbed-rtos ShiftReg2 TextLCD
Diff: Serial/Serial_PC.cpp
- Revision:
- 4:020f93d35f6e
diff -r 5665939d31ca -r 020f93d35f6e Serial/Serial_PC.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Serial/Serial_PC.cpp Tue May 07 21:55:57 2019 +0000 @@ -0,0 +1,26 @@ +#include "Serial_PC.hpp" +int Logging = 0; +SERIAL_PC::SERIAL_PC(){} +SERIAL_PC::~SERIAL_PC(){} +void SERIAL_PC::Init(){} +int SERIAL_PC::Post() +{ + return 1; +} +void SERIAL_PC::Main() +{ + while(1) + { + if(PC.readable())//Check that you can write to the PC + { + PC.printf("Testing for serial\n"); + } + PC.scanf("%s",&_buffer); + if(_buffer == "Log") + { + PC.printf("Logging\n"); + Logging = 1; + } + Thread::wait(1000); + } +} \ No newline at end of file