Browse Source

add channel

feat/dipSwitch
gudae 2 weeks ago
parent
commit
3ed580dc67
  1. BIN
      DefaultBuild/anaout.obj
  2. BIN
      DefaultBuild/check_pin.obj
  3. BIN
      DefaultBuild/gatectrl.obj
  4. BIN
      DefaultBuild/hash_pin.obj
  5. BIN
      DefaultBuild/multical.abs
  6. 3
      DefaultBuild/multical.clnk
  7. 511
      DefaultBuild/multical.map
  8. 2361
      DefaultBuild/multical.mot
  9. BIN
      DefaultBuild/r_main.obj
  10. 37
      QualityReport(multical,DefaultBuild).txt
  11. 144
      anaout.c
  12. 25
      anaout.h
  13. 79
      check_pin.c
  14. 26
      check_pin.h
  15. 78
      gatectrl.c
  16. 40
      gatectrl.h
  17. 88
      hash_pin.c
  18. 26
      hash_pin.h
  19. 190
      multical.COMPUTER1.mtud
  20. 129
      multical.mtpj
  21. 25
      multical.rcpe
  22. 43
      r_main.c

BIN
DefaultBuild/anaout.obj

Binary file not shown.

BIN
DefaultBuild/check_pin.obj

Binary file not shown.

BIN
DefaultBuild/gatectrl.obj

Binary file not shown.

BIN
DefaultBuild/hash_pin.obj

Binary file not shown.

BIN
DefaultBuild/multical.abs

Binary file not shown.

3
DefaultBuild/multical.clnk

@ -18,6 +18,9 @@
-Input=DefaultBuild\uart.obj -Input=DefaultBuild\uart.obj
-Input=DefaultBuild\delay.obj -Input=DefaultBuild\delay.obj
-Input=DefaultBuild\dipSwitch.obj -Input=DefaultBuild\dipSwitch.obj
-Input=DefaultBuild\gatectrl.obj
-Input=DefaultBuild\hash_pin.obj
-Input=DefaultBuild\check_pin.obj
-SECURITY_ID=00000000000000000000 -SECURITY_ID=00000000000000000000
-DEVICE=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF -DEVICE=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF
-DEBug -DEBug

511
DefaultBuild/multical.map

