- Timestamp:
- Apr 5, 2019, 9:26:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_sakura_gcc/target_kernel_impl.c
r364 r374 53 53 #include "syssvc/serial.h" 54 54 #ifdef TOPPERS_OMIT_TECS 55 #include "rx630_uart.h" 55 #include "serial_api.h" 56 #endif 57 58 #ifdef TOPPERS_OMIT_TECS 59 serial_t log_serial; 56 60 #endif 57 61 … … 78 82 sil_reb_mem(PORTA_PDR_ADDR) & ~PORT_PDR_B7_BIT); 79 83 84 #ifdef TOPPERS_OMIT_TECS 80 85 /* 81 86 * シリアルポートの設定 82 87 */ 83 84 /* ポートP20をTxD0, ポートP21をRxD0に */ 85 sil_wrb_mem(PORT2_PMR_ADDR, 0x03); 86 87 /* データディレクションレジスタ(PDR)の設定 P21(RxD0)を入力ポートにする */ 88 sil_wrb_mem(PORT2_PDR_ADDR, 89 sil_reb_mem(PORT2_PDR_ADDR) & ~PORT_PDR_B1_BIT); 90 91 /* データディレクションレジスタ(PDR)の設定 P20(TxD0)を出力ポートにする */ 92 sil_wrb_mem(PORT2_PDR_ADDR, 93 sil_reb_mem(PORT2_PDR_ADDR) | PORT_PDR_B0_BIT); 88 serial_init(&log_serial, P20, P21); 89 serial_baud(&log_serial, UART_BAUDRATE); 90 serial_format(&log_serial, 8, ParityNone, 1); 91 #endif 94 92 95 93 /* ポートP40~P47を周辺機器に */ … … 152 150 { 153 151 if (c == '\n') { 154 rx630_uart_pol_putc('\r', TARGET_PUTC_PORTID);152 serial_putc(&log_serial, '\r'); 155 153 } 156 154 157 rx630_uart_pol_putc(c, TARGET_PUTC_PORTID);155 serial_putc(&log_serial, c); 158 156 } 159 157 #endif
Note:
See TracChangeset
for help on using the changeset viewer.