Browse Source

"RS-485"

master
JWS 2 months ago
parent
commit
160a6ec794
  1. BIN
      DefaultBuild/cstart.obj
  2. BIN
      DefaultBuild/delay.obj
  3. BIN
      DefaultBuild/dipSwitch.obj
  4. BIN
      DefaultBuild/gatectrl.obj
  5. BIN
      DefaultBuild/i2c.obj
  6. BIN
      DefaultBuild/multical.abs
  7. 548
      DefaultBuild/multical.map
  8. 2583
      DefaultBuild/multical.mot
  9. BIN
      DefaultBuild/owi.obj
  10. BIN
      DefaultBuild/r_cg_cgc.obj
  11. BIN
      DefaultBuild/r_cg_cgc_user.obj
  12. BIN
      DefaultBuild/r_cg_port.obj
  13. BIN
      DefaultBuild/r_cg_port_user.obj
  14. BIN
      DefaultBuild/r_cg_serial.obj
  15. BIN
      DefaultBuild/r_cg_serial_user.obj
  16. BIN
      DefaultBuild/r_main.obj
  17. BIN
      DefaultBuild/r_systeminit.obj
  18. BIN
      DefaultBuild/stkinit.obj
  19. BIN
      DefaultBuild/uart.obj
  20. 40
      QualityReport(multical,DefaultBuild).txt
  21. 70
      i2c.c
  22. 1
      i2c.h
  23. 301
      multical.MSI.mtud
  24. 43
      owi.c
  25. 68
      r_cg_serial_user.c
  26. 52
      r_main.c
  27. 54
      uart.c

BIN
DefaultBuild/cstart.obj

Binary file not shown.

BIN
DefaultBuild/delay.obj

Binary file not shown.

BIN
DefaultBuild/dipSwitch.obj

Binary file not shown.

BIN
DefaultBuild/gatectrl.obj

Binary file not shown.

BIN
DefaultBuild/i2c.obj

Binary file not shown.

BIN
DefaultBuild/multical.abs

Binary file not shown.

548
DefaultBuild/multical.map