@ -1,4 +1,4 @@
Renesas Optimizing Linker (W3.07.00 ) 14-Jan-2026 10:30:43 Renesas Optimizing Linker (W3.07.00 ) 14-Jan-2026 18:55:13
*** Options *** *** Options ***
@ -23,6 +23,9 @@ Renesas Optimizing Linker (W3.07.00 ) 14-Jan-2026 10:30:43
-Input=DefaultBuild\uart.obj -Input=DefaultBuild\uart.obj
-Input=DefaultBuild\delay.obj -Input=DefaultBuild\delay.obj
-Input=DefaultBuild\dipSwitch.obj -Input=DefaultBuild\dipSwitch.obj
-Input=DefaultBuild\gatectrl.obj
-Input=DefaultBuild\hash_pin.obj
-Input=DefaultBuild\check_pin.obj
-SECURITY_ID=00000000000000000000 -SECURITY_ID=00000000000000000000
-DEVICE=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF -DEVICE=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF
-DEBug -DEBug
@ -62,19 +65,19 @@ SECTION START END SIZE ALIGN
.RLIB .RLIB
000000c4 000000c4 0 1 000000c4 000000c4 0 1
.data .data
000000ce 0000014a 7d 2 000000ce 0000014c 7f 2
.text .text
0000014b 000002fd 1b3 1 0000014d 000002ff 1b3 1
.textf .textf
000002fe 00001cf0 19f3 1 00000300 00001ecd 1bce 1
.const .const
00003000 0000335b 35c 2 00003000 00003413 414 2
.SLIB .SLIB
0000335c 00005d9d 2a42 1 00003414 00005e55 2a42 1
.bss .bss
000faf00 000fafa3 a4 2 000faf00 000fafa3 a4 2
.dataR .dataR
000fafa4 000fb020 7d 2 000fafa4 000fb022 7f 2
.sbss .sbss
000ffe20 000ffe20 0 2 000ffe20 000ffe20 0 2
.sdataR .sdataR
@ -82,9 +85,9 @@ SECTION START END SIZE ALIGN
*** Total Section Size *** *** Total Section Size ***
RAMDATA SECTION: 00000121 Byte(s) RAMDATA SECTION: 00000123 Byte(s)
ROMDATA SECTION: 0000047b Byte(s) ROMDATA SECTION: 00000535 Byte(s)
PROGRAM SECTION: 000045e8 Byte(s) PROGRAM SECTION: 000047c3 Byte(s)
*** Symbol List *** *** Symbol List ***
@ -115,410 +118,470 @@ FILE=DefaultBuild\i2c.obj
00000134 00000139 6 00000134 00000139 6
FILE=DefaultBuild\uart.obj FILE=DefaultBuild\uart.obj
0000013a 0000014a 11 0000013a 0000014a 11
FILE=DefaultBuild\gatectrl.obj
0000014c 0000014c 1
SECTION=.text SECTION=.text
FILE=DefaultBuild\cstart.obj FILE=DefaultBuild\cstart.obj
0000014b 000001bd 73 0000014d 000001bf 73
_start _start
0000014b 0 none ,g * 0000014d 0 none ,g *
_exit _exit
000001bb 0 none ,g *
_atexit
000001bd 0 none ,g * 000001bd 0 none ,g *
_atexit
000001bf 0 none ,g *
FILE=DefaultBuild\r_cg_serial_user.obj FILE=DefaultBuild\r_cg_serial_user.obj
000001be 000002f9 13c 000001c0 000002fb 13c
_r_uart0_interrupt_receive@1 _r_uart0_interrupt_receive@1
000001be 5f func ,l * 000001c0 5f func ,l *
_r_uart0_interrupt_send@1 _r_uart0_interrupt_send@1
0000021d 2f func ,l * 0000021f 2f func ,l *
_r_uart1_interrupt_receive@1 _r_uart1_interrupt_receive@1
0000024c 5f func ,l * 0000024e 5f func ,l *
_r_uart1_interrupt_send@1 _r_uart1_interrupt_send@1
000002ab 2f func ,l * 000002ad 2f func ,l *
_r_iica0_interrupt@1 _r_iica0_interrupt@1
000002da 20 func ,l * 000002dc 20 func ,l *
FILE=DefaultBuild\r_cg_wdt_user.obj FILE=DefaultBuild\r_cg_wdt_user.obj
000002fa 000002fb 2 000002fc 000002fd 2
_r_wdt_interrupt@1 _r_wdt_interrupt@1
000002fa 2 func ,l * 000002fc 2 func ,l *
FILE=DefaultBuild\r_cg_adc_user.obj FILE=DefaultBuild\r_cg_adc_user.obj
000002fc 000002fd 2 000002fe 000002ff 2
_r_adc_interrupt@1 _r_adc_interrupt@1
000002fc 2 func ,l * 000002fe 2 func ,l *
SECTION=.textf SECTION=.textf
FILE=DefaultBuild\stkinit.obj FILE=DefaultBuild\stkinit.obj
000002fe 00000341 44 00000300 00000343 44
_stkinit _stkinit
000002fe 0 none ,g * 00000300 0 none ,g *
LSTINIT1 LSTINIT1
0000030c 0 none ,l * 0000030e 0 none ,l *
LSTINIT2 LSTINIT2
00000336 0 none ,l * 00000338 0 none ,l *
LSTINIT3 LSTINIT3
00000341 0 none ,l * 00000343 0 none ,l *
FILE=DefaultBuild\r_main.obj FILE=DefaultBuild\r_main.obj
00000342 00000901 5c0 00000344 00000903 5c0
_hex2byte@1 _hex2byte@1
00000342 34 func ,l * 00000344 34 func ,l *
_handle_uart_command_line _handle_uart_command_line
00000376 539 func ,g * 00000378 539 func ,g *
_main _main
000008af 31 func ,g * 000008b1 31 func ,g *
_R_MAIN_UserInit _R_MAIN_UserInit
000008e0 22 func ,g * 000008e2 22 func ,g *
FILE=DefaultBuild\r_systeminit.obj FILE=DefaultBuild\r_systeminit.obj
00000902 00000948 47 00000904 0000094a 47
_R_Systeminit _R_Systeminit
00000902 42 func ,g * 00000904 42 func ,g *
_hdwinit _hdwinit
00000944 5 func ,g * 00000946 5 func ,g *
FILE=DefaultBuild\r_cg_cgc.obj FILE=DefaultBuild\r_cg_cgc.obj
00000949 00000972 2a 0000094b 00000974 2a
_R_CGC_Create _R_CGC_Create
00000949 2a func ,g * 0000094b 2a func ,g *
FILE=DefaultBuild\r_cg_cgc_user.obj FILE=DefaultBuild\r_cg_cgc_user.obj
00000973 00000975 3 00000975 00000977 3
_R_CGC_Get_ResetSource _R_CGC_Get_ResetSource
00000973 3 func ,g * 00000975 3 func ,g *
FILE=DefaultBuild\r_cg_serial.obj FILE=DefaultBuild\r_cg_serial.obj
00000976 00000c49 2d4 00000978 00000c4b 2d4
_R_SAU0_Create _R_SAU0_Create
00000976 c func ,g * 00000978 c func ,g *
_R_UART0_Create _R_UART0_Create
00000982 6e func ,g * 00000984 6e func ,g *
_R_UART0_Start _R_UART0_Start
000009f0 26 func ,g * 000009f2 26 func ,g *
_R_UART0_Stop _R_UART0_Stop
00000a16 1e func ,g * 00000a18 1e func ,g *
_R_UART0_Receive _R_UART0_Receive
00000a34 18 func ,g * 00000a36 18 func ,g *
_R_UART0_Send _R_UART0_Send
00000a4c 26 func ,g * 00000a4e 26 func ,g *
_R_SAU1_Create _R_SAU1_Create
00000a72 c func ,g * 00000a74 c func ,g *
_R_UART1_Create _R_UART1_Create
00000a7e 6e func ,g * 00000a80 6e func ,g *
_R_UART1_Start _R_UART1_Start
00000aec 26 func ,g * 00000aee 26 func ,g *
_R_UART1_Stop _R_UART1_Stop
00000b12 1e func ,g * 00000b14 1e func ,g *
_R_UART1_Receive _R_UART1_Receive
00000b30 18 func ,g * 00000b32 18 func ,g *
_R_UART1_Send _R_UART1_Send
00000b48 26 func ,g * 00000b4a 26 func ,g *
_R_IICA0_Create _R_IICA0_Create
00000b6e 50 func ,g * 00000b70 50 func ,g *
_R_IICA0_Stop _R_IICA0_Stop
00000bbe 5 func ,g * 00000bc0 5 func ,g *
_R_IICA0_StopCondition _R_IICA0_StopCondition
00000bc3 5 func ,g * 00000bc5 5 func ,g *
_R_IICA0_Master_Send _R_IICA0_Master_Send
00000bc8 3f func ,g * 00000bca 3f func ,g *
_R_IICA0_Master_Receive _R_IICA0_Master_Receive
00000c07 43 func ,g * 00000c09 43 func ,g *
FILE=DefaultBuild\r_cg_serial_user.obj FILE=DefaultBuild\r_cg_serial_user.obj
00000c4a 00000d06 bd 00000c4c 00000d08 bd
_r_uart0_callback_receiveend@1 _r_uart0_callback_receiveend@1
00000c4a 1 func ,l * 00000c4c 1 func ,l *
_r_uart0_callback_softwareoverrun@1 _r_uart0_callback_softwareoverrun@1
00000c4b 1 func ,l * 00000c4d 1 func ,l *
_r_uart0_callback_sendend@1 _r_uart0_callback_sendend@1
00000c4c 5 func ,l * 00000c4e 5 func ,l *
_r_uart0_callback_error@1 _r_uart0_callback_error@1
00000c51 1 func ,l * 00000c53 1 func ,l *
_r_uart1_callback_receiveend@1 _r_uart1_callback_receiveend@1
00000c52 2e func ,l * 00000c54 2e func ,l *
_r_uart1_callback_softwareoverrun@1 _r_uart1_callback_softwareoverrun@1
00000c80 1 func ,l * 00000c82 1 func ,l *
_r_uart1_callback_sendend@1 _r_uart1_callback_sendend@1
00000c81 1 func ,l * 00000c83 1 func ,l *
_r_uart1_callback_error@1 _r_uart1_callback_error@1
00000c82 1 func ,l * 00000c84 1 func ,l *
_iica0_masterhandler@1 _iica0_masterhandler@1
00000c83 84 func ,l * 00000c85 84 func ,l *
FILE=DefaultBuild\r_cg_wdt.obj FILE=DefaultBuild\r_cg_wdt.obj
00000d07 00000d1a 14 00000d09 00000d1c 14
_R_WDT_Create _R_WDT_Create
00000d07 10 func ,g * 00000d09 10 func ,g *
_R_WDT_Restart _R_WDT_Restart
00000d17 4 func ,g * 00000d19 4 func ,g *
FILE=DefaultBuild\r_cg_adc.obj FILE=DefaultBuild\r_cg_adc.obj
00000d1b 00000dce b4 00000d1d 00000dd0 b4
_R_ADC_Create _R_ADC_Create
00000d1b 91 func ,g * 00000d1d 91 func ,g *
_R_ADC_Start _R_ADC_Start
00000dac a func ,g * 00000dae a func ,g *
_R_ADC_Stop _R_ADC_Stop
00000db6 a func ,g * 00000db8 a func ,g *
_R_ADC_Set_OperationOn _R_ADC_Set_OperationOn
00000dc0 4 func ,g * 00000dc2 4 func ,g *
_R_ADC_Set_OperationOff _R_ADC_Set_OperationOff
00000dc4 4 func ,g * 00000dc6 4 func ,g *
_R_ADC_Get_Result _R_ADC_Get_Result
00000dc8 7 func ,g * 00000dca 7 func ,g *
FILE=DefaultBuild\r_cg_port.obj FILE=DefaultBuild\r_cg_port.obj
00000dcf 00000dd5 7 00000dd1 00000dd7 7
_R_PORT_Create _R_PORT_Create
00000dcf 7 func ,g * 00000dd1 7 func ,g *
FILE=DefaultBuild\anaout.obj FILE=DefaultBuild\anaout.obj
00000dd6 00000ebb e6 00000dd8 00000e3a 63
_ANAOUT_AllLow _ANAOUT_Set
00000dd6 10 func ,g * 00000dd8 2b func ,g *
_ANAOUT_Init _ANAOUT_AllOff
00000de6 1e func ,g * 00000e03 11 func ,g *
_ANAOUT_Select _ANAOUT_Select
00000e04 b8 func ,g * 00000e14 15 func ,g *
_anaout_pin
00000e29 10 func ,g *
_anaout_all_off
00000e39 2 func ,g *
FILE=DefaultBuild\owi.obj FILE=DefaultBuild\owi.obj
00000ebc 00001626 76b 00000e3b 000015a5 76b
_OWI_EnablePower _OWI_EnablePower
00000ebc 4 func ,g * 00000e3b 4 func ,g *
_OWI_DisablePower _OWI_DisablePower
00000ec0 3 func ,g * 00000e3f 3 func ,g *
_GPIO_Clear _GPIO_Clear
00000ec3 b func ,g * 00000e42 b func ,g *
_GPIO_Input _GPIO_Input
00000ece 7 func ,g * 00000e4d 7 func ,g *
_GPIO_Read _GPIO_Read
00000ed5 6 func ,g * 00000e54 6 func ,g *
_OWI_Init _OWI_Init
00000edb f func ,g * 00000e5a f func ,g *
_OWI_Start _OWI_Start
00000eea 16 func ,g * 00000e69 16 func ,g *
_OWI_Stop _OWI_Stop
00000f00 15 func ,g * 00000e7f 15 func ,g *
_OWI_SecureStop _OWI_SecureStop
00000f15 46 func ,g * 00000e94 46 func ,g *
_OWI_WriteBit _OWI_WriteBit
00000f5b 3a func ,g * 00000eda 3a func ,g *
_OWI_WriteByte _OWI_WriteByte
00000f95 32 func ,g * 00000f14 32 func ,g *
_OWI_ReadBit _OWI_ReadBit
00000fc7 50 func ,g * 00000f46 50 func ,g *
_OWI_ReadByte _OWI_ReadByte
00001017 34 func ,g * 00000f96 34 func ,g *
_OWI_T_ReadBytesAndPrint _OWI_T_ReadBytesAndPrint
0000104b c8 func ,g * 00000fca c8 func ,g *
_OWI_A_CommandMode _OWI_A_CommandMode
00001113 26c func ,g * 00001092 26c func ,g *
_OWI_Diagnostic _OWI_Diagnostic
0000137f 102 func ,g * 000012fe 102 func ,g *
_OWI_disable _OWI_disable
00001481 9 func ,g * 00001400 9 func ,g *
_OWI_T_CommandMode _OWI_T_CommandMode
0000148a 4f func ,g * 00001409 4f func ,g *
_OWI_CommandMode _OWI_CommandMode
000014d9 40 func ,g * 00001458 40 func ,g *
_OWI_ReadBytesAndPrint _OWI_ReadBytesAndPrint
00001519 10e func ,g * 00001498 10e func ,g *
FILE=DefaultBuild\i2c.obj FILE=DefaultBuild\i2c.obj
00001627 00001ac8 4a2 000015a6 00001a47 4a2
_disable _disable
00001627 19 func ,g * 000015a6 19 func ,g *
_I2C_EnablePower _I2C_EnablePower
00001640 4 func ,g * 000015bf 4 func ,g *
_I2C_DisablePower _I2C_DisablePower
00001644 3 func ,g * 000015c3 3 func ,g *
_I2C_A_Command_Mode_receiveData _I2C_A_Command_Mode_receiveData
00001647 213 func ,g * 000015c6 213 func ,g *
_I2C_Diagnostic _I2C_Diagnostic
0000185a e4 func ,g * 000017d9 e4 func ,g *
_I2C_T_Command_Mode_receiveData _I2C_T_Command_Mode_receiveData
0000193e 37 func ,g * 000018bd 37 func ,g *
_I2C_Command_Mode_receiveData _I2C_Command_Mode_receiveData
00001975 26 func ,g * 000018f4 26 func ,g *
_I2C_Command_Mode_Send _I2C_Command_Mode_Send
0000199b 12e func ,g * 0000191a 12e func ,g *
FILE=DefaultBuild\uart.obj FILE=DefaultBuild\uart.obj
00001ac9 00001c22 15a 00001a48 00001ba1 15a
_rs485_set_tx _rs485_set_tx
00001ac9 b func ,g * 00001a48 b func ,g *
_rs485_init _rs485_init
00001ad4 a func ,g * 00001a53 a func ,g *
_uart_send_string _uart_send_string
00001ade 22 func ,g * 00001a5d 22 func ,g *
_uart1_send_string _uart1_send_string
00001b00 10 func ,g * 00001a7f 10 func ,g *
_uart_send_hex _uart_send_hex
00001b10 50 func ,g * 00001a8f 50 func ,g *
_uart1_send_hex _uart1_send_hex
00001b60 4c func ,g * 00001adf 4c func ,g *
_ADC_ReadAndSend_UART _ADC_ReadAndSend_UART
00001bac 77 func ,g * 00001b2b 77 func ,g *
FILE=DefaultBuild\delay.obj FILE=DefaultBuild\delay.obj
00001c23 00001cda b8 00001ba2 00001c59 b8
_delay _delay
00001c23 16 func ,g * 00001ba2 16 func ,g *
_delay_us _delay_us
00001c39 7d func ,g * 00001bb8 7d func ,g *
_delay_ms _delay_ms
00001cb6 25 func ,g * 00001c35 25 func ,g *
FILE=DefaultBuild\dipSwitch.obj FILE=DefaultBuild\dipSwitch.obj
00001cdb 00001cf0 16 00001c5a 00001c6f 16
_DipSwitch_Init _DipSwitch_Init
00001cdb 8 func ,g * 00001c5a 8 func ,g *
_DipSwitch_ReadValue_0to31 _DipSwitch_ReadValue_0to31
00001ce3 9 func ,g * 00001c62 9 func ,g *
_DipSwitch_ReadAddr_1to32 _DipSwitch_ReadAddr_1to32
00001cec 5 func ,g * 00001c6b 5 func ,g *
FILE=DefaultBuild\gatectrl.obj
00001c70 00001ce5 76
_write_port@1
00001c70 d func ,l *
_GateCtrl_Init
00001c7d 28 func ,g *
_GateCtrl_SetAll
00001ca5 8 func ,g *
_GateCtrl_SetZacwire
00001cad 8 func ,g *
_GateCtrl_ClearChannelPins
00001cb5 c func ,g *
_GateCtrl_SelectChannel
00001cc1 d func ,g *
_GateCtrl_Anaout
00001cce 8 func ,g *
_GateCtrl_Hash
00001cd6 8 func ,g *
_GateCtrl_Check
00001cde 8 func ,g *
FILE=DefaultBuild\hash_pin.obj
00001ce6 00001dd8 f3
_hash_write_port@1
00001ce6 d func ,l *
_hash_set_output_pm@1
00001cf3 7 func ,l *
_hash_init
00001cfa 47 func ,g *
_hash_all_off
00001d41 10 func ,g *
_hash_pin
00001d51 88 func ,g *
FILE=DefaultBuild\check_pin.obj
00001dd9 00001ecd f5
_write_port@1
00001dd9 d func ,l *
_set_output_pm@1
00001de6 7 func ,l *
_check_pin_init
00001ded 38 func ,g *
_check_all_off
00001e25 16 func ,g *
_check_pin
00001e3b 93 func ,g *
SECTION=.const SECTION=.const
FILE=DefaultBuild\r_main.obj FILE=DefaultBuild\r_main.obj
00003000 00003145 146 00003000 00003145 146
FILE=DefaultBuild\anaout.obj
00003146 00003184 3f
_s_port@1
00003146 2a data ,l *
_s_mask@2
00003170 15 data ,l *
FILE=DefaultBuild\owi.obj FILE=DefaultBuild\owi.obj
00003146 000031ff ba 00003186 0000323f ba
FILE=DefaultBuild\i2c.obj FILE=DefaultBuild\i2c.obj
00003200 00003356 157 00003240 00003396 157
FILE=DefaultBuild\uart.obj FILE=DefaultBuild\uart.obj
00003358 0000335b 4 00003398 0000339b 4
_ADC_CHANNELS@1@ADC_ReadAndSend_UART _ADC_CHANNELS@1@ADC_ReadAndSend_UART
00003358 4 data ,l * 00003398 4 data ,l *
FILE=DefaultBuild\hash_pin.obj
0000339c 000033d7 3c
FILE=DefaultBuild\check_pin.obj
000033d8 00003413 3c
SECTION=.SLIB SECTION=.SLIB
FILE=_COM_faddsub FILE=_COM_faddsub
0000335c 00003496 13b 00003414 0000354e 13b
__COM_fsub __COM_fsub
000033b8 0 none ,g * 00003470 0 none ,g *
__COM_fadd __COM_fadd
000033c0 0 none ,g * 00003478 0 none ,g *
FILE=_COM_fdiv FILE=_COM_fdiv
00003497 000035c4 12e 0000354f 0000367c 12e
__COM_fdiv __COM_fdiv
000034f6 0 none ,g * 000035ae 0 none ,g *
FILE=_COM_fmul FILE=_COM_fmul
000035c5 000036b1 ed 0000367d 00003769 ed
__COM_fmul __COM_fmul
00003610 0 none ,g * 000036c8 0 none ,g *
FILE=_COM_ftoul FILE=_COM_ftoul
000036b2 000036bd c 0000376a 00003775 c
__COM_ftoul __COM_ftoul
000036b2 0 none ,g * 0000376a 0 none ,g *
FILE=_COM_ultof FILE=_COM_ultof
000036be 000036c3 6 00003776 0000377b 6
__COM_ultof __COM_ultof
000036be 0 none ,g * 00003776 0 none ,g *
FILE=isdigit FILE=isdigit
000036c4 000036cd a 0000377c 00003785 a
_isdigit _isdigit
000036c4 0 none ,g * 0000377c 0 none ,g *
FILE=memcpy FILE=memcpy
000036ce 000036dd 10 00003786 00003795 10
_memcpy _memcpy
000036ce 0 none ,g * 00003786 0 none ,g *
FILE=memset FILE=memset
000036de 000036eb e 00003796 000037a3 e
_memset _memset
000036de 0 none ,g * 00003796 0 none ,g *
FILE=sprintf FILE=sprintf
000036ec 000037e4 f9 000037a4 0000389c f9
_sprintf _sprintf
000036ec e1 func ,g * 000037a4 e1 func ,g *
__REL_sp@1 __REL_sp@1
000037cd 18 func ,l * 00003885 18 func ,l *
FILE=strcpy FILE=strcpy
000037e5 000037f1 d 0000389d 000038a9 d
_strcpy _strcpy
000037e5 0 none ,g * 0000389d 0 none ,g *
FILE=toupper FILE=toupper
000037f2 000037ff e 000038aa 000038b7 e
_toupper _toupper
000037f2 0 none ,g * 000038aa 0 none ,g *
FILE=_REL_f_inf FILE=_REL_f_inf
00003800 00003807 8 000038b8 000038bf 8
__REL_f_inf __REL_f_inf
00003800 0 none ,g * 000038b8 0 none ,g *
FILE=_REL_f_norm FILE=_REL_f_norm
00003808 00003817 10 000038c0 000038cf 10
__REL_f_norm __REL_f_norm
00003808 0 none ,g * 000038c0 0 none ,g *
FILE=_REL_f_round FILE=_REL_f_round
00003818 0000382a 13 000038d0 000038e2 13
__REL_f_round __REL_f_round
00003818 0 none ,g * 000038d0 0 none ,g *
FILE=_REL_ftol FILE=_REL_ftol
0000382b 0000385f 35 000038e3 00003917 35
__REL_ftol __REL_ftol
0000382b 0 none ,g * 000038e3 0 none ,g *
FILE=_REL_ltof FILE=_REL_ltof
00003860 000038a9 4a 00003918 00003961 4a
__REL_ltof __REL_ltof
00003860 0 none ,g * 00003918 0 none ,g *
FILE=_REL_print FILE=_REL_print
000038aa 00005801 1f58 00003962 000058b9 1f58
__REL_print __REL_print
000038aa 1046 func ,g * 00003962 1046 func ,g *
__REL_fltprn@1 __REL_fltprn@1
000048f0 941 func ,l * 000049a8 941 func ,l *
__REL_henkan1@1 __REL_henkan1@1
00005231 28 func ,l * 000052e9 28 func ,l *
__REL_henkan2@1 __REL_henkan2@1
00005259 33 func ,l * 00005311 33 func ,l *
__REL_pri@1 __REL_pri@1
0000528c 298 func ,l * 00005344 298 func ,l *
__REL_fltgeti@1 __REL_fltgeti@1
00005524 19d func ,l * 000055dc 19d func ,l *
__REL_inmod@1 __REL_inmod@1
000056c1 141 func ,l * 00005779 141 func ,l *
FILE=_COM_feq FILE=_COM_feq
00005802 00005817 16 000058ba 000058cf 16
__COM_feq __COM_feq
00005802 0 none ,g * 000058ba 0 none ,g *
FILE=_COM_fge FILE=_COM_fge
00005818 0000582d 16 000058d0 000058e5 16
__COM_fge __COM_fge
00005818 0 none ,g * 000058d0 0 none ,g *
FILE=_COM_flt FILE=_COM_flt
0000582e 00005843 16 000058e6 000058fb 16
__COM_flt __COM_flt
0000582e 0 none ,g * 000058e6 0 none ,g *
FILE=_COM_fne FILE=_COM_fne
00005844 00005854 11 000058fc 0000590c 11
__COM_fne __COM_fne
00005844 0 none ,g * 000058fc 0 none ,g *
FILE=_COM_ftosl FILE=_COM_ftosl
00005855 0000585c 8 0000590d 00005914 8
__COM_ftosl __COM_ftosl
00005855 0 none ,g * 0000590d 0 none ,g *
FILE=_COM_lshr FILE=_COM_lshr
0000585d 0000587d 21 00005915 00005935 21
__COM_lshr __COM_lshr
00005867 0 none ,g * 0000591f 0 none ,g *
FILE=_COM_sidiv FILE=_COM_sidiv
0000587e 0000589f 22 00005936 00005957 22
__COM_sidiv __COM_sidiv
00005880 0 none ,g * 00005938 0 none ,g *
FILE=_COM_sirem FILE=_COM_sirem
000058a0 000058bf 20 00005958 00005977 20
__COM_sirem __COM_sirem
000058a0 0 none ,g * 00005958 0 none ,g *
FILE=_COM_ulldiv FILE=_COM_ulldiv
000058c0 000058e9 2a 00005978 000059a1 2a
__COM_ulldiv __COM_ulldiv
000058c0 0 none ,g * 00005978 0 none ,g *
FILE=_COM_ullrem FILE=_COM_ullrem
000058ea 0000591a 31 000059a2 000059d2 31
__COM_ullrem __COM_ullrem
000058ea 0 none ,g * 000059a2 0 none ,g *
FILE=_REL_fcmp FILE=_REL_fcmp
0000591b 00005952 38 000059d3 00005a0a 38
__REL_fcmp __REL_fcmp
0000591b 0 none ,g * 000059d3 0 none ,g *
FILE=_REL_fordered_core FILE=_REL_fordered_core
00005953 0000596e 1c 00005a0b 00005a26 1c
__REL_fordered_core __REL_fordered_core
00005953 0 none ,g * 00005a0b 0 none ,g *
FILE=_REL_lldiv FILE=_REL_lldiv
0000596f 00005b74 206 00005a27 00005c2c 206
__REL_lldiv __REL_lldiv
0000598b 0 none ,g * 00005a43 0 none ,g *
FILE=_REL_llrem FILE=_REL_llrem
00005b75 00005d78 204 00005c2d 00005e30 204
__REL_llrem __REL_llrem
00005b92 0 none ,g * 00005c4a 0 none ,g *
FILE=_REL_ltosl FILE=_REL_ltosl
00005d79 00005d9d 25 00005e31 00005e55 25
__REL_ltosl __REL_ltosl
00005d79 0 none ,g * 00005e31 0 none ,g *
SECTION=.bss SECTION=.bss
FILE=DefaultBuild\r_cg_serial.obj FILE=DefaultBuild\r_cg_serial.obj
@ -593,21 +656,31 @@ FILE=DefaultBuild\uart.obj
000fb010 10 data ,g * 000fb010 10 data ,g *
_g_adc_len _g_adc_len
000fb020 1 data ,g * 000fb020 1 data ,g *
FILE=DefaultBuild\gatectrl.obj
000fb022 000fb022 1
_s_ch@1
000fb022 1 data ,l *
Absolute value symbols Absolute value symbols
FILE=DefaultBuild\hash_pin.obj
@$IMM_28
00000028 0 none ,l *
FILE=DefaultBuild\check_pin.obj
@$IMM_28
00000028 0 none ,l *
FILE=rlink_generates_04 FILE=rlink_generates_04
__s.text __s.text
0000014b 0 none ,g * 0000014d 0 none ,g *
__e.text __e.text
000002fe 0 none ,g * 00000300 0 none ,g *
__s.textf __s.textf
000002fe 0 none ,g * 00000300 0 none ,g *
__e.textf __e.textf
00001cf1 0 none ,g * 00001ece 0 none ,g *
__s.const __s.const
00003000 0 none ,g * 00003000 0 none ,g *
__e.const __e.const
0000335c 0 none ,g * 00003414 0 none ,g *
__s.constf __s.constf
00000080 0 none ,g * 00000080 0 none ,g *
__e.constf __e.constf
@ -615,7 +688,7 @@ FILE=rlink_generates_04
__s.data __s.data
000000ce 0 none ,g * 000000ce 0 none ,g *
__e.data __e.data
0000014b 0 none ,g * 0000014d 0 none ,g *
__s.sdata __s.sdata
00000080 0 none ,g * 00000080 0 none ,g *
__e.sdata __e.sdata
@ -631,7 +704,7 @@ FILE=rlink_generates_04
__s.dataR __s.dataR
000fafa4 0 none ,g * 000fafa4 0 none ,g *
__e.dataR __e.dataR
000fb021 0 none ,g * 000fb023 0 none ,g *
__s.sdataR __s.sdataR
000ffe20 0 none ,g * 000ffe20 0 none ,g *
__e.sdataR __e.sdataR
@ -645,9 +718,9 @@ FILE=rlink_generates_04
__e.RLIB __e.RLIB
000000c4 0 none ,g * 000000c4 0 none ,g *
__s.SLIB __s.SLIB
0000335c 0 none ,g * 00003414 0 none ,g *
__e.SLIB __e.SLIB
00005d9e 0 none ,g * 00005e56 0 none ,g *
__s.option_byte __s.option_byte
000000c0 0 none ,g * 000000c0 0 none ,g *
__e.option_byte __e.option_byte
@ -667,7 +740,7 @@ FILE=rlink_generates_04
__STACK_ADDR_START __STACK_ADDR_START
000ffe20 0 none ,g * 000ffe20 0 none ,g *
__STACK_ADDR_END __STACK_ADDR_END
000fb022 0 none ,g * 000fb024 0 none ,g *
*** Unfilled Areas *** *** Unfilled Areas ***

