Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
v0.2.1
完成双串口子程序
优化上位机日志显示
  • Loading branch information
supine0703 committed Mar 27, 2024
1 parent b24f736 commit 3664c95
Show file tree
Hide file tree
Showing 11 changed files with 521 additions and 210 deletions.
237 changes: 137 additions & 100 deletions proj/hex/host_c.hex
Original file line number Diff line number Diff line change
@@ -1,51 +1,83 @@
:030000000204A057
:0C04A000787FE4F6D8FD7581510204E776
:1005E8002020202020202020003120746F20323A43
:1005F800003220746F20313A0031323324006162B6
:100608006364005A59580000070B0D0E70B0D0E013
:10074600759850E4F587758920AF1C8F8B8F8DD2F5
:0B0756008E759A50851C9C758E102239
:1003890078217C007D007BFF7A0579F17E007F086A
:100399001202D378297C007D007BFF7A0579F97EEA
:1003A900007F081202D378317C007D007BFF7A063A
:1003B90079017E007F0F1202D3E4F54B1207461232
:1003C90007C07F801207E67B007A007921E4FD12DD
:1003D90005B87FC01207E67B007A007929E4FD128F
:1003E90005B87FE87E031207ABAF4B054BEF75F0FD
:1003F9000384E5F075F005A42431F9E4FAFBF5501E
:10040900C2007D051206EA7B007A00794075507FAB
:10041900D2007DFF1206188F4A74402FF8E4F67F48
:10042900801207E67BFF7A0579E8E4FD1205B87AC0
:100439000079211205B41205B07FE87E031207ABDB
:10044900AF4B054BEF75F00384E5F075F005A42477
:1004590031F9E4FAFBF550D2007D051206EA7B007A
:100469007A00794075507FC2007DFF1206188F4AC5
:1004790074402FF8E4F67FC01207E67BFF7A05790E
:10048900E8E4FD1205B87B007A0079297D90120510
:07049900B81205B00203EBED
:060648008B148A158916CF
:10064E0030020775507FD200800BAB14AA15A91685
:10065E0075507FC2007DFF120618AD07AB14AA15A8
:05066E00A91602069E22
:1007AB00EF1FAA0670011E4A600A7D7BAC051DEC8B
:0407BB0060EE80F874
:0107BF002217
:10052C0078087C007D007BFF7A0679107E007F04C2
:10053C001202D3780C7C007D007BFF7A0679147E46
:10054C00007F041202D375900FE590640F604FA9E1
:10055C00907F057E001207ABE9659070417590F0B5
:10056C00E59064F06038AB907F057E001207ABEB32
:10057C006590702A7F0374082FF8E6B50102A9076D
:10058C00740C2FF8E6B50306EF25E025E0FB1FC33E
:10059C00EF6480948050DF75900FE94BFF227590CB
:0305AC000F7FFFBF
:0105AF002229
:0805B0007A0079407B007D9088
:1005B8008B4C8A4D894E8C4F8D50AB4CAA4DA94E11
:1005C8001202F9601A054EE54E7002054D14F91233
:1005D80002F9FF1207F1AF50AE4F1207AB80DB22D2
:1007C0007F381207E67F0E1207E67F061207E67FE4
:0407D000010207E635
:0300000002052CCA
:0C052C00787FE4F6D8FD75815402057359
:08097600070B0D0E70B0D0E07C
:04096E00C104C105FA
:10089F00759850E4F587758920AF158F8B8F8DD2A2
:0B08AF008E759A5085159C758E1022E6
:060838007B007A00793C10
:06083E008B408A41894253
:1008440075500AC2027D147C001206D9AD07AB4074
:07085400AA41A94202079727
:0D095600C2037FF61209061208BAC204227D
:1007C200200424C2037FF012090612083892042082
:1007D2000415120956C2037FF01209061208389254
:0707E2000420040312095674
:0107E90022ED
:0F069B00754800754900754A00AB42AA43A9444F
:0606AA008B458A468947DA
:1006B000755004D2027D647C001206D9AD07E5496D
:1006C000454A4548600AAB48AA49A94AED120312B7
:0906D000AB45AA46A947020797B1
:10091C00439A08D2037FF61209067F047E00120860
:04092C00BEC2052220
:08073D007B007A00793DAF3C1E
:100745008F418B428A438944D2037FF512090612F1
:10075500069B920520050F12091CD203AF41120911
:070765000612069B9205221B
:02063C008F3CF1
:10063E00439A0830050312091CD203AF3C12090677
:10064E00754800754900754A007B007A00793D12A5
:10065E0006AA920520050312073D300526E53DB496
:10066E000108E53EB53C03D38001C3920520051376
:10067E0012073DE53DB40108E53EB53C03D38001CC
:0C068E00C3920520050302091C539AF7D3
:01069A00223D
:0A03AB008F328D338B348A3589368A
:1003B500120956C203AF321209061208BAAF321239
:1003C500063C3005797538118533397B007A00791B
:1003D500387D0212087E8F377B007A007938C20299
:1003E500AD371208EE1208BA7B007A007938D202CE
:1003F500AD371208EE754800754900754A37AB34BC
:10040500AA35A9361206AA920140217B007A007905
:1004150038D202AD371208EE754800754900754AA5
:1004250037AB34AA35A9361206AA920112091CE582
:10043500376028AB34AA35A936C202FD8017E4F52A
:1004450038FB7A0079387D0112087EAD077B007A8A
:10045500007938C2021208EE1208BA20010EAB3438
:10046500AA35A936900001E5331203241207C2A26A
:010475000185
:010476002263
:1004770012089FC2037FFA1209061208BA20040362
:100487001207C23004F77521037B007A0079217DBA
:100497000112087EAD078D317B007A007921C202F7
:1004A7001208EE7B007A00792112083E920050690B
:1004B700E521606524FC70387B007A007921AD2343
:1004C700AF221203AB40137521047523FF7B007A1B
:1004D7000079217D0312087E8F313004137B007A67
:1004E700007921C202AD311208EE7F0A7E00802416
:1004F7003004267521037B007A0079217D011208DB
:100507007EAD078D317B007A007921C2021208EE99
:100517007FE87E031208BE808A200003020484124B
:050527000956020484E6
:0408BA007F0A7E0033
:1008BE00EF4E6011EF1F70011E7D0BED60F27CF8A4
:0508CE00DCFE1D80F6B8
:0108D3002202
:1005B80078087C007D007BFF7A0979767E007F04CD
:1005C8001202D3780C7C007D007BFF7A09797A7E51
:1005D800007F041202D375900FE590640F604FAB53
:1005E800907F057E001208BEEB659070417590F013
:1005F800E59064F06038AA907F057E001208BEEA94
:100608006590702A7F0374082FF8E6B50302AB07DC
:10061800740C2FF8E6B50206EF25E025E0FA1FC3B3
:10062800EF6480948050DF75900FEB4AFF2275903D
:030638000F7FFF32
:01063B00229C
:10070D008B108A1189128C138D14AB10AA11A9129A
:10071D001202F9601A0512E5127002051114F91290
:10072D0002F9FF12097EAF14AE131208BE80DB2250
:100930007F381209637F0E1209637F061209637FF5
:040940000102096344
:1000030000102030405060708191A1B1C1D1E1F165
:1000130012023222524272629383B3A3D3C3F3E335
:100023002434041464744454A5B58595E5F5C5D505
Expand Down Expand Up @@ -78,51 +110,53 @@
:1001D3007D5C3F1EF9D8BB9A75543716F1D0B392A4
:1001E3002E0F6C4DAA8BE8C926076445A283E0C194
:1001F3001F3E5D7C9BBAD9F81736557493B2D1F084
:10067300E4F51AF51BED601E1202F9651AFF9000EE
:100683000393651BF51AEF90010393F51B7401297E
:0A069300F9E43AFADDE2AE1AAF1BFB
:01069D00223A
:1006C9008B178A188919AC05120673AB17AA18A9D2
:1006D900198C82758300EE8FF012035CEC2402FF03
:0106E90022EE
:10069E008D138B108A11891215131513AD131206B3
:1006AE0073AB10AA11A9128513827583001203244D
:0B06BE00B50706EEB5F002D322C32200
:0307F800011CFDE4
:100761007F017580FFC2B4C2B5D2B6D2B4AE80EEFD
:0907710030E7040FEF70EEC2B492
:01077A00225C
:0B07E600EF6007C200F5511207D4229B
:0707F100D2008F510207D472
:1007D400120761C2B6A20092B5855180D2B400C29C
:0207E400B4223D
:1007950030010B8F9BE59A30E1FB539A02228F992A
:0607A5003099FDC299220B
:1006EA00ED601B1202F9FFA2009201120795AF50AA
:0E06FA00EF6002DFFE740129F9E43AFADDE553
:0107080022CE
:10077B00309802800CEF60101F7E7CEE60F7309893
:09078B0004C298D3221E80F3C3BE
:010794002242
:10070900E59A30E002800EEF60131F7E7CEE60F701
:0E071900E59A30E005539A01D3221E80F0C30A
:0107270022AF
:1007280030010BAF051207095012E59B8009AF0590
:0E07380012077B5007E599120312D322C32249
:060618008B4C8A4D894E57
:10061E00E4FCA2009201120728501C7401254EF52D
:10062E004EE4354DF54D0CAB4CFAA94EA20092019D
:09063E00AD5012072840E4AF049E
:010647002290
:1004AC00020389E493A3F8E493A34003F68001F2DA
:1004BC0008DFF48029E493A3F85407240CC8C33351
:1004CC00C4540F4420C8834004F456800146F6DF20
:1004DC00E4800B01020408102040809007F8E47EB1
:1004EC00019360BCA3FF543F30E509541FFEE49315
:1004FC00A360010ECF54C025E060A840B8E493A3DC
:10050C00FAE493A3F8E493A3C8C582C8CAC583CA06
:10051C00F0A3C8C582C8CAC583CADFE9DEE780BEBE
:0107FB0000FD
:10076C00E4F54FF550ED601E1202F9654FFF900055
:10077C0003936550F54FEF90010393F550740129E5
:0A078C00F9E43AFADDE2AE4FAF5097
:010796002240
:10087E008B3C8A3D893EAC0512076CAB3CAA3DA968
:10088E003E8C82758300EE8FF012037EEC2402FF05
:01089E002237
:100797008D4E8B4B8A4C894D154E154EAD4E12071B
:1007A7006CAB4BAA4CA94D854E827583001203464C
:0B07B700B50706EEB5F002D322C32206
:030972000115FD6F
:1008D4007F017580FFC2B4C2B5D2B6D2B4AE80EE89
:0908E40030E7040FEF70EEC2B41E
:0108ED0022E8
:0B096300EF6007C206F51612094422DF
:07097E00D2068F16020944A6
:100944001208D4C2B6A20692B5851680D2B400C2EB
:02095400B422CB
:1009060030030B8F9BE59A30E1FB539AFD228F99BA
:060916003099FDC2992298
:1008EE00ED60141202F9FFA20292031209067401BE
:0808FE0029F9E43AFADDEC22CD
:10085B003098028013EF4E6018EF1F70011E7D0B56
:10086B00ED60F27C7C309804C298D322DCF71D80BB
:02087B00EFC3C9
:01087D002258
:1007EA00E59A30E0028015EF4E601BEF1F70011E84
:1007FA007D19ED60F27C2BE59A30E005539AFED321
:07080A0022DCF41D80ECC3A9
:0108110022C4
:100812008C538D5430030DAF54AE531207EA50146B
:10082200E59B800BAF54AE5312085B5007E599125B
:060832000312D322C322D1
:0606D9008B4B8A4C894D99
:1006DF00E4F552A2029203120812501F7401254D25
:1006EF00F54DE4354CF54C0552AB4BFAA94DA20232
:0D06FF009203AD51AC5012081240E1AF5211
:01070C0022CA
:10053800020477E493A3F8E493A34003F68001F25E
:1005480008DFF48029E493A3F85407240CC8C333C4
:10055800C4540F4420C8834004F456800146F6DF93
:10056800E4800B010204081020408090096EE47EAC
:10057800019360BCA3FF543F30E509541FFEE49388
:10058800A360010ECF54C025E060A840B8E493A34F
:10059800FAE493A3F8E493A3C8C582C8CAC583CA7A
:1005A800F0A3C8C582C8CAC583CADFE9DEE780BE32
:010975000081
:10020300E709F608DFFA8046E709F208DFFA803EDD
:1002130088828C83E709F0A3DFFA8032E309F608CA
:10022300DFFA8078E309F208DFFA807088828C8332
Expand All @@ -143,11 +177,14 @@
:09030900E32289828A83E4932235
:10031200BB010689828A83F0225002F722BBFE01CA
:02032200F322C4
:10032400BB0110E58229F582E5833AF583E0F5F017
:10033400A3E0225009E92582F886F008E622BBFEF4
:100344000AE92582F8E2F5F008E222E5832AF5833A
:08035400E993F5F0A3E99322FF
:10035C00F8BB0111E58229F582E5833AF583E8F0D3
:10036C00E5F0A3F0225009E92582C8F608A6F02290
:0D037C00BBFE09E92582C8F2E5F008F22277
:10032400F8BB010DE58229F582E5833AF583E8F00F
:10033400225006E92582C8F622BBFE05E92582C8BB
:02034400F222A3
:10034600BB0110E58229F582E5833AF583E0F5F0F5
:10035600A3E0225009E92582F886F008E622BBFED2
:100366000AE92582F8E2F5F008E222E5832AF58318
:08037600E993F5F0A3E99322DD
:10037E00F8BB0111E58229F582E5833AF583E8F0B1
:10038E00E5F0A3F0225009E92582C8F608A6F0226E
:0D039E00BBFE09E92582C8F2E5F008F22255
:00000001FF
25 changes: 5 additions & 20 deletions proj/include/serialport_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,19 @@
#define SERIAL_PORT_2_H

