File tree Expand file tree Collapse file tree 3 files changed +0
-41
lines changed
hal/targets/hal/TARGET_Maxim Expand file tree Collapse file tree 3 files changed +0
-41
lines changed Original file line number Diff line number Diff line change @@ -250,27 +250,15 @@ int serial_getc(serial_t *obj)
250250 while (obj -> uart -> status & MXC_F_UART_STATUS_RX_FIFO_EMPTY ) {}
251251 c = obj -> uart -> tx_rx_fifo & 0xFF ;
252252
253- // Echo characters for stdio
254- if (obj -> uart == (mxc_uart_regs_t * )STDIO_UART ) {
255- obj -> uart -> tx_rx_fifo = c ;
256- }
257-
258253 return c ;
259254}
260255
261256//******************************************************************************
262257void serial_putc (serial_t * obj , int c )
263258{
264- // Append a carriage return for stdio
265- if ((c == (int )'\n' ) && (obj -> uart == (mxc_uart_regs_t * )STDIO_UART )) {
266- while (obj -> uart -> status & MXC_F_UART_STATUS_TX_FIFO_FULL ) {}
267- obj -> uart -> tx_rx_fifo = '\r' ;
268- }
269-
270259 // Wait for TXFIFO to not be full
271260 while (obj -> uart -> status & MXC_F_UART_STATUS_TX_FIFO_FULL ) {}
272261 obj -> uart -> tx_rx_fifo = c ;
273-
274262}
275263
276264//******************************************************************************
Original file line number Diff line number Diff line change @@ -250,27 +250,15 @@ int serial_getc(serial_t *obj)
250250 while (obj -> uart -> status & MXC_F_UART_STATUS_RX_FIFO_EMPTY ) {}
251251 c = obj -> uart -> tx_rx_fifo & 0xFF ;
252252
253- // Echo characters for stdio
254- if (obj -> uart == (mxc_uart_regs_t * )STDIO_UART ) {
255- obj -> uart -> tx_rx_fifo = c ;
256- }
257-
258253 return c ;
259254}
260255
261256//******************************************************************************
262257void serial_putc (serial_t * obj , int c )
263258{
264- // Append a carriage return for stdio
265- if ((c == (int )'\n' ) && (obj -> uart == (mxc_uart_regs_t * )STDIO_UART )) {
266- while (obj -> uart -> status & MXC_F_UART_STATUS_TX_FIFO_FULL ) {}
267- obj -> uart -> tx_rx_fifo = '\r' ;
268- }
269-
270259 // Wait for TXFIFO to not be full
271260 while (obj -> uart -> status & MXC_F_UART_STATUS_TX_FIFO_FULL ) {}
272261 obj -> uart -> tx_rx_fifo = c ;
273-
274262}
275263
276264//******************************************************************************
Original file line number Diff line number Diff line change @@ -303,29 +303,12 @@ int serial_getc(serial_t *obj)
303303
304304 c = * obj -> fifo -> rx_8 ;
305305
306- // Echo characters for stdio
307- if (obj -> uart == (mxc_uart_regs_t * )STDIO_UART ) {
308- * obj -> fifo -> tx_8 = (uint8_t )c ;
309- }
310-
311306 return c ;
312307}
313308
314309//******************************************************************************
315310void serial_putc (serial_t * obj , int c )
316311{
317- // Append a carriage return for stdio
318- if ((c == (int )'\n' ) && (obj -> uart == (mxc_uart_regs_t * )STDIO_UART )) {
319- while ( ((obj -> uart -> tx_fifo_ctrl & MXC_F_UART_TX_FIFO_CTRL_FIFO_ENTRY )
320- >> MXC_F_UART_TX_FIFO_CTRL_FIFO_ENTRY_POS )
321- >= MXC_UART_FIFO_DEPTH );
322-
323- // Must clear before every write to the buffer to know that the fifo
324- // is empty when the TX DONE bit is set
325- obj -> uart -> intfl = MXC_F_UART_INTFL_TX_DONE ;
326- * obj -> fifo -> tx_8 = (uint8_t )'\r' ;
327- }
328-
329312 // Wait for TXFIFO to not be full
330313 while ( ((obj -> uart -> tx_fifo_ctrl & MXC_F_UART_TX_FIFO_CTRL_FIFO_ENTRY )
331314 >> MXC_F_UART_TX_FIFO_CTRL_FIFO_ENTRY_POS )
You can’t perform that action at this time.
0 commit comments