void csb250_output_char(char c) { console_outbyte_polled( 0, c ); if (c == '\n') { console_outbyte_polled( 0, '\r' ); } }
ssize_t console_write_support (int minor, const char *buf, size_t len) { int nwrite = 0; while (nwrite < len) { console_outbyte_polled( minor, *buf++ ); nwrite++; } return nwrite; }
ssize_t console_write_support (int minor, const char *buf, size_t len) { int nwrite = 0; while (nwrite < len) { #if (CONSOLE_USE_INTERRUPTS) console_outbyte_interrupt( minor, *buf++ ); #else console_outbyte_polled( minor, *buf++ ); #endif nwrite++; } return nwrite; }
int console_write_support ( int minor, const char *bufarg, int len ) { int nwrite = 0; const char *buf = bufarg; while (nwrite < len) { console_outbyte_polled( minor, *buf++ ); nwrite++; } return nwrite; }
ssize_t console_write_support (int minor, const char *buf, size_t len) { int nwrite = 0; if (minor == STDOUT_FILENO || minor == STDERR_FILENO) { while (nwrite < len) { console_outbyte_polled( minor, *buf++ ); nwrite++; } return nwrite; } return -1; }
void console_outbyte_interrupt( int port, char ch ) { /* * If this is the first character then we need to prime the pump */ if ( Is_TX_active[ port ] == false ) { Is_TX_active[ port ] = true; console_outbyte_polled( port, ch ); return; } while ( Ring_buffer_Is_full( &TX_Buffer[ port ] ) ); Ring_buffer_Add_character( &TX_Buffer[ port ], ch ); }
void console_exit() { uint32_t port; uint32_t ch; /* * Although the interrupts for the UART are unmasked, the PIL is set to * disable all external interrupts. So we might as well do this first. */ LEON_Mask_interrupt( LEON_INTERRUPT_UART_1_RX_TX ); LEON_Mask_interrupt( LEON_INTERRUPT_UART_2_RX_TX ); for ( port=0 ; port <= 1 ; port++ ) { while ( !Ring_buffer_Is_empty( &TX_Buffer[ port ] ) ) { Ring_buffer_Remove_character( &TX_Buffer[ port ], ch ); console_outbyte_polled( port, ch ); } } /* * Now wait for all the data to actually get out ... the send register * should be empty. */ while ( (LEON_REG.UART_Status_1 & LEON_REG_UART_STATUS_THE) != LEON_REG_UART_STATUS_THE ); while ( (LEON_REG.UART_Status_2 & LEON_REG_UART_STATUS_THE) != LEON_REG_UART_STATUS_THE ); LEON_REG.UART_Control_1 = 0; LEON_REG.UART_Control_2 = 0; LEON_REG.UART_Status_1 = 0; LEON_REG.UART_Status_2 = 0; }
void BSP_output_char_f(char c) { console_outbyte_polled( 0, c ); }
static void AVRsimBSP_output_char(char c) { console_outbyte_polled( 0, c ); }
static void bsp_out_char (char c) { console_outbyte_polled(0, c); }
void PSIM_output_char(char c) { console_outbyte_polled( 0, c ); }
void H8simBSP_output_char(char c) { console_outbyte_polled( 0, c ); }
void mcf5272_output_char(char c) { console_outbyte_polled( 0, c ); }
static void RISCV_output_char(char c) { console_outbyte_polled( 0, c ); }
static void csb250_output_char(char c) { console_outbyte_polled( 0, c ); }