2361
DefaultBuild/multical.mot

File diff suppressed because it is too large

BIN
DefaultBuild/r_main.obj

Binary file not shown.

37
QualityReport(multical,DefaultBuild).txt

@ -1,30 +1,28 @@
QualityReport QualityReport
2026년 1월 14일 수요일 오전 10:30:44 2026년 1월 14일 수요일 오후 6:55:13
------ Start build(multical, DefaultBuild) ------ ------ Start build(multical, DefaultBuild) ------
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\Bin\ccrl.exe r_main.c -cpu=S3 -o DefaultBuild\r_main.obj "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF" -g -g_line -I "..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1" -I ..\IDH1.1 -I . -c -msg_lang=english C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\Bin\ccrl.exe r_main.c -cpu=S3 -o DefaultBuild\r_main.obj "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF" -g -g_line -I "..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1" -I ..\IDH1.1 -I . -c -msg_lang=english
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\Bin\ccrl.exe dipSwitch.c -cpu=S3 -o DefaultBuild\dipSwitch.obj "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF" -g -g_line -I "..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1" -I ..\IDH1.1 -I . -c -msg_lang=english C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\Bin\ccrl.exe anaout.c -cpu=S3 -o DefaultBuild\anaout.obj "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF" -g -g_line -I "..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1" -I ..\IDH1.1 -I . -c -msg_lang=english
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\Bin\ccrl.exe gatectrl.c -cpu=S3 -o DefaultBuild\gatectrl.obj "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF" -g -g_line -I "..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1" -I ..\IDH1.1 -I . -c -msg_lang=english
W0511106:The folder "..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1" specified by the "-I" option is not found. W0511106:The folder "..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1" specified by the "-I" option is not found.
W0511106:The folder "..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1" specified by the "-I" option is not found. W0511106:The folder "..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1" specified by the "-I" option is not found.
W0511106:The folder "..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1" specified by the "-I" option is not found.
W0511106:The folder "..\IDH1.1" specified by the "-I" option is not found.
W0511106:The folder "..\IDH1.1" specified by the "-I" option is not found. W0511106:The folder "..\IDH1.1" specified by the "-I" option is not found.
W0511106:The folder "..\IDH1.1" specified by the "-I" option is not found. W0511106:The folder "..\IDH1.1" specified by the "-I" option is not found.
W0511186:The evaluation period for the option "-Odefault" of CC-RL V1 is valid for the remaining 60 days. After that, it will be implicitly changed to "-Olite". Please consider purchasing the product to continue using "-Odefault". W0511186:The evaluation period for the option "-Odefault" of CC-RL V1 is valid for the remaining 60 days. After that, it will be implicitly changed to "-Olite". Please consider purchasing the product to continue using "-Odefault".
W0511186:The evaluation period for the option "-Odefault" of CC-RL V1 is valid for the remaining 60 days. After that, it will be implicitly changed to "-Olite". Please consider purchasing the product to continue using "-Odefault". W0511186:The evaluation period for the option "-Odefault" of CC-RL V1 is valid for the remaining 60 days. After that, it will be implicitly changed to "-Olite". Please consider purchasing the product to continue using "-Odefault".
W0511186:The evaluation period for the option "-Odefault" of CC-RL V1 is valid for the remaining 60 days. After that, it will be implicitly changed to "-Olite". Please consider purchasing the product to continue using "-Odefault".
owi.h(47):W0523076:Function declarations should have prototype owi.h(47):W0523076:Function declarations should have prototype
i2c.h(8):W0520047:Incompatible redefinition of macro "RAM_BYTES" (declared at line 11 of "uart.h") i2c.h(8):W0520047:Incompatible redefinition of macro "RAM_BYTES" (declared at line 11 of "uart.h")
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\inc\stdint.h(18):W0520301:Typedef name has already been declared (with same type) r_main.c(116):W0520172:External/internal linkage conflict with previous declaration
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\inc\stdint.h(19):W0520301:Typedef name has already been declared (with same type) r_main.c(134):W0523077:Called function should have prototype
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\inc\stdint.h(20):W0520301:Typedef name has already been declared (with same type)
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\inc\stdint.h(25):W0520301:Typedef name has already been declared (with same type)
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\inc\stdint.h(26):W0520301:Typedef name has already been declared (with same type)
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\inc\stdint.h(27):W0520301:Typedef name has already been declared (with same type)
r_main.c(115):W0520172:External/internal linkage conflict with previous declaration
r_main.c(133):W0523077:Called function should have prototype
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\Bin\rlink.exe -subcommand=DefaultBuild\multical.clnk C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.15.00\Bin\rlink.exe -subcommand=DefaultBuild\multical.clnk
W0561018:The evaluation period of CC-RL V1 is valid for the remaining 60 days. After that, functional limit will be applied. Please consider purchasing the product. W0561018:The evaluation period of CC-RL V1 is valid for the remaining 60 days. After that, functional limit will be applied. Please consider purchasing the product.
W0561018:The evaluation period of CC-RL V1 is valid for the remaining 60 days. After that, functional limit will be applied. Please consider purchasing the product. W0561018:The evaluation period of CC-RL V1 is valid for the remaining 60 days. After that, functional limit will be applied. Please consider purchasing the product.
Renesas Optimizing Linker Completed Renesas Optimizing Linker Completed
------ Build ended(Error:0, Warning:18)(multical, DefaultBuild) ------ ------ Build ended(Error:0, Warning:15)(multical, DefaultBuild) ------
--- CommandFile 1 --- --- CommandFile 1 ---
DefaultBuild\multical.clnk : DefaultBuild\multical.clnk :
@ -48,6 +46,9 @@ DefaultBuild\multical.clnk :
-Input=DefaultBuild\uart.obj -Input=DefaultBuild\uart.obj
-Input=DefaultBuild\delay.obj -Input=DefaultBuild\delay.obj
-Input=DefaultBuild\dipSwitch.obj -Input=DefaultBuild\dipSwitch.obj
-Input=DefaultBuild\gatectrl.obj
-Input=DefaultBuild\hash_pin.obj
-Input=DefaultBuild\check_pin.obj
-SECURITY_ID=00000000000000000000 -SECURITY_ID=00000000000000000000
-DEVICE=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF -DEVICE=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10PPJ.DVF
-DEBug -DEBug
@ -75,8 +76,8 @@ DefaultBuild\multical.clnk :
--- SHA1 hash value of output files --- --- SHA1 hash value of output files ---
C:\Users\COMPUTER1\OneDrive\문서\카카오톡 받은 파일\Amosense_Firmware\Amosense_Firmware\DefaultBuild\multical.abs: 02573826f641eca7df73ff054c8e823c4d5b11c4 C:\Users\COMPUTER1\OneDrive\Desktop\Amosense_Firmware1\DefaultBuild\multical.abs: 55c523f42c5f81fb6f95882f964b7fad1ba0b973
C:\Users\COMPUTER1\OneDrive\문서\카카오톡 받은 파일\Amosense_Firmware\Amosense_Firmware\DefaultBuild\multical.mot: c95d0bc8130fb9e402da42eee0be70f0ce6eca3e C:\Users\COMPUTER1\OneDrive\Desktop\Amosense_Firmware1\DefaultBuild\multical.mot: 44476140b1f3400e9c301d09ba0adf83ed9d2e12
--- System Information --- --- System Information ---
@ -104,13 +105,13 @@ C:\Users\COMPUTER1\OneDrive\문서\카카오톡 받은 파일\Amosense_Firmware\
C:\Program Files (x86)\Renesas Electronics\CS+\CC C:\Program Files (x86)\Renesas Electronics\CS+\CC
*Memory Usage *Memory Usage
*Private Working Set *Private Working Set
295 MB 328 MB
*Number of GDI Objects *Number of GDI Objects
2228 2472
*Number of USER Objects *Number of USER Objects
1638 1497
*Opened Files *Opened Files
3 editors, 3 files, 16 KB 14 editors, 14 files, 39 KB
--- Build Tool Plug-in Information --- --- Build Tool Plug-in Information ---
RH850 Build tool CC-RH Plug-in RH850 Build tool CC-RH Plug-in
@ -246,7 +247,7 @@ Device Information Common Interface
DeviceInformation.dll DeviceInformation.dll
--- Main Project Information --- --- Main Project Information ---
C:\Users\COMPUTER1\OneDrive\문서\카카오톡 받은 파일\Amosense_Firmware\Amosense_Firmware\multical.mtpj C:\Users\COMPUTER1\OneDrive\Desktop\Amosense_Firmware1\multical.mtpj
Microcontroller Information Microcontroller Information
*R5F10PPJ *R5F10PPJ
*File Name: Version *File Name: Version

