Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos ShiftReg2 TextLCD
Serial_PC.cpp
00001 #include "Serial_PC.hpp" 00002 int Logging = 0; 00003 SERIAL_PC::SERIAL_PC(){} 00004 SERIAL_PC::~SERIAL_PC(){} 00005 void SERIAL_PC::Init(){} 00006 int SERIAL_PC::Post() 00007 { 00008 return 1; 00009 } 00010 void SERIAL_PC::Main() 00011 { 00012 while(1) 00013 { 00014 if(PC.readable())//Check that you can write to the PC 00015 { 00016 PC.printf("Testing for serial\n"); 00017 } 00018 PC.scanf("%s",&_buffer); 00019 if(_buffer == "Log") 00020 { 00021 PC.printf("Logging\n"); 00022 Logging = 1; 00023 } 00024 Thread::wait(1000); 00025 } 00026 }
Generated on Sun Jul 17 2022 08:28:43 by
1.7.2