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.
main.cpp
00001 00002 #include "problemb1.h" 00003 00004 Ticker debug; 00005 00006 00007 int main() { 00008 00009 00010 // wait(2); 00011 00012 pc.printf("ENTERING MAIN JOBS\n"); 00013 sync.baud(460800); 00014 //pc.baud(9600); 00015 00016 00017 initialSetup(); 00018 int p; 00019 00020 sync.attach(&calculate_offset); 00021 00022 // 1 PPS Code 00023 //pps.tv_sec = 10; 00024 //pps.tv_usec = 500000; 00025 //runAtTime(&pinToggle,&pps); 00026 00027 00028 00029 00030 toggle =1; 00031 // myLED = 1; 00032 00033 sync_with_master(); 00034 synch.attach_us(&sync_with_master,4500000); 00035 00036 union { 00037 timeval t; 00038 char BYTE[8]; 00039 } ttt; 00040 00041 00042 00043 while (1) { 00044 00045 00046 if ( serial2.readable()) { 00047 00048 ttt.BYTE[0]= serial2.getc(); 00049 ttt.BYTE[1]=serial2.getc(); 00050 ttt.BYTE[2]=serial2.getc(); 00051 ttt.BYTE[3]=serial2.getc(); 00052 ttt.BYTE[4]=serial2.getc(); 00053 ttt.BYTE[5]=serial2.getc(); 00054 ttt.BYTE[6]=serial2.getc(); 00055 ttt.BYTE[7]=serial2.getc(); 00056 00057 pc.printf("THE serial data recev %d %d \n",ttt.t.tv_sec, ttt.t.tv_usec); 00058 runAtTime(&pinToggle,&ttt.t); 00059 00060 } 00061 } 00062 }
Generated on Mon Jul 25 2022 07:15:09 by
1.7.2