144
anaout.c

@ -1,110 +1,70 @@
#include "anaout.h" #include "anaout.h"
// -------------------------------------------------------
// Helper macros
// -------------------------------------------------------
#define BIT(n) (1u << (n)) #define BIT(n) (1u << (n))
// ------------------------------------------------------- static void write_port(volatile uint8_t *port, uint8_t mask, uint8_t on)
// ANAOUT mapping (사용자 제공 기준) {
// ANAOUT_1 : P64 -> P6.4 if (on) *port |= mask;
// ANAOUT_2 : P65 -> P6.5 else *port &= (uint8_t)~mask;
// ANAOUT_3 : P66 -> P6.6 }
// ANAOUT_4 : P67 -> P6.7
// /* ?? -> (?? ??, ???) ??? */
// ANAOUT_5 : P44 -> P4.4 static volatile uint8_t * const s_port[21] = {
// ANAOUT_6 : P43 -> P4.3 0,
// ANAOUT_7 : P42 -> P4.2 &P6, &P6, &P6, &P6, // 1~4
// ANAOUT_8 : P41 -> P4.1 &P4, &P4, &P4, &P4, // 5~8
// &P5, &P5, &P5, // 9~11
// ANAOUT_9 : P50 -> P5.0 &P6, &P6, // 12~13
// ANAOUT_10 : P51 -> P5.1 &P7, &P7, &P7, &P7, &P7, &P7, // 14~19
// ANAOUT_11 : P52 -> P5.2 &P13 // 20
// };
// ANAOUT_12 : P60 -> P6.0
// ANAOUT_13 : P61 -> P6.1
//
// ANAOUT_14 : P72 -> P7.2
// ANAOUT_15 : P73 -> P7.3
// ANAOUT_16 : P75 -> P7.5
// ANAOUT_17 : P74 -> P7.4
// ANAOUT_18 : P76 -> P7.6
// ANAOUT_19 : P77 -> P7.7
//
// ANAOUT_20 : P130 -> P13.0
// -------------------------------------------------------
// 그룹별 마스크(빠른 AllLow/Init용) static const uint8_t s_mask[21] = {
#define P4_ANA_MASK (BIT(4) | BIT(3) | BIT(2) | BIT(1)) // P4.4~P4.1 0,
#define P5_ANA_MASK (BIT(0) | BIT(1) | BIT(2)) // P5.0~P5.2 (uint8_t)BIT(4), (uint8_t)BIT(5), (uint8_t)BIT(6), (uint8_t)BIT(7), // P64~P67
#define P6_ANA_MASK (BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(1) | BIT(0)) // P6.7~P6.4 + P6.1~P6.0 (uint8_t)BIT(4), (uint8_t)BIT(3), (uint8_t)BIT(2), (uint8_t)BIT(1), // P44,P43,P42,P41
#define P7_ANA_MASK (BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)) // P7.7~P7.2 (uint8_t)BIT(0), (uint8_t)BIT(1), (uint8_t)BIT(2), // P50,P51,P52
#define P13_ANA_MASK (BIT(0)) // P13.0 (uint8_t)BIT(0), (uint8_t)BIT(1), // P60,P61
(uint8_t)BIT(2), (uint8_t)BIT(3), (uint8_t)BIT(5), (uint8_t)BIT(4), (uint8_t)BIT(6), (uint8_t)BIT(7), // P72~P77
(uint8_t)BIT(0) // P130
};
void ANAOUT_AllLow(void) void ANAOUT_Set(uint8_t ch, uint8_t on)
{ {
// 해당 비트만 LOW로 내림 if (ch < 1 || ch > 20) return;
P4 &= (uint8_t)~(uint8_t)P4_ANA_MASK; write_port(s_port[ch], s_mask[ch], on);
P5 &= (uint8_t)~(uint8_t)P5_ANA_MASK;
P6 &= (uint8_t)~(uint8_t)P6_ANA_MASK;
P7 &= (uint8_t)~(uint8_t)P7_ANA_MASK;
P13 &= (uint8_t)~(uint8_t)P13_ANA_MASK;
} }
void ANAOUT_Init(void) void ANAOUT_AllOff(void)
{ {
// 출력 설정: PM bit = 0 이 출력 uint8_t ch;
PM4 &= (uint8_t)~(uint8_t)P4_ANA_MASK; for (ch = 1; ch <= 20; ch++)
PM5 &= (uint8_t)~(uint8_t)P5_ANA_MASK; {
PM6 &= (uint8_t)~(uint8_t)P6_ANA_MASK; ANAOUT_Set(ch, 0);
PM7 &= (uint8_t)~(uint8_t)P7_ANA_MASK; }
// 초기 상태: 전부 LOW
ANAOUT_AllLow();
} }
void ANAOUT_Select(uint8_t ch) void ANAOUT_Select(uint8_t ch)
{ {
if (ch < ANAOUT_CH_MIN || ch > ANAOUT_CH_MAX) { if (ch < 1 || ch > 20) return;
ANAOUT_AllLow(); ANAOUT_AllOff();
return; ANAOUT_Set(ch, 1);
} }
ANAOUT_AllLow();
__nop(); __nop(); __nop(); __nop(); // break-before-make
// 2) 선택된 채널만 HIGH
switch (ch)
{
case 1: P6 |= (uint8_t)BIT(4); break; // P64
case 2: P6 |= (uint8_t)BIT(5); break; // P65
case 3: P6 |= (uint8_t)BIT(6); break; // P66
case 4: P6 |= (uint8_t)BIT(7); break; // P67
case 5: P4 |= (uint8_t)BIT(4); break; // P44
case 6: P4 |= (uint8_t)BIT(3); break; // P43
case 7: P4 |= (uint8_t)BIT(2); break; // P42
case 8: P4 |= (uint8_t)BIT(1); break; // P41
case 9: P5 |= (uint8_t)BIT(0); break; // P50
case 10: P5 |= (uint8_t)BIT(1); break; // P51
case 11: P5 |= (uint8_t)BIT(2); break; // P52
case 12: P6 |= (uint8_t)BIT(0); break; // P60
case 13: P6 |= (uint8_t)BIT(1); break; // P61
case 14: P7 |= (uint8_t)BIT(2); break; // P72
case 15: P7 |= (uint8_t)BIT(3); break; // P73
case 16: P7 |= (uint8_t)BIT(5); break; // P75
case 17: P7 |= (uint8_t)BIT(4); break; // P74
case 18: P7 |= (uint8_t)BIT(6); break; // P76
case 19: P7 |= (uint8_t)BIT(7); break; // P77
case 20: P13 |= (uint8_t)BIT(0); break; // P130 void anaout_pin(uint8_t ch, uint8_t on)
{
if (ch < 1 || ch > 20) return;
default: if (on) {
// 범위 밖이면 전체 LOW 유지 // on=1?? "??" ???? ??(??? 1?? ??)
break; ANAOUT_Select(ch);
} else {
// off? ?? ??? OFF
ANAOUT_Set(ch, 0);
} }
} }
void anaout_all_off(void)
{
ANAOUT_AllOff();
}

