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)
250
250
while (obj -> uart -> status & MXC_F_UART_STATUS_RX_FIFO_EMPTY ) {}
251
251
c = obj -> uart -> tx_rx_fifo & 0xFF ;
252
252
253
- // Echo characters for stdio
254
- if (obj -> uart == (mxc_uart_regs_t * )STDIO_UART ) {
255
- obj -> uart -> tx_rx_fifo = c ;
256
- }
257
-
258
253
return c ;
259
254
}
260
255
261
256
//******************************************************************************
262
257
void serial_putc (serial_t * obj , int c )
263
258
{
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
-
270
259
// Wait for TXFIFO to not be full
271
260
while (obj -> uart -> status & MXC_F_UART_STATUS_TX_FIFO_FULL ) {}
272
261
obj -> uart -> tx_rx_fifo = c ;
273
-
274
262
}
275
263
276
264
//******************************************************************************
Original file line number Diff line number Diff line change @@ -250,27 +250,15 @@ int serial_getc(serial_t *obj)
250
250
while (obj -> uart -> status & MXC_F_UART_STATUS_RX_FIFO_EMPTY ) {}
251
251
c = obj -> uart -> tx_rx_fifo & 0xFF ;
252
252
253
- // Echo characters for stdio
254
- if (obj -> uart == (mxc_uart_regs_t * )STDIO_UART ) {
255
- obj -> uart -> tx_rx_fifo = c ;
256
- }
257
-
258
253
return c ;
259
254
}
260
255
261
256
//******************************************************************************
262
257
void serial_putc (serial_t * obj , int c )
263
258
{
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
-
270
259
// Wait for TXFIFO to not be full
271
260
while (obj -> uart -> status & MXC_F_UART_STATUS_TX_FIFO_FULL ) {}
272
261
obj -> uart -> tx_rx_fifo = c ;
273
-
274
262
}
275
263
276
264
//******************************************************************************
Original file line number Diff line number Diff line change @@ -303,29 +303,12 @@ int serial_getc(serial_t *obj)
303
303
304
304
c = * obj -> fifo -> rx_8 ;
305
305
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
-
311
306
return c ;
312
307
}
313
308
314
309
//******************************************************************************
315
310
void serial_putc (serial_t * obj , int c )
316
311
{
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
-
329
312
// Wait for TXFIFO to not be full
330
313
while ( ((obj -> uart -> tx_fifo_ctrl & MXC_F_UART_TX_FIFO_CTRL_FIFO_ENTRY )
331
314
>> MXC_F_UART_TX_FIFO_CTRL_FIFO_ENTRY_POS )
You can’t perform that action at this time.
0 commit comments