@ -1,4 +1,4 @@
Renesas Optimizing Linker (W3.07.00 ) 05-Feb-2026 13:57:59
Renesas Optimizing Linker (W3.07.00 ) 05-Feb-2026 23:02:14
*** Options ***
@ -62,21 +62,21 @@ SECTION START END SIZE ALIGN
.monitor1
000000ce 000000d7 a 1
.data
000000d8 00000304 22d 2
000000d8 00000306 22f 2
.text
00000305 000004b7 1b3 1
00000307 000004b9 1b3 1
.textf
000004b8 00002967 24b0 1
000004ba 0000280a 2351 1
.const
00003000 000033b5 3b6 2
00003000 00003413 414 2
.SLIB
000033b6 00005c6b 28b6 1
00003414 00005cc9 28b6 1
.monitor2
0003fe00 0003ffff 200 1
.bss
000fb500 000fbfa7 aa8 2
000fb500 000fcec1 19c2 2
.dataR
000fbfa8 000fc1d4 22d 2
000fcec2 000fd0f0 22f 2
.sbss
000ffe20 000ffe20 0 2
.sdataR
@ -84,9 +84,9 @@ SECTION START END SIZE ALIGN
*** Total Section Size ***
RAMDATA SECTION: 00000cd5 Byte(s)
ROMDATA SECTION: 0000088f Byte(s)
PROGRAM SECTION: 00004f19 Byte(s)
RAMDATA SECTION: 00001bf1 Byte(s)
ROMDATA SECTION: 000008ef Byte(s)
PROGRAM SECTION: 00004dba Byte(s)
*** Symbol List ***
@ -120,423 +120,423 @@ FILE=DefaultBuild\r_main.obj
FILE=DefaultBuild\owi.obj
000002f8 000002fb 4
FILE=DefaultBuild\i2c.obj
000002fc 00000301 6
000002fc 00000303 8
FILE=DefaultBuild\uart.obj
00000302 00000302 1
00000304 00000305 2
FILE=DefaultBuild\gatectrl.obj
00000304 00000304 1
00000306 00000306 1
SECTION=.text
FILE=DefaultBuild\cstart.obj
00000305 00000377 73
00000307 00000379 73
_start
00000305 0 none ,g *
00000307 0 none ,g *
_exit
00000375 0 none ,g *
_atexit
00000377 0 none ,g *
_atexit
00000379 0 none ,g *
FILE=DefaultBuild\r_cg_serial_user.obj
00000378 000004b7 140
0000037a 000004b9 140
_r_uart0_interrupt_receive@1
00000378 61 func ,l *
0000037a 61 func ,l *
_r_uart0_interrupt_send@1
000003d9 2f func ,l *
000003db 2f func ,l *
_r_uart1_interrupt_receive@1
00000408 5f func ,l *
0000040a 5f func ,l *
_r_uart1_interrupt_send@1
00000467 2f func ,l *
00000469 2f func ,l *
_r_iica0_interrupt@1
00000496 22 func ,l *
00000498 22 func ,l *
SECTION=.textf
FILE=DefaultBuild\stkinit.obj
000004b8 000004fb 44
000004ba 000004fd 44
_stkinit
000004b8 0 none ,g *
000004ba 0 none ,g *
LSTINIT1
000004c6 0 none ,l *
000004c8 0 none ,l *
LSTINIT2
000004f0 0 none ,l *
000004f2 0 none ,l *
LSTINIT3
000004fb 0 none ,l *
000004fd 0 none ,l *
FILE=DefaultBuild\r_main.obj
000004fc 00001258 d5d
000004fe 00001201 d04
_RS485_Bridge_Push
000004fc 2b func ,g *
000004fe 2b func ,g *
_RS485_Bridge_ResetFifo@1
00000527 e func ,l *
00000529 e func ,l *
_RS485_Bridge_ReadLine@1
00000535 91 func ,l *
00000537 91 func ,l *
_Is_V_Response_For@1
000005c6 40 func ,l *
000005c8 40 func ,l *
_UART1_WaitTxIdle@1
00000606 2c func ,l *
00000608 2c func ,l *
_UART1_SendString_Safe@1
00000632 39 func ,l *
00000634 36 func ,l *
_RS485_Bridge_DrainToPC@1
0000066b 4d func ,l *
0000066a 4d func ,l *
_hex2byte@1
000006b8 56 func ,l *
000006b7 56 func ,l *
_parse_x_prefix@1
0000070e 153 func ,l *
0000070d 153 func ,l *
_OUT_PRINT@1
00000861 d func ,l *
00000860 d func ,l *
_parse_x_v_cmd@1
0000086e 57 func ,l *
0000086d 57 func ,l *
_send_n_response@1
000008c5 2b func ,l *
000008c4 2b func ,l *
_send_v_response@1
000008f0 3f func ,l *
000008ef 3f func ,l *
_UART0_WaitTxDone_Flag@1
0000092f 3f func ,l *
_RS485_FlushJunk@1
0000096e 1b func ,l *
0000092e 3f func ,l *
_PC_PrintLine_CRLF@1
00000989 7c func ,l *
0000096d 7c func ,l *
_scan_one_addr_rs485@1
00000a05 10f func ,l *
000009e9 d4 func ,l *
_build_line_from_rx@1
00000b14 63 func ,l *
00000abd 63 func ,l *
_detect_protocol@1
00000b77 37 func ,l *
00000b20 37 func ,l *
_cmd_unknown@1
00000bae 10 func ,l *
00000b57 10 func ,l *
_process_cmd@1
00000bbe 6d func ,l *
00000b67 6d func ,l *
_process_cmd_by_prefix@1
00000c2b 11 func ,l *
00000bd4 11 func ,l *
_process_one_line@1
00000c3c 53d func ,l *
00000be5 53d func ,l *
_handle_uart_command_line
00001179 5d func ,g *
00001122 5d func ,g *
_main
000011d6 6c func ,g *
0000117f 6c func ,g *
_R_MAIN_UserInit
00001242 17 func ,g *
000011eb 17 func ,g *
FILE=DefaultBuild\r_systeminit.obj
00001259 00001299 41
00001202 00001242 41
_R_Systeminit
00001259 3a func ,g *
00001202 3a func ,g *
_hdwinit
00001293 7 func ,g *
0000123c 7 func ,g *
FILE=DefaultBuild\r_cg_cgc.obj
0000129a 000012c3 2a
00001243 0000126c 2a
_R_CGC_Create
0000129a 2a func ,g *
00001243 2a func ,g *
FILE=DefaultBuild\r_cg_cgc_user.obj
000012c4 000012c6 3
0000126d 0000126f 3
_R_CGC_Get_ResetSource
000012c4 3 func ,g *
0000126d 3 func ,g *
FILE=DefaultBuild\r_cg_serial.obj
000012c7 000015aa 2e4
00001270 00001553 2e4
_R_SAU0_Create
000012c7 10 func ,g *
00001270 10 func ,g *
_R_UART0_Create
000012d7 6e func ,g *
00001280 6e func ,g *
_R_UART0_Start
00001345 26 func ,g *
000012ee 26 func ,g *
_R_UART0_Stop
0000136b 1e func ,g *
00001314 1e func ,g *
_R_UART0_Receive
00001389 18 func ,g *
00001332 18 func ,g *
_R_UART0_Send
000013a1 26 func ,g *
0000134a 26 func ,g *
_R_SAU1_Create
000013c7 10 func ,g *
00001370 10 func ,g *
_R_UART1_Create
000013d7 6e func ,g *
00001380 6e func ,g *
_R_UART1_Start
00001445 26 func ,g *
000013ee 26 func ,g *
_R_UART1_Stop
0000146b 1e func ,g *
00001414 1e func ,g *
_R_UART1_Receive
00001489 18 func ,g *
00001432 18 func ,g *
_R_UART1_Send
000014a1 26 func ,g *
0000144a 26 func ,g *
_R_IICA0_Create
000014c7 50 func ,g *
00001470 50 func ,g *
_R_IICA0_Stop
00001517 5 func ,g *
000014c0 5 func ,g *
_R_IICA0_StopCondition
0000151c 5 func ,g *
000014c5 5 func ,g *
_R_IICA0_Master_Send
00001521 43 func ,g *
000014ca 43 func ,g *
_R_IICA0_Master_Receive
00001564 47 func ,g *
0000150d 47 func ,g *
FILE=DefaultBuild\r_cg_serial_user.obj
000015ab 0000174d 1a3
00001554 00001702 1af
_r_uart0_callback_receiveend@1
000015ab 63 func ,l *
00001554 60 func ,l *
_r_uart0_callback_softwareoverrun@1
0000160e 1 func ,l *
000015b4 1 func ,l *
_r_uart0_callback_sendend@1
0000160f 9 func ,l *
000015b5 9 func ,l *
_r_uart0_callback_error@1
00001618 64 func ,l *
000015be 64 func ,l *
_r_uart1_callback_receiveend@1
0000167c 33 func ,l *
00001622 33 func ,l *
_r_uart1_callback_softwareoverrun@1
000016af 1 func ,l *
00001655 1 func ,l *
_r_uart1_callback_sendend@1
000016b0 1 func ,l *
00001656 4 func ,l *
_r_uart1_callback_error@1
000016b1 1 func ,l *
0000165a 1 func ,l *
_iica0_masterhandler@1
000016b2 91 func ,l *
0000165b 91 func ,l *
_r_iica0_callback_master_error@1
00001743 1 func ,l *
000016ec 7 func ,l *
_r_iica0_callback_master_receiveend@1
00001744 5 func ,l *
000016f3 8 func ,l *
_r_iica0_callback_master_sendend@1
00001749 5 func ,l *
000016fb 8 func ,l *
FILE=DefaultBuild\r_cg_port.obj
0000174e 000017a6 59
00001703 0000175b 59
_R_PORT_Create
0000174e 59 func ,g *
00001703 59 func ,g *
FILE=DefaultBuild\owi.obj
000017a7 00002034 88e
0000175c 00001f28 7cd
_OWI_EnablePower
000017a7 1 func ,g *
0000175c 1 func ,g *
_OWI_DisablePower
000017a8 1 func ,g *
0000175d 1 func ,g *
_GPIO_Clear
000017a9 b func ,g *
0000175e b func ,g *
_GPIO_Input
000017b4 7 func ,g *
00001769 7 func ,g *
_GPIO_Read
000017bb 9 func ,g *
00001770 9 func ,g *
_OWI_Init
000017c4 18 func ,g *
00001779 18 func ,g *
_OWI_Start
000017dc 17 func ,g *
00001791 17 func ,g *
_OWI_Stop
000017f3 17 func ,g *
000017a8 17 func ,g *
_OWI_SecureStop
0000180a 51 func ,g *
000017bf 51 func ,g *
_OWI_WriteBit
0000185b 34 func ,g *
00001810 34 func ,g *
_OWI_WriteByte
0000188f 2a func ,g *
00001844 2a func ,g *
_OWI_ReadBit
000018b9 5e func ,g *
0000186e 5e func ,g *
_OWI_ReadByte
00001917 32 func ,g *
000018cc 32 func ,g *
_OWI_T_ReadBytesAndPrint
00001949 ff func ,g *
000018fe ff func ,g *
_OWI_A_CommandMode
00001a48 268 func ,g *
000019fd 268 func ,g *
_OWI_Diagnostic
00001cb0 156 func ,g *
00001c65 156 func ,g *
_OWI_disable
00001e06 18 func ,g *
00001dbb 18 func ,g *
_OWI_T_CommandMode
00001e1e 5d func ,g *
00001dd3 5d func ,g *
_OWI_CommandMode
00001e7b 4a func ,g *
00001e30 4a func ,g *
_OWI_ReadBytesAndPrint
00001ec5 170 func ,g *
00001e7a af func ,g *
FILE=DefaultBuild\i2c.obj
00002035 000023a5 371
00001f29 000021cd 2a5
_disable
00002035 26 func ,g *
00001f29 26 func ,g *
_I2C_EnablePower
0000205b 4 func ,g *
00001f4f 4 func ,g *
_I2C_DisablePower
0000205f 3 func ,g *
00001f53 3 func ,g *
_I2C_Diagnostic
00002062 124 func ,g *
00001f56 124 func ,g *
_I2C_T_Command_Mode_receiveData
00002186 4d func ,g *
0000207a 4d func ,g *
_I2C_Command_Mode_receiveData
000021d3 3e func ,g *
000020c7 3e func ,g *
_I2C_Command_Mode_Send
00002211 195 func ,g *
00002105 c9 func ,g *
FILE=DefaultBuild\uart.obj
000023a6 000024d3 12e
000021ce 00002376 1a9
_UART1_WaitTxIdle@1
000021ce 2c func ,l *
_rs485_set_tx
000023a6 b func ,g *
000021fa b func ,g *
_rs485_init
000023b1 c func ,g *
00002205 c func ,g *
_UART0_WaitTxDone_Us
000023bd 2f func ,g *
00002211 2f func ,g *
_RS485_Send
000023ec 14 func ,g *
00002240 1e func ,g *
_RS485_SendString
00002400 11 func ,g *
0000225e 11 func ,g *
_uart_send_string
00002411 25 func ,g *
0000226f 11 func ,g *
_uart1_send_string
00002436 12 func ,g *
00002280 67 func ,g *
_uart_send_hex
00002448 48 func ,g *
000022e7 48 func ,g *
_uart1_send_hex
00002490 44 func ,g *
0000232f 48 func ,g *
FILE=DefaultBuild\delay.obj
000024d4 00002592 bf
00002377 00002435 bf
_delay
000024d4 18 func ,g *
00002377 18 func ,g *
_delay_us
000024ec 82 func ,g *
0000238f 82 func ,g *
_delay_ms
0000256e 25 func ,g *
00002411 25 func ,g *
FILE=DefaultBuild\dipSwitch.obj
00002593 000025a3 11
00002436 00002446 11
_DipSwitch_Init
00002593 8 func ,g *
00002436 8 func ,g *
_DipSwitch_ReadAddr_0to31
0000259b 9 func ,g *
0000243e 9 func ,g *
FILE=DefaultBuild\gatectrl.obj
000025a4 00002967 3c4
00002447 0000280a 3c4
_Gate_SetByNum
000025a4 372 func ,g *
00002447 372 func ,g *
_Cal_Init
00002916 21 func ,g *
000027b9 21 func ,g *
_Eol_Init
00002937 21 func ,g *
000027da 21 func ,g *
_GateCtrl_SelectChannel
00002958 10 func ,g *
000027fb 10 func ,g *
SECTION=.const
FILE=DefaultBuild\r_main.obj
00003000 00003178 179
FILE=DefaultBuild\owi.obj
0000317a 0000323e c5
0000317a 00003273 fa
FILE=DefaultBuild\i2c.obj
00003240 00003379 13a
00003274 000033d6 163
FILE=DefaultBuild\gatectrl.obj
0000337a 000033b5 3c
000033d8 00003413 3c
SECTION=.SLIB
FILE=isdigit
000033b6 000033bf a
00003414 0000341d a
_isdigit
000033b6 0 none ,g *
00003414 0 none ,g *
FILE=memcpy
000033c0 000033cf 10
0000341e 0000342d 10
_memcpy
000033c0 0 none ,g *
0000341e 0 none ,g *
FILE=memset
000033d0 000033dd e
0000342e 0000343b e
_memset
000033d0 0 none ,g *
0000342e 0 none ,g *
FILE=sprintf
000033de 000034d6 f9
0000343c 00003534 f9
_sprintf
000033de e1 func ,g *
0000343c e1 func ,g *
__REL_sp@1
000034bf 18 func ,l *
0000351d 18 func ,l *
FILE=strcpy
000034d7 000034e3 d
00003535 00003541 d
_strcpy
000034d7 0 none ,g *
00003535 0 none ,g *
FILE=strlen
000034e4 000034ee b
00003542 0000354c b
_strlen
000034e4 0 none ,g *
00003542 0 none ,g *
FILE=toupper
000034ef 000034fc e
0000354d 0000355a e
_toupper
000034ef 0 none ,g *
0000354d 0 none ,g *
FILE=_REL_print
000034fd 00005454 1f58
0000355b 000054b2 1f58
__REL_print
000034fd 1046 func ,g *
0000355b 1046 func ,g *
__REL_fltprn@1
00004543 941 func ,l *
000045a1 941 func ,l *
__REL_henkan1@1
00004e84 28 func ,l *
00004ee2 28 func ,l *
__REL_henkan2@1
00004eac 33 func ,l *
00004f0a 33 func ,l *
__REL_pri@1
00004edf 298 func ,l *
00004f3d 298 func ,l *
__REL_fltgeti@1
00005177 19d func ,l *
000051d5 19d func ,l *
__REL_inmod@1
00005314 141 func ,l *
00005372 141 func ,l *
FILE=_COM_fdiv
00005455 00005582 12e
000054b3 000055e0 12e
__COM_fdiv
000054b4 0 none ,g *
00005512 0 none ,g *
FILE=_COM_feq
00005583 00005598 16
000055e1 000055f6 16
__COM_feq
00005583 0 none ,g *
000055e1 0 none ,g *
FILE=_COM_fge
00005599 000055ae 16
000055f7 0000560c 16
__COM_fge
00005599 0 none ,g *
000055f7 0 none ,g *
FILE=_COM_flt
000055af 000055c4 16
0000560d 00005622 16
__COM_flt
000055af 0 none ,g *
0000560d 0 none ,g *
FILE=_COM_fmul
000055c5 000056b1 ed
00005623 0000570f ed
__COM_fmul
00005610 0 none ,g *
0000566e 0 none ,g *
FILE=_COM_fne
000056b2 000056c2 11
00005710 00005720 11
__COM_fne
000056b2 0 none ,g *
00005710 0 none ,g *
FILE=_COM_ftosl
000056c3 000056ca 8
00005721 00005728 8
__COM_ftosl
000056c3 0 none ,g *
00005721 0 none ,g *
FILE=_COM_sidiv
000056cb 000056ec 22
00005729 0000574a 22
__COM_sidiv
000056cd 0 none ,g *
0000572b 0 none ,g *
FILE=_COM_sirem
000056ed 0000570c 20
0000574b 0000576a 20
__COM_sirem
000056ed 0 none ,g *
0000574b 0 none ,g *
FILE=_COM_ulldiv
0000570d 00005736 2a
0000576b 00005794 2a
__COM_ulldiv
0000570d 0 none ,g *
0000576b 0 none ,g *
FILE=_COM_ullrem
00005737 00005767 31
00005795 000057c5 31
__COM_ullrem
00005737 0 none ,g *
00005795 0 none ,g *
FILE=_REL_f_inf
00005768 0000576f 8
000057c6 000057cd 8
__REL_f_inf
00005768 0 none ,g *
000057c6 0 none ,g *
FILE=_REL_f_norm
00005770 0000577f 10
000057ce 000057dd 10
__REL_f_norm
00005770 0 none ,g *
000057ce 0 none ,g *
FILE=_REL_f_round
00005780 00005792 13
000057de 000057f0 13
__REL_f_round
00005780 0 none ,g *
000057de 0 none ,g *
FILE=_REL_fcmp
00005793 000057ca 38
000057f1 00005828 38
__REL_fcmp
00005793 0 none ,g *
000057f1 0 none ,g *
FILE=_REL_fordered_core
000057cb 000057e6 1c
00005829 00005844 1c
__REL_fordered_core
000057cb 0 none ,g *
00005829 0 none ,g *
FILE=_REL_ftol
000057e7 0000581b 35
00005845 00005879 35
__REL_ftol
000057e7 0 none ,g *
00005845 0 none ,g *
FILE=_REL_lldiv
0000581c 00005a21 206
0000587a 00005a7f 206
__REL_lldiv
00005838 0 none ,g *
00005896 0 none ,g *
FILE=_REL_llrem
00005a22 00005c25 204
00005a80 00005c83 204
__REL_llrem
00005a3f 0 none ,g *
00005a9d 0 none ,g *
FILE=_REL_ltosl
00005c26 00005c4a 25
00005c84 00005ca8 25
__REL_ltosl
00005c26 0 none ,g *
00005c84 0 none ,g *
FILE=_COM_lshr
00005c4b 00005c6b 21
00005ca9 00005cc9 21
__COM_lshr
00005c55 0 none ,g *
00005cb3 0 none ,g *
SECTION=.monitor2
FILE=rlink_generates_02
@ -587,76 +587,100 @@ FILE=DefaultBuild\r_cg_serial.obj
000fbf20 2 data ,g *
_g_iica0_tx_cnt
000fbf22 2 data ,g *
FILE=DefaultBuild\owi.obj
000fbf24 000fc62e 70b
_buf@2@OWI_ReadBytesAndPrint
000fbf24 258 data ,l *
_out@3@OWI_ReadBytesAndPrint
000fc17c 4b3 data ,l *
FILE=DefaultBuild\i2c.obj
000fc630 000fcd3a 70b
_rx@2@I2C_Command_Mode_Send
000fc630 258 data ,l *
_out@3@I2C_Command_Mode_Send
000fc888 4b3 data ,l *
FILE=DefaultBuild\uart.obj
000fcd3c 000fce3d 102
_s_uart1_txbuf@1
000fcd3c 100 data ,l *
_hex@2@uart1_send_hex
000fce3c 2 data ,l *
FILE=sprintf
000fbf24 000fbf27 4
000fce3e 000fce41 4
__REL_pointer@1
000fbf24 4 data ,l *
000fce3e 4 data ,l *
FILE=_REL_print
000fbf28 000fbfa7 80
000fce42 000fcec1 80
_qt@1@_REL_inmod@1
000fbf28 80 data ,l *
000fce42 80 data ,l *
SECTION=.dataR
FILE=DefaultBuild\r_main.obj
000fbfa8 000fc1c6 21f
000fcec2 000fd0e0 21f
_uart_rx_done
000fbfa8 1 data ,g *
000fcec2 1 data ,g *
_uart_rx_index
000fbfa9 1 data ,g *
000fcec3 1 data ,g *
_uart_rx_buffer
000fbfaa 100 data ,g *
000fcec4 100 data ,g *
_uart_rx_length
000fc0aa 2 data ,g *
000fcfc4 2 data ,g *
_rs485_rx_done
000fc0ac 1 data ,g *
000fcfc6 1 data ,g *
_rs485_rx_index
000fc0ad 1 data ,g *
000fcfc7 1 data ,g *
_rs485_rx_buffer
000fc0ae 100 data ,g *
000fcfc8 100 data ,g *
_rs485_rx_length
000fc1ae 2 data ,g *
000fd0c8 2 data ,g *
_g_uart0_err_fef
000fc1b0 4 data ,g *
000fd0ca 4 data ,g *
_g_uart0_err_ovf
000fc1b4 4 data ,g *
000fd0ce 4 data ,g *
_g_uart0_err_pef
000fc1b8 4 data ,g *
000fd0d2 4 data ,g *
_g_rs485_bridge_active
000fc1bc 1 data ,g *
000fd0d6 1 data ,g *
_g_rs485_bridge_done
000fc1bd 1 data ,g *
000fd0d7 1 data ,g *
_g_rs485_bridge_seq
000fc1be 2 data ,g *
000fd0d8 2 data ,g *
_s_end_st@1
000fc1c0 1 data ,l *
000fd0da 1 data ,l *
_g_fixed_addr
000fc1c1 1 data ,g *
000fd0db 1 data ,g *
_s_rb_head@3
000fc1c2 2 data ,l *
000fd0dc 2 data ,l *
_s_rb_tail@4
000fc1c4 2 data ,l *
000fd0de 2 data ,l *
_s_prefix_mode@6
000fc1c6 1 data ,l *
000fd0e0 1 data ,l *
FILE=DefaultBuild\owi.obj
000fc1c8 000fc1cb 4
000fd0e2 000fd0e5 4
_bit_period_us@1
000fc1c8 4 data ,l *
000fd0e2 4 data ,l *
FILE=DefaultBuild\i2c.obj
000fc1cc 000fc1d1 6
000fd0e6 000fd0ed 8
_i2c_tx_done
000fd0e6 1 data ,g *
_i2c_rx_done
000fd0e7 1 data ,g *
_g_i2c_last_command
000fc1cc 3 data ,g *
000fd0e8 3 data ,g *
_g_i2c_command_valid
000fc1cf 1 data ,g *
000fd0eb 1 data ,g *
_dis@1@disable
000fc1d0 2 data ,l *
000fd0ec 2 data ,l *
FILE=DefaultBuild\uart.obj
000fc1d2 000fc1d2 1
000fd0ee 000fd0ef 2
_g_uart0_tx_done
000fc1d2 1 data ,g *
000fd0ee 1 data ,g *
_g_uart1_tx_done
000fd0ef 1 data ,g *
FILE=DefaultBuild\gatectrl.obj
000fc1d4 000fc1d4 1
000fd0f0 000fd0f0 1
_s_ch@1
000fc1d4 1 data ,l *
000fd0f0 1 data ,l *
Absolute value symbols
FILE=DefaultBuild\gatectrl.obj
@ -664,17 +688,17 @@ FILE=DefaultBuild\gatectrl.obj
00000028 0 none ,l *
FILE=rlink_generates_05
__s.text
00000305 0 none ,g *
00000307 0 none ,g *
__e.text
000004b8 0 none ,g *
000004ba 0 none ,g *
__s.textf
000004b8 0 none ,g *
000004ba 0 none ,g *
__e.textf
00002968 0 none ,g *
0000280b 0 none ,g *
__s.const
00003000 0 none ,g *
__e.const
000033b6 0 none ,g *
00003414 0 none ,g *
__s.constf
00000080 0 none ,g *
__e.constf
@ -682,7 +706,7 @@ FILE=rlink_generates_05
__s.data
000000d8 0 none ,g *
__e.data
00000305 0 none ,g *
00000307 0 none ,g *
__s.sdata
00000080 0 none ,g *
__e.sdata
@ -690,15 +714,15 @@ FILE=rlink_generates_05
__s.bss
000fb500 0 none ,g *
__e.bss
000fbfa8 0 none ,g *
000fcec2 0 none ,g *
__s.sbss
000ffe20 0 none ,g *
__e.sbss
000ffe20 0 none ,g *
__s.dataR
000fbfa8 0 none ,g *
000fcec2 0 none ,g *
__e.dataR
000fc1d5 0 none ,g *
000fd0f1 0 none ,g *
__s.sdataR
000ffe20 0 none ,g *
__e.sdataR
@ -712,9 +736,9 @@ FILE=rlink_generates_05
__e.RLIB
000000c4 0 none ,g *
__s.SLIB
000033b6 0 none ,g *
00003414 0 none ,g *
__e.SLIB
00005c6c 0 none ,g *
00005cca 0 none ,g *
__s.option_byte
000000c0 0 none ,g *
__e.option_byte
@ -742,7 +766,7 @@ FILE=rlink_generates_05
__STACK_ADDR_START
000ffe20 0 none ,g *
__STACK_ADDR_END
000fc1d6 0 none ,g *
000fd0f2 0 none ,g *
*** Unfilled Areas ***

