- 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_citrus_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 … … 75 79 sil_reb_mem(PORTA_PDR_ADDR) & ~PORT_PDR_B7_BIT); 76 80 81 #ifdef TOPPERS_OMIT_TECS 77 82 /* 78 83 * シリアルポートの設定 79 84 */ 80 81 /* ポートP20をTxD0, ポートP21をRxD0に */ 82 sil_wrb_mem(PORT2_PMR_ADDR, 0x03); 83 84 /* データディレクションレジスタ(PDR)の設定 P21(RxD0)を入力ポートにする */ 85 sil_wrb_mem(PORT2_PDR_ADDR, 86 sil_reb_mem(PORT2_PDR_ADDR) & ~PORT_PDR_B1_BIT); 87 88 /* データディレクションレジスタ(PDR)の設定 P20(TxD0)を出力ポートにする */ 89 sil_wrb_mem(PORT2_PDR_ADDR, 90 sil_reb_mem(PORT2_PDR_ADDR) | PORT_PDR_B0_BIT); 85 serial_init(&log_serial, P20, P21); 86 serial_baud(&log_serial, UART_BAUDRATE); 87 serial_format(&log_serial, 8, ParityNone, 1); 88 #endif 91 89 92 90 /* ポートP40~P47を周辺機器に */ … … 149 147 { 150 148 if (c == '\n') { 151 rx630_uart_pol_putc('\r', TARGET_PUTC_PORTID);149 serial_putc(&log_serial, '\r'); 152 150 } 153 151 154 rx630_uart_pol_putc(c, TARGET_PUTC_PORTID);152 serial_putc(&log_serial, c); 155 153 } 156 154 #endif
Note:
See TracChangeset
for help on using the changeset viewer.