25
anaout.h

@ -3,13 +3,26 @@
#include "r_cg_macrodriver.h" #include "r_cg_macrodriver.h"
#include "r_cg_port.h" #include "r_cg_port.h"
#include <stdint.h>
#define ANAOUT_CH_MIN (1u) #ifdef __cplusplus
#define ANAOUT_CH_MAX (20u) extern "C" {
#endif
void ANAOUT_Set(uint8_t ch, uint8_t on);
/** 전체 채널 OFF */
void ANAOUT_AllOff(void);
void ANAOUT_Init(void); /** 채널 선택(= 전체 OFF 후 해당 채널 ON) */
void ANAOUT_AllLow(void); void ANAOUT_Select(uint8_t ch);
void ANAOUT_Select(uint8_t ch); // 1~20, 범위 밖이면 AllLow 처리
void anaout_pin(uint8_t ch, uint8_t on);
/** 전체 OFF wrapper */
void anaout_all_off(void);
#ifdef __cplusplus
}
#endif #endif
#endif /* ANAOUT_H */

79
check_pin.c

@ -0,0 +1,79 @@
#include "check_pin.h"
#define BIT(n) (1u << (n))
static void write_port(volatile uint8_t *port, uint8_t mask, uint8_t on)
{
if (on) *port |= mask;
else *port &= (uint8_t)~mask;
}
static void set_output_pm(volatile uint8_t *pm, uint8_t mask)
{
*pm &= (uint8_t)~mask;
}
void check_pin_init(void)
{
// CHECK_1,2,4 : P15.4,5,6
set_output_pm(&PM15, (uint8_t)(BIT(4)|BIT(5)|BIT(6)));
// CHECK_3,7 : P0.0,3
set_output_pm(&PM0, (uint8_t)(BIT(0)|BIT(3)));
// CHECK_5,6 : P3.0,2
set_output_pm(&PM3, (uint8_t)(BIT(0)|BIT(2)));
// CHECK_8,9 : P7.0,1
set_output_pm(&PM7, (uint8_t)(BIT(0)|BIT(1)));
// CHECK_10~13 : P10.4~7
set_output_pm(&PM10, (uint8_t)(BIT(4)|BIT(5)|BIT(6)|BIT(7)));
// CHECK_14~17 : P5.7,6,5,4
set_output_pm(&PM5, (uint8_t)(BIT(7)|BIT(6)|BIT(5)|BIT(4)));
// CHECK_18~20 : P1.0,3,4
set_output_pm(&PM1, (uint8_t)(BIT(0)|BIT(3)|BIT(4)));
check_all_off();
}
void check_all_off(void)
{
P15 &= (uint8_t)~(BIT(4)|BIT(5)|BIT(6));
P0 &= (uint8_t)~(BIT(0)|BIT(3));
P3 &= (uint8_t)~(BIT(0)|BIT(2));
P7 &= (uint8_t)~(BIT(0)|BIT(1));
P10 &= (uint8_t)~(BIT(4)|BIT(5)|BIT(6)|BIT(7));
P5 &= (uint8_t)~(BIT(4)|BIT(5)|BIT(6)|BIT(7));
P1 &= (uint8_t)~(BIT(0)|BIT(3)|BIT(4));
}
void check_pin(uint8_t ch, uint8_t on)
{
switch (ch)
{
case 1: write_port(&P15, BIT(4), on); break; // CHECK_1 : P154
case 2: write_port(&P15, BIT(5), on); break; // CHECK_2 : P155
case 3: write_port(&P0, BIT(0), on); break; // CHECK_3 : P00
case 4: write_port(&P15, BIT(6), on); break; // CHECK_4 : P156
case 5: write_port(&P3, BIT(0), on); break; // CHECK_5 : P30
case 6: write_port(&P3, BIT(2), on); break; // CHECK_6 : P32
case 7: write_port(&P0, BIT(3), on); break; // CHECK_7 : P03
case 8: write_port(&P7, BIT(0), on); break; // CHECK_8 : P70
case 9: write_port(&P7, BIT(1), on); break; // CHECK_9 : P71
case 10: write_port(&P10, BIT(4), on); break; // CHECK_10: P104
case 11: write_port(&P10, BIT(5), on); break; // CHECK_11: P105
case 12: write_port(&P10, BIT(6), on); break; // CHECK_12: P106
case 13: write_port(&P10, BIT(7), on); break; // CHECK_13: P107
case 14: write_port(&P5, BIT(7), on); break; // CHECK_14: P57
case 15: write_port(&P5, BIT(6), on); break; // CHECK_15: P56
case 16: write_port(&P5, BIT(5), on); break; // CHECK_16: P55
case 17: write_port(&P5, BIT(4), on); break; // CHECK_17: P54
case 18: write_port(&P1, BIT(0), on); break; // CHECK_18: P10
case 19: write_port(&P1, BIT(3), on); break; // CHECK_19: P13
case 20: write_port(&P1, BIT(4), on); break; // CHECK_20: P14
default: /* ignore */ break;
}
}

26
check_pin.h

@ -0,0 +1,26 @@
#ifndef CHECK_PIN_H
#define CHECK_PIN_H
#include "r_cg_macrodriver.h"
#include "r_cg_port.h"
#ifdef __cplusplus
extern "C" {
#endif
void check_pin_init(void);
/**
* (ch=1~20) CHECK on/off
* ) ch=2 -> CHECK_2(P155)
*/
void check_pin(uint8_t ch, uint8_t on);
/** (옵션) CHECK_1~CHECK_20 전체 OFF */
void check_all_off(void);
#ifdef __cplusplus
}
#endif
#endif /* CHECK_PIN_H */

78
gatectrl.c

@ -0,0 +1,78 @@
#include "gatectrl.h"
#define BIT(n) (1u << (n))
// 공통핀 매핑
// ALL : P47 -> Port4 bit7
// ZACWIRE : P157 -> Port15 bit7
#define ALL_PM PM4
#define ALL_MASK (uint8_t)BIT(7)
#define ZAC_PM PM15
#define ZAC_MASK (uint8_t)BIT(7)
static uint8_t s_ch = 1;
static void write_port(volatile uint8_t *port, uint8_t mask, uint8_t on)
{
if (on) *port |= mask;
else *port &= (uint8_t)~mask;
}
void GateCtrl_Init(void)
{
// 공통핀 출력 설정
ALL_PM &= (uint8_t)~ALL_MASK;
ZAC_PM &= (uint8_t)~ZAC_MASK;
// 기본 OFF
GateCtrl_SetAll(0);
GateCtrl_SetZacwire(0);
// 채널 관련 모듈 init
hash_init();
check_pin_init();
// ANAOUT_Init()는 main에서 한다면 여기서 중복 호출 X
}
void GateCtrl_SetAll(uint8_t on)
{
write_port(&P4, ALL_MASK, on);
}
void GateCtrl_SetZacwire(uint8_t on)
{
write_port(&P15, ZAC_MASK, on);
}
void GateCtrl_ClearChannelPins(void)
{
hash_all_off();
check_all_off();
anaout_all_off();
}
void GateCtrl_SelectChannel(uint8_t ch)
{
if (ch < 1 || ch > 20) return;
s_ch = ch;
GateCtrl_ClearChannelPins();
}
void GateCtrl_Anaout(uint8_t on)
{
anaout_pin(s_ch, on);
}
void GateCtrl_Hash(uint8_t on)
{
hash_pin(s_ch, on);
}
void GateCtrl_Check(uint8_t on)
{
check_pin(s_ch, on);
}

40
gatectrl.h

@ -0,0 +1,40 @@
#ifndef GATECTRL_H
#define GATECTRL_H
#include "r_cg_macrodriver.h"
#include "r_cg_port.h"
#include "anaout.h"
#include "hash_pin.h"
#include "check_pin.h"
#ifdef __cplusplus
extern "C" {
#endif
void GateCtrl_Init(void);
/** ???: ALL (P47) */
void GateCtrl_SetAll(uint8_t on);
/** ???: ZACWIRE (P157) */
void GateCtrl_SetZacwire(uint8_t on);
void GateCtrl_SelectChannel(uint8_t ch);
/** ?? ??? ??? ANAOUT ?? (?? ?? ???) */
void GateCtrl_Anaout(uint8_t on);
/** ?? ??? ??? #? ?? */
void GateCtrl_Hash(uint8_t on);
/** ?? ??? ??? CHECK? ?? */
void GateCtrl_Check(uint8_t on);
/** (??) #/CHECK ?? OFF */
void GateCtrl_ClearChannelPins(void);
#ifdef __cplusplus
}
#endif
#endif /* GATECTRL_H */