2583
DefaultBuild/multical.mot

File diff suppressed because it is too large

BIN
DefaultBuild/owi.obj

Binary file not shown.

BIN
DefaultBuild/r_cg_cgc.obj

Binary file not shown.

BIN
DefaultBuild/r_cg_cgc_user.obj

Binary file not shown.

BIN
DefaultBuild/r_cg_port.obj

Binary file not shown.

BIN
DefaultBuild/r_cg_port_user.obj

Binary file not shown.

BIN
DefaultBuild/r_cg_serial.obj

Binary file not shown.

BIN
DefaultBuild/r_cg_serial_user.obj

Binary file not shown.

BIN
DefaultBuild/r_main.obj

Binary file not shown.

BIN
DefaultBuild/r_systeminit.obj

Binary file not shown.

BIN
DefaultBuild/stkinit.obj

Binary file not shown.

BIN
DefaultBuild/uart.obj

Binary file not shown.

40
QualityReport(multical,DefaultBuild).txt

@ -1,22 +1,22 @@
QualityReport
2026년 2월 5일 목요일 오후 2:02:43
2026년 2월 5일 목요일 오후 11:05:49
------ Start build(multical, DefaultBuild) ------
------ Build ended(Error:0, Warning:0)(multical, DefaultBuild) ------
--- SHA1 hash value of output files ---
C:\Users\temp\Desktop\new_fw\DefaultBuild\multical.abs: 8c34dc35fd1a827d4e5eee656b2695c8821e9889
C:\Users\temp\Desktop\new_fw\DefaultBuild\multical.mot: 7e2e91996c4c0d330dc3579dcc206a229f0eef8f
C:\Users\MSI\Desktop\amosense\mulitcabration_4251_developement_fw\new_fw\DefaultBuild\multical.abs: 2876195a927db94261b433408811d19472d704ac
C:\Users\MSI\Desktop\amosense\mulitcabration_4251_developement_fw\new_fw\DefaultBuild\multical.mot: 0003bd530482102d0db1c7bd747ec1482d4e2935
--- System Information ---
*OS Version
Microsoft Windows 10 Pro (-, 10.0.19045, WOW64)
Microsoft Windows 11 Home (-, 10.0.26200, WOW64)
*Language
한국어(대한민국)
*.NET Framework Version
Microsoft .NET Framework 4 [.NET 4.8 or later] (533325)
Microsoft .NET Framework 4 [.NET 4.8 or later] (533509)
*WebView2 Version
144.0.3719.93
@ -29,19 +29,21 @@ C:\Users\temp\Desktop\new_fw\DefaultBuild\multical.mot: 7e2e91996c4c0d330dc3579d
V9.13.00.05 [12 Nov 2024]
*Assembly Version
3.12.10.1
*Sales Area
Japan
*Product License
*Execution Place
C:\Program Files (x86)\Renesas Electronics\CS+\CC
*Memory Usage
*Private Working Set
296 MB
314 MB
*Number of GDI Objects
2611
2580
*Number of USER Objects
1570
1407
*Opened Files
24 editors, 24 files, 194 KB
25 editors, 25 files, 206 KB
--- Build Tool Plug-in Information ---
RH850 Build tool CC-RH Plug-in
@ -146,6 +148,20 @@ Editor plug-in DLL
1.1.0.0
*DLL File Name
SEditor.dll
Smart Configurator for RH850 Communication Plug-in
*Version
V1.02.10.03 [14 Nov 2024]
*Assembly Version
1.0.0.0
*DLL File Name
SmcCodePartRH850.dll
Smart Configurator for RL78 Communication Plug-in
*Version
V1.00.11.01 [25 Nov 2024]
*Assembly Version
1.0.0.0
*DLL File Name
SmcCodePartRL78.dll
Stack Usage Tracer
*Version
V1.05.00.02 [30 Jul 2014]
@ -177,7 +193,7 @@ Device Information Common Interface
DeviceInformation.dll
--- Main Project Information ---
C:\Users\temp\Desktop\new_fw\multical.mtpj
C:\Users\MSI\Desktop\amosense\mulitcabration_4251_developement_fw\new_fw\multical.mtpj
Microcontroller Information
*R5F10PPJ
*File Name: Version
@ -218,6 +234,10 @@ Other Tool Information
*Version
V4.13.00.03 [24 May 2023]
*None
*None
*Code Generator
Other Information
*RL78/F14 Code Library