#ifdef USE_QUERY_TRANSMIT
extern void SP_QTransmitByte(unsigned char byte, bit second);

extern void SP_QTransmitData(
unsigned char* buf, unsigned char n, unsigned char cutT, bit second
);
// extern void SP_Set_QTWait(void (*waitFn)(unsigned int));

#define SP1_QTransmitByte(byte) SP_QTransmitByte(byte, 0)
#define SP2_QTransmitByte(byte) SP_QTransmitByte(byte, 1)
#define SP1_QTransmitData(buf, n, cutT) SP_QTransmitData(buf, n, 0, 0)
#define SP2_QTransmitData(buf, n, cutT) SP_QTransmitData(buf, n, 0, 1)
extern void SP_QTransmitByte(unsigned char byte, bit second);

extern void SP_QTransmitData(unsigned char* buf, unsigned char n, bit second);
#endif

#ifdef USE_QUERY_RECEIVE
extern bit SP_QReceiveByte(
unsigned char* buf, unsigned char t, bit second
);
extern bit SP_QReceiveByte(unsigned char* buf, unsigned int t, bit second);

extern unsigned char SP_QReceiveData(
unsigned char* buf, unsigned char waitT, unsigned char cutT, bit second
unsigned char* buf, unsigned int waitT, unsigned char cutT, bit second
);

#define SP1_QReceiveByte(buf, t) SP_QReceiveByte(buf, t, 0)
#define SP2_QReceiveByte(buf, t) SP_QReceiveByte(buf, t, 1)
#define SP1_QReceiveData(buf, n, cutT) SP_QReceiveData(buf, n, cutT, 0)
#define SP2_QReceiveData(buf, n, cutT) SP_QReceiveData(buf, n, cutT, 1)

#endif


#endif // SERIAL_PORT_2_H
2 changes: 1 addition & 1 deletion proj/keil_host_c/__config__.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#define S2RI 0x01

#define S2_CHECK(X) (S2CON & X)
#define S2_SET_L(X) (S2CON &= X)
#define S2_SET_H(X) (S2CON |= X)
#define S2_SET_L(X) (S2CON &= ~X)


// ------- define for lcd1602 ----------
Expand Down
2 changes: 1 addition & 1 deletion proj/keil_host_c/host.uvproj
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
<RCB>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x10000</Size>
<Size>0xffff</Size>
</RCB>
<RXB>
<Type>0</Type>
Expand Down
Loading

0 comments on commit 3664c95

Please sign in to comment.