88
hash_pin.c

@ -0,0 +1,88 @@
#include "hash_pin.h"
#define BIT(n) (1u << (n))
static void hash_write_port(volatile uint8_t *port, uint8_t mask, uint8_t on)
{
if (on) *port |= mask;
else *port &= (uint8_t)~mask;
}
static void hash_set_output_pm(volatile uint8_t *pm, uint8_t mask)
{
*pm &= (uint8_t)~mask; // PM bit=0 -> output
}
void hash_init(void)
{
// #1~#4 : P15.3~P15.0
hash_set_output_pm(&PM15, (uint8_t)(BIT(0)|BIT(1)|BIT(2)|BIT(3)));
// #5 : P12.0
hash_set_output_pm(&PM12, (uint8_t)BIT(0));
// #6 : P12.5
hash_set_output_pm(&PM12, (uint8_t)BIT(5));
// #7 : P0.1
hash_set_output_pm(&PM0, (uint8_t)BIT(1));
// #8 : P12.6
hash_set_output_pm(&PM12, (uint8_t)BIT(6));
// #9 : P12.7
hash_set_output_pm(&PM12, (uint8_t)BIT(7));
// #10 : P0.2
hash_set_output_pm(&PM0, (uint8_t)BIT(2));
// #11~#14 : P10.3~P10.0
hash_set_output_pm(&PM10, (uint8_t)(BIT(0)|BIT(1)|BIT(2)|BIT(3)));
// #15~#20 : P9.7,6,5,4,3,2
hash_set_output_pm(&PM9, (uint8_t)(BIT(7)|BIT(6)|BIT(5)|BIT(4)|BIT(3)|BIT(2)));
hash_all_off();
}
void hash_all_off(void)
{
// P15.0~3 OFF
P15 &= (uint8_t)~(BIT(0)|BIT(1)|BIT(2)|BIT(3));
// P12.0,5,6,7 OFF
P12 &= (uint8_t)~(BIT(0)|BIT(5)|BIT(6)|BIT(7));
// P0.1,2 OFF
P0 &= (uint8_t)~(BIT(1)|BIT(2));
// P10.0~3 OFF
P10 &= (uint8_t)~(BIT(0)|BIT(1)|BIT(2)|BIT(3));
// P9.2~7 OFF
P9 &= (uint8_t)~(BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7));
}
void hash_pin(uint8_t ch, uint8_t on)
{
switch (ch)
{
case 1: hash_write_port(&P15, BIT(3), on); break; // #1 : P153
case 2: hash_write_port(&P15, BIT(2), on); break; // #2 : P152
case 3: hash_write_port(&P15, BIT(1), on); break; // #3 : P151
case 4: hash_write_port(&P15, BIT(0), on); break; // #4 : P150
case 5: hash_write_port(&P12, BIT(0), on); break; // #5 : P120
case 6: hash_write_port(&P12, BIT(5), on); break; // #6 : P125
case 7: hash_write_port(&P0, BIT(1), on); break; // #7 : P01
case 8: hash_write_port(&P12, BIT(6), on); break; // #8 : P126
case 9: hash_write_port(&P12, BIT(7), on); break; // #9 : P127
case 10: hash_write_port(&P0, BIT(2), on); break; // #10: P02
case 11: hash_write_port(&P10, BIT(3), on); break; // #11: P103
case 12: hash_write_port(&P10, BIT(2), on); break; // #12: P102
case 13: hash_write_port(&P10, BIT(1), on); break; // #13: P101
case 14: hash_write_port(&P10, BIT(0), on); break; // #14: P100
case 15: hash_write_port(&P9, BIT(7), on); break; // #15: P97
case 16: hash_write_port(&P9, BIT(6), on); break; // #16: P96
case 17: hash_write_port(&P9, BIT(5), on); break; // #17: P95
case 18: hash_write_port(&P9, BIT(4), on); break; // #18: P94
case 19: hash_write_port(&P9, BIT(3), on); break; // #19: P93
case 20: hash_write_port(&P9, BIT(2), on); break; // #20: P92
default: /* ignore */ break;
}
}

26
hash_pin.h

@ -0,0 +1,26 @@
#ifndef HASH_H
#define HASH_H
#include "r_cg_macrodriver.h"
#include "r_cg_port.h"
#ifdef __cplusplus
extern "C" {
#endif
void hash_init(void);
/*
(ch=1~20) # on/off
) ch=2 -> #2(P152)
*/
void hash_pin(uint8_t ch, uint8_t on);
/* (옵션) #1~#20 전체 OFF */
void hash_all_off(void);
#ifdef __cplusplus
}
#endif
#endif

190
multical.COMPUTER1.mtud

File diff suppressed because one or more lines are too long

129
multical.mtpj

