/*********************************************************************** * * Function: term_dat_out_len * * Purpose: Send a number of characters on the terminal interface * * Processing: * Move data into the UART ring buffer. * * Parameters: * dat : Data to send * chars : Number of bytes to send * * Outputs: None * * Returns: Nothing * * Notes: Will block until all bytes are sent. * **********************************************************************/ void term_dat_out_len(UNS_8 *dat, int chars) { while (chars > 0) { if (txsize < 512) { txbuff[txfill] = *dat; txfill++; if (txfill >= 512) { txfill = 0; } dat++; chars--; int_disable(IRQ_UART_IIR5); txsize++; int_enable(IRQ_UART_IIR5); } int_disable(IRQ_UART_IIR5); term_dat_send_cb(); int_enable(IRQ_UART_IIR5); } }
/*********************************************************************** * * Function: term_dat_out * * Purpose: Send some data on the terminal interface * * Processing: * Place data into the TX ring buffer and start UART transmission. * * Parameters: * dat : Data to send * bytes : Number of bytes to send * * Outputs: None * * Returns: Nothing * * Notes: Will block until all bytes are sent. * **********************************************************************/ void term_dat_out(UNS_8 *dat, int bytes) { while (bytes > 0) { while ((bytes > 0) && (txsize < 512)) { txbuff[txfill] = *dat; txfill++; if (txfill >= 512) { txfill = 0; } dat++; bytes--; // int_disable(IRQ_UART_IIR3); txsize++; // int_enable(IRQ_UART_IIR3); } // int_disable(IRQ_UART_IIR5); term_dat_send_cb(); // int_enable(IRQ_UART_IIR5); } }