PROJ515 / Mbed 2 deprecated PROJ514-MASTER

Dependencies:   mbed mbed-rtos ShiftReg2 TextLCD

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Serial_PC.cpp Source File

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 }