@ -194,7 +194,7 @@
<Property>72c71efd-ece0-4b09-babe-7f48acd291f4</Property> <Property>72c71efd-ece0-4b09-babe-7f48acd291f4</Property>
</Instance> </Instance>
<Instance Guid="3ca7c59d-de22-4bed-84fa-4e91da5d3fdf"> <Instance Guid="3ca7c59d-de22-4bed-84fa-4e91da5d3fdf">
<Name>DELAY</Name> <Name>delay</Name>
<Type>Category</Type> <Type>Category</Type>
<ParentItem>c3051400-9e2f-456f-9dab-7f2327a849a2</ParentItem> <ParentItem>c3051400-9e2f-456f-9dab-7f2327a849a2</ParentItem>
<Property>68cb1536-5f64-4781-a297-d050bae8391b</Property> <Property>68cb1536-5f64-4781-a297-d050bae8391b</Property>
@ -218,6 +218,24 @@
<ParentItem>c3051400-9e2f-456f-9dab-7f2327a849a2</ParentItem> <ParentItem>c3051400-9e2f-456f-9dab-7f2327a849a2</ParentItem>
<Property>42dda53d-ad78-403b-aa93-5771a01ae07e</Property> <Property>42dda53d-ad78-403b-aa93-5771a01ae07e</Property>
</Instance> </Instance>
<Instance Guid="1a51c2d7-9706-40bb-957f-759d107beb08">
<Name>gate</Name>
<Type>Category</Type>
<ParentItem>c3051400-9e2f-456f-9dab-7f2327a849a2</ParentItem>
<Property>dc0a1372-85cd-4333-b337-b22d6cefcb74</Property>
</Instance>
<Instance Guid="98c07e4c-cc48-4ac0-af88-9cf8fcf4a8eb">
<Name>hash</Name>
<Type>Category</Type>
<ParentItem>c3051400-9e2f-456f-9dab-7f2327a849a2</ParentItem>
<Property>7bb2216f-be3b-4f25-a0a1-00320e71c6ce</Property>
</Instance>
<Instance Guid="fe8d771d-236f-456d-804c-dbe23f75629a">
<Name>check</Name>
<Type>Category</Type>
<ParentItem>c3051400-9e2f-456f-9dab-7f2327a849a2</ParentItem>
<Property>e300f3f2-2547-48ed-905c-35c1c1c59108</Property>
</Instance>
<Instance Guid="b8660be6-a832-48ed-b793-0021d8b0eadb"> <Instance Guid="b8660be6-a832-48ed-b793-0021d8b0eadb">
<Name>owi.c</Name> <Name>owi.c</Name>
<Type>File</Type> <Type>File</Type>
@ -302,6 +320,48 @@
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid> <TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>c2e81ecd-4702-442e-8cae-fd1a83b282c6</ParentItem> <ParentItem>c2e81ecd-4702-442e-8cae-fd1a83b282c6</ParentItem>
</Instance> </Instance>
<Instance Guid="f57bed39-9ff8-4cf0-ad35-20d7ab3ef62d">
<Name>gatectrl.h</Name>
<Type>File</Type>
<RelativePath>gatectrl.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>1a51c2d7-9706-40bb-957f-759d107beb08</ParentItem>
</Instance>
<Instance Guid="b7caf418-449c-4afa-9d64-16f7aef4371a">
<Name>gatectrl.c</Name>
<Type>File</Type>
<RelativePath>gatectrl.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>1a51c2d7-9706-40bb-957f-759d107beb08</ParentItem>
</Instance>
<Instance Guid="aa50120b-7114-4658-8fac-95c84e3409c0">
<Name>hash_pin.h</Name>
<Type>File</Type>
<RelativePath>hash_pin.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>98c07e4c-cc48-4ac0-af88-9cf8fcf4a8eb</ParentItem>
</Instance>
<Instance Guid="fe8114dc-549c-4ade-a131-ead5e7ce4c65">
<Name>hash_pin.c</Name>
<Type>File</Type>
<RelativePath>hash_pin.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>98c07e4c-cc48-4ac0-af88-9cf8fcf4a8eb</ParentItem>
</Instance>
<Instance Guid="fde7eebf-1fcd-458b-b7ab-6aa7e133241a">
<Name>check_pin.h</Name>
<Type>File</Type>
<RelativePath>check_pin.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>fe8d771d-236f-456d-804c-dbe23f75629a</ParentItem>
</Instance>
<Instance Guid="d545475c-ea20-4bbe-bf47-1a79c3f26bbe">
<Name>check_pin.c</Name>
<Type>File</Type>
<RelativePath>check_pin.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>fe8d771d-236f-456d-804c-dbe23f75629a</ParentItem>
</Instance>
</Class> </Class>
<Class Guid="fb98844b-2c27-4275-9804-f6e63e204da0"> <Class Guid="fb98844b-2c27-4275-9804-f6e63e204da0">
<Instance Guid="fb98844b-2c27-4275-9804-f6e63e204da0"> <Instance Guid="fb98844b-2c27-4275-9804-f6e63e204da0">
@ -332,6 +392,15 @@
<Instance Guid="42dda53d-ad78-403b-aa93-5771a01ae07e"> <Instance Guid="42dda53d-ad78-403b-aa93-5771a01ae07e">
<MemoCount>0</MemoCount> <MemoCount>0</MemoCount>
</Instance> </Instance>
<Instance Guid="dc0a1372-85cd-4333-b337-b22d6cefcb74">
<MemoCount>0</MemoCount>
</Instance>
<Instance Guid="7bb2216f-be3b-4f25-a0a1-00320e71c6ce">
<MemoCount>0</MemoCount>
</Instance>
<Instance Guid="e300f3f2-2547-48ed-905c-35c1c1c59108">
<MemoCount>0</MemoCount>
</Instance>
</Class> </Class>
<Class Guid="8fb9c1f6-d351-4d10-8d99-bf5b3015b84c"> <Class Guid="8fb9c1f6-d351-4d10-8d99-bf5b3015b84c">
<Instance Guid="00000000-0000-0000-0000-000000000000"> <Instance Guid="00000000-0000-0000-0000-000000000000">
@ -411,7 +480,13 @@
<SourceItemType18>CSource</SourceItemType18> <SourceItemType18>CSource</SourceItemType18>
<SourceItemGuid19>3ec4bd88-055b-45d8-a20b-523e530c6a87</SourceItemGuid19> <SourceItemGuid19>3ec4bd88-055b-45d8-a20b-523e530c6a87</SourceItemGuid19>
<SourceItemType19>CSource</SourceItemType19> <SourceItemType19>CSource</SourceItemType19>
<SourceItemCount>20</SourceItemCount> <SourceItemGuid20>b7caf418-449c-4afa-9d64-16f7aef4371a</SourceItemGuid20>
<SourceItemType20>CSource</SourceItemType20>
<SourceItemGuid21>fe8114dc-549c-4ade-a131-ead5e7ce4c65</SourceItemGuid21>
<SourceItemType21>CSource</SourceItemType21>
<SourceItemGuid22>d545475c-ea20-4bbe-bf47-1a79c3f26bbe</SourceItemGuid22>
<SourceItemType22>CSource</SourceItemType22>
<SourceItemCount>23</SourceItemCount>
<LastDeviceChangedCounter>0</LastDeviceChangedCounter> <LastDeviceChangedCounter>0</LastDeviceChangedCounter>
<LastDeviceNameOnPG>R5F10PPJ</LastDeviceNameOnPG> <LastDeviceNameOnPG>R5F10PPJ</LastDeviceNameOnPG>
<LastDeviceChangedCounterOnPG>0</LastDeviceChangedCounterOnPG> <LastDeviceChangedCounterOnPG>0</LastDeviceChangedCounterOnPG>
@ -1343,6 +1418,30 @@ C:\Program Files (x86)\Renesas Electronics\CS+\CC\FAA\V1.05.00
<ItemAddTime>639039830821401999</ItemAddTime> <ItemAddTime>639039830821401999</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount> <ItemAddTimeCount>0</ItemAddTimeCount>
</Instance> </Instance>
<Instance Guid="f57bed39-9ff8-4cf0-ad35-20d7ab3ef62d">
<ItemAddTime>639039961322336729</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="b7caf418-449c-4afa-9d64-16f7aef4371a">
<ItemAddTime>639039961488844302</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="aa50120b-7114-4658-8fac-95c84e3409c0">
<ItemAddTime>639040039861321224</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="fe8114dc-549c-4ade-a131-ead5e7ce4c65">
<ItemAddTime>639040039984657170</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="fde7eebf-1fcd-458b-b7ab-6aa7e133241a">
<ItemAddTime>639040040883924731</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="d545475c-ea20-4bbe-bf47-1a79c3f26bbe">
<ItemAddTime>639040041024930561</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="0b7e78c3-aadd-45ee-9f9d-ffac6141eeb2"> <Instance Guid="0b7e78c3-aadd-45ee-9f9d-ffac6141eeb2">
<TimeTagModified-SourceItem0--0>-8584334295854395005</TimeTagModified-SourceItem0--0> <TimeTagModified-SourceItem0--0>-8584334295854395005</TimeTagModified-SourceItem0--0>
<SourceItem0-IsLockedByUser>False</SourceItem0-IsLockedByUser> <SourceItem0-IsLockedByUser>False</SourceItem0-IsLockedByUser>
@ -1426,6 +1525,18 @@ C:\Program Files (x86)\Renesas Electronics\CS+\CC\FAA\V1.05.00
<SourceItem19-IsLockedByUser>False</SourceItem19-IsLockedByUser> <SourceItem19-IsLockedByUser>False</SourceItem19-IsLockedByUser>
<SourceItem19-BuildingTarget-0>True</SourceItem19-BuildingTarget-0> <SourceItem19-BuildingTarget-0>True</SourceItem19-BuildingTarget-0>
<SourceItem19-IndividualCompileOption-0>False</SourceItem19-IndividualCompileOption-0> <SourceItem19-IndividualCompileOption-0>False</SourceItem19-IndividualCompileOption-0>
<TimeTagModified-SourceItem20--0>-8584332399365931506</TimeTagModified-SourceItem20--0>
<SourceItem20-IsLockedByUser>False</SourceItem20-IsLockedByUser>
<SourceItem20-BuildingTarget-0>True</SourceItem20-BuildingTarget-0>
<SourceItem20-IndividualCompileOption-0>False</SourceItem20-IndividualCompileOption-0>
<TimeTagModified-SourceItem21--0>-8584332320870118638</TimeTagModified-SourceItem21--0>
<SourceItem21-IsLockedByUser>False</SourceItem21-IsLockedByUser>
<SourceItem21-BuildingTarget-0>True</SourceItem21-BuildingTarget-0>
<SourceItem21-IndividualCompileOption-0>False</SourceItem21-IndividualCompileOption-0>
<TimeTagModified-SourceItem22--0>-8584332319829845247</TimeTagModified-SourceItem22--0>
<SourceItem22-IsLockedByUser>False</SourceItem22-IsLockedByUser>
<SourceItem22-BuildingTarget-0>True</SourceItem22-BuildingTarget-0>
<SourceItem22-IndividualCompileOption-0>False</SourceItem22-IndividualCompileOption-0>
</Instance> </Instance>
</Class> </Class>
<Class Guid="44fa27c9-0aa0-4297-bd3b-2c5c5bdb8881"> <Class Guid="44fa27c9-0aa0-4297-bd3b-2c5c5bdb8881">
@ -3399,9 +3510,9 @@ C:\Program Files (x86)\Renesas Electronics\CS+\CC\FAA\V1.05.00
&lt;/SOAP-ENV:Body&gt; &lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt; &lt;/SOAP-ENV:Envelope&gt;
</KeyExtGridLayout> </KeyExtGridLayout>
<KeyTopViewZoom>1</KeyTopViewZoom> <KeyTopViewZoom />
<KeyTopViewAngle>0</KeyTopViewAngle> <KeyTopViewAngle />
<KeyTopViewPartsCollapsed>False</KeyTopViewPartsCollapsed> <KeyTopViewPartsCollapsed />
<KEY_SAVE_ALLOCATED_FUNCTION>False</KEY_SAVE_ALLOCATED_FUNCTION> <KEY_SAVE_ALLOCATED_FUNCTION>False</KEY_SAVE_ALLOCATED_FUNCTION>
<KEY_SAVE_DEVICE_PIN_LIST_ZOOM>100</KEY_SAVE_DEVICE_PIN_LIST_ZOOM> <KEY_SAVE_DEVICE_PIN_LIST_ZOOM>100</KEY_SAVE_DEVICE_PIN_LIST_ZOOM>
<KEY_SAVE_COLUMN_WIDTH_PIN_NUMBER>0:78:78,1:77:77,2:400:400,3:61:61,4:40:40,5:50:50,6:160:160,7:210:210,8:239:210,9:210:210,10:100:100</KEY_SAVE_COLUMN_WIDTH_PIN_NUMBER> <KEY_SAVE_COLUMN_WIDTH_PIN_NUMBER>0:78:78,1:77:77,2:400:400,3:61:61,4:40:40,5:50:50,6:160:160,7:210:210,8:239:210,9:210:210,10:100:100</KEY_SAVE_COLUMN_WIDTH_PIN_NUMBER>
@ -3867,7 +3978,7 @@ C:\Program Files (x86)\Renesas Electronics\CS+\CC\FAA\V1.05.00
&lt;/RTC1HZ&gt; &lt;/RTC1HZ&gt;
&lt;RXD0 Name="RXD0" Text="enable" /&gt; &lt;RXD0 Name="RXD0" Text="enable" /&gt;
&lt;ProjectName Name="PrjName" Text="multical" /&gt; &lt;ProjectName Name="PrjName" Text="multical" /&gt;
&lt;ProjectPath Name="PrjPath" Text="C:\Users\COMPUTER1\OneDrive\문서\카카오톡 받은 파일\Amosense_Firmware\Amosense_Firmware" /&gt; &lt;ProjectPath Name="PrjPath" Text="C:\Users\COMPUTER1\OneDrive\Desktop\Amosense_Firmware1" /&gt;
&lt;ProjectKind Name="PrjKind" Text="Project78K0R" /&gt; &lt;ProjectKind Name="PrjKind" Text="Project78K0R" /&gt;
&lt;DeviceName Name="DeviceName" Fixed="" Text="RL78F14" /&gt; &lt;DeviceName Name="DeviceName" Fixed="" Text="RL78F14" /&gt;
&lt;MCUName Name="MCUName" Text="RL78F14_100pin" /&gt; &lt;MCUName Name="MCUName" Text="RL78F14_100pin" /&gt;
@ -5355,16 +5466,16 @@ C:\Program Files (x86)\Renesas Electronics\CS+\CC\FAA\V1.05.00
&lt;TAG&gt; &lt;TAG&gt;
&lt;GlobleUserTag&gt; &lt;GlobleUserTag&gt;
&lt;cg_security3 Name="cg_security3" Value="00" /&gt; &lt;cg_security3 Name="cg_security3" Value="00" /&gt;
&lt;pior_value7 Name="pior_value7" Value="00" /&gt;
&lt;cg_security8 Name="cg_security8" Value="00" /&gt; &lt;cg_security8 Name="cg_security8" Value="00" /&gt;
&lt;cg_security4 Name="cg_security4" Value="00" /&gt; &lt;cg_security4 Name="cg_security4" Value="00" /&gt;
&lt;wdt_option Name="wdt_option" Value="F9" /&gt; &lt;cg_iawctl_value Name="cg_iawctl_value" Value="00" /&gt;
&lt;cg_crc_area Name="cg_crc_area" Value="00" /&gt; &lt;cg_crc_area Name="cg_crc_area" Value="00" /&gt;
&lt;cg_security0 Name="cg_security0" Value="00" /&gt; &lt;cg_security0 Name="cg_security0" Value="00" /&gt;
&lt;cg_security9 Name="cg_security9" Value="00" /&gt; &lt;cg_security9 Name="cg_security9" Value="00" /&gt;
&lt;cg_option Name="cg_option" Value="04" /&gt; &lt;cg_option Name="cg_option" Value="04" /&gt;
&lt;pior_value8 Name="pior_value8" Value="00" /&gt; &lt;pior_value8 Name="pior_value8" Value="00" /&gt;
&lt;cg_security5 Name="cg_security5" Value="00" /&gt; &lt;cg_security5 Name="cg_security5" Value="00" /&gt;
&lt;wdt_option Name="wdt_option" Value="F9" /&gt;
&lt;lvi_option Name="lvi_option" Value="FF" /&gt; &lt;lvi_option Name="lvi_option" Value="FF" /&gt;
&lt;pior_value4 Name="pior_value4" Value="00" /&gt; &lt;pior_value4 Name="pior_value4" Value="00" /&gt;
&lt;pior_value5 Name="pior_value5" Value="00" /&gt; &lt;pior_value5 Name="pior_value5" Value="00" /&gt;
@ -5373,7 +5484,7 @@ C:\Program Files (x86)\Renesas Electronics\CS+\CC\FAA\V1.05.00
&lt;pior_value0 Name="pior_value0" Value="00" /&gt; &lt;pior_value0 Name="pior_value0" Value="00" /&gt;
&lt;pior_value1 Name="pior_value1" Value="00" /&gt; &lt;pior_value1 Name="pior_value1" Value="00" /&gt;
&lt;pior_value6 Name="pior_value6" Value="00" /&gt; &lt;pior_value6 Name="pior_value6" Value="00" /&gt;
&lt;cg_iawctl_value Name="cg_iawctl_value" Value="00" /&gt; &lt;pior_value7 Name="pior_value7" Value="00" /&gt;
&lt;cg_security7 Name="cg_security7" Value="00" /&gt; &lt;cg_security7 Name="cg_security7" Value="00" /&gt;
&lt;ocdstart Name="ocdstart" Value="3FE00" /&gt; &lt;ocdstart Name="ocdstart" Value="3FE00" /&gt;
&lt;cg_security2 Name="cg_security2" Value="00" /&gt; &lt;cg_security2 Name="cg_security2" Value="00" /&gt;