70
i2c.c

@ -3,6 +3,9 @@
#include "uart.h"
#include <string.h>
volatile uint8_t i2c_tx_done = 0;
volatile uint8_t i2c_rx_done = 0;
uint8_t g_i2c_last_command[3] = {0};
uint8_t g_i2c_command_valid = 0;
@ -296,46 +299,43 @@ void I2C_Command_Mode_receiveData(const uint8_t *tx_data, uint8_t tx_len,uint8_t
*/
void I2C_Command_Mode_Send(uint8_t tx_len, uint8_t id)
{
char uart_buf[16];
char tmp_buf[8];
int i,j;
uint8_t rx[600];
uint8_t va0, va1;
uint8_t status = 0x00;
int tries = 0;
/* 버퍼 초기화 (기존 로직/출력 형식 유지) */
memset(uart_buf, 0, sizeof(uart_buf));
memset(tmp_buf, 0, sizeof(tmp_buf));
memset(rx, 0x00, sizeof(rx)); // 가드 패턴(0x00으로 해도 무방)
if (R_IICA0_Master_Receive((id << 1), rx, (uint8_t)(tx_len), 1000) != MD_OK) {
static uint8_t rx[600];
static char out[2*600 + 3];
uint16_t i;
uint16_t p = 0;
uint32_t guard = 0;
if (tx_len == 0) return;
if (tx_len > 600) tx_len = 600;
memset(rx, 0x00, sizeof(rx));
i2c_rx_done = 0; // ✅ 수신 시작 전 클리어
if (R_IICA0_Master_Receive((id << 1), rx, tx_len, 1000) != MD_OK) {
HOST_PRINT("I2C Receive Failed\r\n");
return;
}
delay(10000);
sprintf(uart_buf, "%02X ", rx[0]);
strcpy(tmp_buf, uart_buf);
HOST_PRINT(uart_buf);
delay(10000);
for (i = 1; i < (tx_len); i += 2) {
va0 = rx[i];
if (i + 1 < (tx_len)) {
va1 = rx[i + 1];
delay(10000);
sprintf(uart_buf, "%02X%02X ", va0, va1);
HOST_PRINT(uart_buf);
delay(10000);
} else {
delay(10000);
sprintf(uart_buf, "%02X", va0);
strcpy(tmp_buf, uart_buf);
HOST_PRINT(uart_buf);
delay(10000);
/* ✅ 수신 완료까지 대기 (delay로 때우지 말고 플래그로) */
while (!i2c_rx_done) {
if (guard++ > 3000000UL) { // 타임아웃 (환경 맞게 조절)
HOST_PRINT("I2C RX Timeout\r\n");
return;
}
}
HOST_PRINT("\r\n");
/* ✅ OWI처럼: 공백 없이 붙여서 출력 */
for (i = 0; i < tx_len; i++) {
uint8_t b = rx[i];
out[p++] = "0123456789ABCDEF"[b >> 4];
out[p++] = "0123456789ABCDEF"[b & 0x0F];
}
out[p++] = '\r';
out[p++] = '\n';
out[p] = '\0';
HOST_PRINT(out);
}

1
i2c.h

@ -9,6 +9,7 @@
extern volatile uint8_t i2c_tx_done;
extern volatile uint8_t i2c_rx_done;
void I2C_EnablePower(void);
void I2C_DisablePower(void);
void I2C_Command_Mode(void);

301
multical.MSI.mtud

File diff suppressed because one or more lines are too long

43
owi.c

@ -414,12 +414,15 @@ void OWI_CommandMode(const uint8_t *tx_data, uint8_t tx_len, uint8_t id)
void OWI_ReadBytesAndPrint(int length, uint8_t id)
{
uint8_t buf[600];
static uint8_t buf[600];
static char out[2*600 + 3];
int i;
char uart_buf[8];
char tmp_buf[8];
uint8_t va0, va1;
uint16_t p = 0;
if (length <= 0) {
HOST_PRINT("Err:read_len_nonzero\r\n");
return;
}
if (length > 600) length = 600;
OWI_SecureStop();
@ -429,31 +432,17 @@ void OWI_ReadBytesAndPrint(int length, uint8_t id)
buf[i] = OWI_ReadByte();
}
sprintf(uart_buf, "%02X ", buf[0]);
strcpy(tmp_buf, uart_buf);
HOST_PRINT(tmp_buf);
for (i = 1; i < length; i += 2) {
va0 = buf[i];
if (i + 1 < length) {
va1 = buf[i + 1];
delay(10000);
sprintf(uart_buf, "%02X%02X ", va0, va1);
strcpy(tmp_buf, uart_buf);
HOST_PRINT(tmp_buf);
delay(10000);
} else {
delay(10000);
sprintf(uart_buf, "%02X", va0);
strcpy(tmp_buf, uart_buf);
HOST_PRINT(tmp_buf);
delay(10000);
}
/* ✅ 공백 없이 전부 붙이기 */
for (i = 0; i < length; i++) {
uint8_t b = buf[i];
out[p++] = "0123456789ABCDEF"[b >> 4];
out[p++] = "0123456789ABCDEF"[b & 0x0F];
}
out[p++] = '\r';
out[p++] = '\n';
out[p] = '\0';
HOST_PRINT("\r\n");
HOST_PRINT(out); /* ✅ 딱 1번만 출력 */
}

68
r_cg_serial_user.c

@ -33,6 +33,7 @@ Includes
#include "r_cg_serial.h"
/* Start user code for include. Do not edit comment generated here */
#include "uart.h"
#include "i2c.h"
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
@ -81,6 +82,7 @@ extern volatile uint32_t g_uart0_err_ovf;
extern volatile uint32_t g_uart0_err_pef;
extern volatile uint8_t g_uart0_tx_done;
extern volatile uint8_t g_uart1_tx_done;
extern volatile uint16_t g_rs485_bridge_seq;
/* End user code. Do not edit comment generated here */
@ -148,54 +150,61 @@ static void __near r_uart0_interrupt_send(void)
***********************************************************************************************************************/
static void r_uart0_callback_receiveend(void)
{
uint8_t c = rs485_rx_buffer[rs485_rx_index];
/* =========================
* (A) BRIDGE MODE: always 1 byte at buffer[0]
* ========================= */
if (g_rs485_bridge_active) {
uint8_t c = rs485_rx_buffer[0];
if (g_rs485_bridge_active) {
RS485_Bridge_Push(c);
g_rs485_bridge_seq++;
/* ??? ????? rs485_rx_buffer ?? ??? ?? ??? ??? ?? */
/* keep index/length reset in bridge */
rs485_rx_index = 0;
rs485_rx_length = 0;
/* ?? 1??? ?? ?? */
R_UART0_Receive((uint8_t*)&rs485_rx_buffer[0], 1);
return;
}
/* =========================
* (B) NORMAL MODE (x... ???? ???? ??)
* (B) NORMAL MODE: accumulate line
* - IMPORTANT: current byte is already stored at rs485_rx_buffer[rs485_rx_index]
* - so update index/length AFTER using c
* ========================= */
/* ??/????? ?? ?? ?? */
if (c == '\r' || c == '\n' || rs485_rx_index >= (UART_RX_BUF_SIZE - 1))
{
/* ???? ??? ?? = rs485_rx_index (?? ?? ?) */
uint8_t c = rs485_rx_buffer[rs485_rx_index];
/* ?? ????? ?? */
rs485_rx_index++;
rs485_rx_length = rs485_rx_index;
/* x? ???? ??? “??”?? ?? */
if (rs485_rx_length > 0) {
uint8_t first = rs485_rx_buffer[0];
if (first == 'x' || first == 'X') {
rs485_rx_done = 1;
return; /* main loop? ?? ? ?? re-arm */
/* ? ?? or ?? ?? */
if (c == '\r' || c == '\n' || rs485_rx_index >= (UART_RX_BUF_SIZE - 1))
{
/* length? CR/LF ?? ????, main? build_line_from_rx? CR/LF ???? OK */
/* x? ???? ??? main loop? ?? */
if (rs485_rx_length > 0) {
uint8_t first = rs485_rx_buffer[0];
if (first == 'x' || first == 'X') {
rs485_rx_done = 1;
return; /* main loop? ?? ? re-arm */
}
}
/* x? ??? ??? ?? ?? */
rs485_rx_index = 0;
rs485_rx_length = 0;
R_UART0_Receive((uint8_t*)&rs485_rx_buffer[0], 1);
return;
}
/* x? ??? ?? + ?? 1??? ?? ?? */
rs485_rx_index = 0;
rs485_rx_length = 0;
R_UART0_Receive((uint8_t*)&rs485_rx_buffer[0], 1);
return;
/* ?? 1??? ?? ?? */
R_UART0_Receive((uint8_t*)&rs485_rx_buffer[rs485_rx_index], 1);
}
/* ?? ?? ? ??: ?? ??? ?? ??? ?? */
rs485_rx_index++;
rs485_rx_length = rs485_rx_index;
/* ?? 1??? ?? */
R_UART0_Receive((uint8_t*)&rs485_rx_buffer[rs485_rx_index], 1);
}
/* End user code. Do not edit comment generated here */
@ -363,6 +372,7 @@ static void r_uart1_callback_softwareoverrun(uint16_t rx_data)
static void r_uart1_callback_sendend(void)
{
/* Start user code. Do not edit comment generated here */
g_uart1_tx_done = 1;
/* End user code. Do not edit comment generated here */
}
@ -503,6 +513,8 @@ static void iica0_masterhandler(void)
static void r_iica0_callback_master_error(MD_STATUS flag)
{
/* Start user code. Do not edit comment generated here */
i2c_rx_done = 1;
i2c_tx_done = 1;
/* End user code. Do not edit comment generated here */
}
@ -516,6 +528,7 @@ static void r_iica0_callback_master_receiveend(void)
{
SPT0 = 1U;
/* Start user code. Do not edit comment generated here */
i2c_rx_done = 1;
/* End user code. Do not edit comment generated here */
}
@ -529,6 +542,7 @@ static void r_iica0_callback_master_sendend(void)
{
SPT0 = 1U;
/* Start user code. Do not edit comment generated here */
i2c_tx_done = 1;
/* End user code. Do not edit comment generated here */
}

52
r_main.c

@ -211,7 +211,7 @@ static void UART1_SendString_Safe(const char *s)
R_UART1_Send(g_uart1_txbuf, len);
UART1_WaitTxIdle();
//UART1_WaitTxIdle();
}
/* =========================
@ -452,11 +452,12 @@ static void PC_PrintLine_CRLF(const char *line)
/* =========================
* RS485 scan: xNNv\r\n
* ========================= */
/* =========================
* RS485 scan: xNNv\r\n (pattern-based, no line needed)
* ========================= */
static void scan_one_addr_rs485(uint8_t addr)
{
char cmdline[8];
uint8_t try;
uint8_t i;
if (addr == 0) return;
@ -468,68 +469,63 @@ static void scan_one_addr_rs485(uint8_t addr)
cmdline[5] = '\n';
cmdline[6] = '\0';
for (try = 0; try < 3; try++)
/* ? try 횟수 줄이기: 속도 핵심 */
{
// --- bridge 준비 ---
/* --- bridge 준비 --- */
g_rs485_bridge_active = 1;
g_rs485_bridge_done = 0;
RS485_Bridge_ResetFifo();
// RX arm
/* RX arm (브릿지 모드는 항상 buffer[0]로 1바이트 받는 구조여야 함) */
rs485_rx_done = 0;
rs485_rx_index = 0;
rs485_rx_length = 0;
R_UART0_Receive((uint8_t*)&rs485_rx_buffer[0], 1);
RS485_FlushJunk(40, 10); // 400us 정도
// ? (B) 송신
/* ---- 송신 ---- */
g_uart0_tx_done = 0;
RS485_PRINT(cmdline);
// ? (C) TX 끝 + rs485_set_tx(0)까지 보장 (sendend callback이 set)
UART0_WaitTxDone_Flag(3000); // 3ms 안에 충분
delay_us(30);
// ? (D) 턴어라운드 (460800이면 100~300us면 충분)
delay_us(120);
/* TX 완료 대기 (너무 길게 잡지 말기) */
UART0_WaitTxDone_Flag(2500); // 2.5ms 가드
rs485_set_tx(0); // 혹시 몰라 강제 RX
delay_us(80); // turnaround (환경 따라 50~150us)
/* ---- 응답 대기 (짧게) ---- */
{
uint32_t total_wait_us = 4000; // 필요시 20~30ms까지 올려도 됨
uint32_t total_wait_us = 2500; // ? 2.5ms면 대부분 충분
char linebuf[32];
while (total_wait_us > 0) {
int got = RS485_Bridge_ReadLine(linebuf, sizeof(linebuf), 2000); // 2ms chunk
/* 0.5ms씩 끊어 보기 */
int got = RS485_Bridge_ReadLine(linebuf, sizeof(linebuf), 500);
if (got) {
// 에코(x02v\n)나 잡음 라인은 무시하고 계속 본다
if (Is_V_Response_For(linebuf, addr)) {
PC_PrintLine_CRLF(linebuf);
PC_PrintLine_CRLF(linebuf);
g_rs485_bridge_active = 0;
return; // 성공
return;
}
} else {
// 2ms 동안 라인 못 만들었으면 남은 시간 줄이고 계속
/* 다른 라인(쓰레기/에코)면 계속 */
}
if (total_wait_us > 2000) total_wait_us -= 2000;
else total_wait_us = 0;
total_wait_us -= 500;
}
}
g_rs485_bridge_active = 0;
delay_us(300);
}
// 3번 다 실패하면 Nxx
/* 실패 시 Nxx */
send_n_response(addr);
// 다음을 위해 RX 재arm
/* 다음을 위해 RX 재arm */
rs485_rx_done = 0;
rs485_rx_index = 0;
rs485_rx_length = 0;
R_UART0_Receive((uint8_t*)&rs485_rx_buffer[0], 1);
}
/* =========================
* Build line from rx buffer
* ========================= */

54
uart.c

@ -8,6 +8,21 @@
#define RS485_EN_MASK (0x20U) // P4.5
volatile uint8_t g_uart0_tx_done = 1;
volatile uint8_t g_uart1_tx_done = 1;
extern volatile uint16_t g_uart1_tx_count;
/* UART1 송신용 내부 버퍼(스택 포인터 안전) */
static uint8_t s_uart1_txbuf[256]; // 너 출력 단위가 "72 " / "7272 " 정도라 64면 충분
// (더 길게 보내면 키워도 됨)
static void UART1_WaitTxIdle(void)
{
unsigned long guard = 0;
while (g_uart1_tx_count != 0U) {
if (guard++ > 3000000UL) break; // 무한루프 방지
}
}
void rs485_set_tx(uint8_t on)
{
@ -31,8 +46,12 @@ void UART0_WaitTxDone_Us(uint32_t timeout_us)
void RS485_Send(const uint8_t* data, uint16_t len)
{
if (!data || len == 0) return;
/* ✅ 송신 시작을 명확히 */
g_uart0_tx_done = 0;
rs485_set_tx(1);
R_UART0_Send((uint8_t*)data, len);
}
@ -42,6 +61,15 @@ void RS485_SendString(const char* s)
while (s[len] != '\0') len++;
RS485_Send((const uint8_t*)s, len);
}
static void UART1_WaitTxDone_Us(uint32_t timeout_us)
{
while (!g_uart1_tx_done && timeout_us >= 10U) {
delay_us(10);
timeout_us -= 10U;
}
}
/**
* : uart_send_string
* : null UART0로
@ -70,19 +98,31 @@ void uart_send_string(const char *str)
uint16_t len = 0;
while (str[len] != '\0') len++;
g_uart0_tx_done = 0; // 송신 시작
rs485_set_tx(1);
R_UART0_Send((uint8_t *)str, len);
RS485_Send((const uint8_t*)str, len);
}
// UART1(PC)
void uart1_send_string(const char *str)
{
uint16_t len = 0;
if (str == 0) return;
while (str[len] != '\0') len++;
R_UART1_Send((uint8_t *)str, len);
}
/* ✅ 이전 전송 끝날 때까지 대기 */
UART1_WaitTxIdle();
/* ✅ 스택 포인터/버퍼 수명 문제 방지: 내부 버퍼로 복사 */
if (len >= (uint16_t)sizeof(s_uart1_txbuf))
len = (uint16_t)(sizeof(s_uart1_txbuf) - 1);
memcpy(s_uart1_txbuf, str, len);
/* ✅ 비동기 송신 시작 */
R_UART1_Send(s_uart1_txbuf, len);
/* ❌ 여기서 또 기다리지 마(속도 저하). 다음 호출이 알아서 대기함 */
}
/**
* : uart_send_hex
* : 8 (uint8_t) 16 UART0로
@ -129,15 +169,15 @@ void uart_send_hex(uint8_t val)
void uart1_send_hex(uint8_t val)
{
uint8_t hex[2];
static uint8_t hex[2];
uint8_t high = (val >> 4) & 0x0F;
uint8_t low = val & 0x0F;
hex[0] = (high < 10) ? ('0' + high) : ('A' + (high - 10));
hex[1] = (low < 10) ? ('0' + low ) : ('A' + (low - 10));
UART1_WaitTxIdle();
R_UART1_Send(hex, 2);
}

Loading…
Cancel
Save