16進数
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 00003 Serial pc(SERIAL_TX, SERIAL_RX); 00004 Serial device(PA_9,PA_10); 00005 int main() 00006 { 00007 00008 while(1) { 00009 char c = device.getc(); 00010 00011 if(c == 0x7A) { 00012 pc.printf("%02hhx \n",c); 00013 if(device.getc() == 0x7A) { 00014 pc.printf("%02hhx \n",c); 00015 00016 } else if(c == 0x79) { 00017 pc.printf("%02hhx \n",c); 00018 } 00019 } 00020 } 00021 00022 00023 00024
Generated on Wed Jul 20 2022 16:09:24 by
1.7.2