25
multical.rcpe

@ -44,7 +44,7 @@
<Path>uart.c</Path> <Path>uart.c</Path>
<Path>uart.h</Path> <Path>uart.h</Path>
</Category> </Category>
<Category Name="DELAY"> <Category Name="delay">
<Path>delay.c</Path> <Path>delay.c</Path>
<Path>delay.h</Path> <Path>delay.h</Path>
</Category> </Category>
@ -57,6 +57,18 @@
<Path>dipSwitch.c</Path> <Path>dipSwitch.c</Path>
<Path>dipSwitch.h</Path> <Path>dipSwitch.h</Path>
</Category> </Category>
<Category Name="gate">
<Path>gatectrl.h</Path>
<Path>gatectrl.c</Path>
</Category>
<Category Name="hash">
<Path>hash_pin.h</Path>
<Path>hash_pin.c</Path>
</Category>
<Category Name="check">
<Path>check_pin.h</Path>
<Path>check_pin.c</Path>
</Category>
</Category> </Category>
</Files> </Files>
<DebugOptions> <DebugOptions>
@ -90,6 +102,9 @@
<Path>DefaultBuild\uart.obj</Path> <Path>DefaultBuild\uart.obj</Path>
<Path>DefaultBuild\delay.obj</Path> <Path>DefaultBuild\delay.obj</Path>
<Path>DefaultBuild\dipSwitch.obj</Path> <Path>DefaultBuild\dipSwitch.obj</Path>
<Path>DefaultBuild\gatectrl.obj</Path>
<Path>DefaultBuild\hash_pin.obj</Path>
<Path>DefaultBuild\check_pin.obj</Path>
</LinkOrder> </LinkOrder>
<CommonOptions> <CommonOptions>
<IncludePathForC>..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1</IncludePathForC> <IncludePathForC>..\..\Documents\카카오톡 받은 파일\IDH1.1\IDH1.1</IncludePathForC>
@ -388,7 +403,7 @@
&lt;/RTC1HZ&gt; &lt;/RTC1HZ&gt;
&lt;RXD0 Name="RXD0" Text="enable" /&gt; &lt;RXD0 Name="RXD0" Text="enable" /&gt;
&lt;ProjectName Name="PrjName" Text="multical" /&gt; &lt;ProjectName Name="PrjName" Text="multical" /&gt;
&lt;ProjectPath Name="PrjPath" Text="C:\Users\COMPUTER1\OneDrive\문서\카카오톡 받은 파일\Amosense_Firmware\Amosense_Firmware" /&gt; &lt;ProjectPath Name="PrjPath" Text="C:\Users\COMPUTER1\OneDrive\Desktop\Amosense_Firmware1" /&gt;
&lt;ProjectKind Name="PrjKind" Text="Project78K0R" /&gt; &lt;ProjectKind Name="PrjKind" Text="Project78K0R" /&gt;
&lt;DeviceName Name="DeviceName" Fixed="" Text="RL78F14" /&gt; &lt;DeviceName Name="DeviceName" Fixed="" Text="RL78F14" /&gt;
&lt;MCUName Name="MCUName" Text="RL78F14_100pin" /&gt; &lt;MCUName Name="MCUName" Text="RL78F14_100pin" /&gt;
@ -1876,16 +1891,16 @@
&lt;TAG&gt; &lt;TAG&gt;
&lt;GlobleUserTag&gt; &lt;GlobleUserTag&gt;
&lt;cg_security3 Name="cg_security3" Value="00" /&gt; &lt;cg_security3 Name="cg_security3" Value="00" /&gt;
&lt;pior_value7 Name="pior_value7" Value="00" /&gt;
&lt;cg_security8 Name="cg_security8" Value="00" /&gt; &lt;cg_security8 Name="cg_security8" Value="00" /&gt;
&lt;cg_security4 Name="cg_security4" Value="00" /&gt; &lt;cg_security4 Name="cg_security4" Value="00" /&gt;
&lt;wdt_option Name="wdt_option" Value="F9" /&gt; &lt;cg_iawctl_value Name="cg_iawctl_value" Value="00" /&gt;
&lt;cg_crc_area Name="cg_crc_area" Value="00" /&gt; &lt;cg_crc_area Name="cg_crc_area" Value="00" /&gt;
&lt;cg_security0 Name="cg_security0" Value="00" /&gt; &lt;cg_security0 Name="cg_security0" Value="00" /&gt;
&lt;cg_security9 Name="cg_security9" Value="00" /&gt; &lt;cg_security9 Name="cg_security9" Value="00" /&gt;
&lt;cg_option Name="cg_option" Value="04" /&gt; &lt;cg_option Name="cg_option" Value="04" /&gt;
&lt;pior_value8 Name="pior_value8" Value="00" /&gt; &lt;pior_value8 Name="pior_value8" Value="00" /&gt;
&lt;cg_security5 Name="cg_security5" Value="00" /&gt; &lt;cg_security5 Name="cg_security5" Value="00" /&gt;
&lt;wdt_option Name="wdt_option" Value="F9" /&gt;
&lt;lvi_option Name="lvi_option" Value="FF" /&gt; &lt;lvi_option Name="lvi_option" Value="FF" /&gt;
&lt;pior_value4 Name="pior_value4" Value="00" /&gt; &lt;pior_value4 Name="pior_value4" Value="00" /&gt;
&lt;pior_value5 Name="pior_value5" Value="00" /&gt; &lt;pior_value5 Name="pior_value5" Value="00" /&gt;
@ -1894,7 +1909,7 @@
&lt;pior_value0 Name="pior_value0" Value="00" /&gt; &lt;pior_value0 Name="pior_value0" Value="00" /&gt;
&lt;pior_value1 Name="pior_value1" Value="00" /&gt; &lt;pior_value1 Name="pior_value1" Value="00" /&gt;
&lt;pior_value6 Name="pior_value6" Value="00" /&gt; &lt;pior_value6 Name="pior_value6" Value="00" /&gt;
&lt;cg_iawctl_value Name="cg_iawctl_value" Value="00" /&gt; &lt;pior_value7 Name="pior_value7" Value="00" /&gt;
&lt;cg_security7 Name="cg_security7" Value="00" /&gt; &lt;cg_security7 Name="cg_security7" Value="00" /&gt;
&lt;ocdstart Name="ocdstart" Value="3FE00" /&gt; &lt;ocdstart Name="ocdstart" Value="3FE00" /&gt;
&lt;cg_security2 Name="cg_security2" Value="00" /&gt; &lt;cg_security2 Name="cg_security2" Value="00" /&gt;

43
r_main.c

@ -2,15 +2,15 @@
* DISCLAIMER * DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. * This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all * No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws. * applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY * NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT, * LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR * INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability * Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the * of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link: * following link:
* http://www.renesas.com/disclaimer * http://www.renesas.com/disclaimer
* *
@ -39,6 +39,7 @@ Includes
#include "common.h" #include "common.h"
#include "anaout.h" #include "anaout.h"
#include "dipSwitch.h" #include "dipSwitch.h"
#include "gatectrl.h"
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include <stddef.h> #include <stddef.h>
@ -60,6 +61,7 @@ static uint8_t g_fixed_addr = 1;
Pragma directive Pragma directive
***********************************************************************************************************************/ ***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */ /* Start user code for pragma. Do not edit comment generated here */
static unsigned char hex2byte(char h, char l) static unsigned char hex2byte(char h, char l)
{ {
unsigned char hi, lo; unsigned char hi, lo;
@ -70,7 +72,6 @@ static unsigned char hex2byte(char h, char l)
return (unsigned char)((hi << 4) | lo); return (unsigned char)((hi << 4) | lo);
} }
// Prefix: "X<AA>C_<CCC>:"
static int parse_x_prefix(const char *s, int len, uint8_t *addr, uint8_t *ch, int *payload_pos) static int parse_x_prefix(const char *s, int len, uint8_t *addr, uint8_t *ch, int *payload_pos)
{ {
if (len < 9) return 0; if (len < 9) return 0;
@ -161,7 +162,7 @@ void handle_uart_command_line(void)
if (rx_len < 0) rx_len = 0; if (rx_len < 0) rx_len = 0;
if (rx_len > (int)UART_RX_BUF_SIZE - 1) rx_len = (int)UART_RX_BUF_SIZE - 1; if (rx_len > (int)UART_RX_BUF_SIZE - 1) rx_len = (int)UART_RX_BUF_SIZE - 1;
uart_rx_buffer[rx_len] = '\0'; uart_rx_buffer[rx_len] = '\0';
for (i = 0; i < rx_len && i < (int)sizeof(line) - 1; i++) { for (i = 0; i < rx_len && i < (int)sizeof(line) - 1; i++) {
char c = (char)uart_rx_buffer[i]; char c = (char)uart_rx_buffer[i];
if (c == '\r') continue; if (c == '\r') continue;
@ -170,7 +171,6 @@ void handle_uart_command_line(void)
} }
line[idx] = '\0'; line[idx] = '\0';
// Prefix
{ {
uint8_t addr = 0; uint8_t addr = 0;
uint8_t ch = 0; uint8_t ch = 0;
@ -191,9 +191,7 @@ void handle_uart_command_line(void)
goto clear; goto clear;
} }
GateCtrl_SelectChannel(ch);
ANAOUT_Select(ch);
{ {
int rem = idx - payload_pos; int rem = idx - payload_pos;
@ -299,6 +297,7 @@ void handle_uart_command_line(void)
} }
} }
} }
/* End user code. Do not edit comment generated here */ /* End user code. Do not edit comment generated here */
/*********************************************************************************************************************** /***********************************************************************************************************************
@ -318,20 +317,20 @@ void main(void)
{ {
R_MAIN_UserInit(); R_MAIN_UserInit();
/* Start user code. Do not edit comment generated here */ /* Start user code. Do not edit comment generated here */
R_UART0_Create(); // UART0 R_UART0_Create(); // UART0
R_UART1_Create(); // UART1 R_UART1_Create(); // UART1
R_IICA0_Create(); // I2C R_IICA0_Create(); // I2C
R_UART0_Start(); // RS485 R_UART0_Start(); // RS485
R_UART1_Start(); // PC R_UART1_Start(); // PC
R_UART1_Receive((uint8_t *)&uart_rx_buffer[uart_rx_index], 1); R_UART1_Receive((uint8_t *)&uart_rx_buffer[uart_rx_index], 1);
handle_uart_command_line(); handle_uart_command_line();
delay(100000); delay(100000);
while (1U) while (1U)
{ {
; ;
@ -350,16 +349,16 @@ void R_MAIN_UserInit(void)
/* Start user code. Do not edit comment generated here */ /* Start user code. Do not edit comment generated here */
EI(); EI();
R_PORT_Create(); R_PORT_Create();
rs485_init(); rs485_init();
R_ADC_Create(); R_ADC_Create();
R_ADC_Set_OperationOn(); R_ADC_Set_OperationOn();
DipSwitch_Init(); DipSwitch_Init();
g_fixed_addr = DipSwitch_ReadAddr_1to32(); g_fixed_addr = DipSwitch_ReadAddr_1to32();
ANAOUT_Init(); GateCtrl_Init();
/* End user code. Do not edit comment generated here */ /* End user code. Do not edit comment generated here */
} }

Loading…
Cancel
Save