47 #define EL_UART_BLUETOOTH EL_UART_1
149 el_uint16
el_uart_get_string(el_index ch,
char*buf,el_uint16 buf_size,el_bool return_line);
188 #ifdef EL_INCLUDE_LIB_INTERNAL_CONTEXT
190 #define EL_UART_NEWLINE_CRLF
192 #define EL_UART_BAUDRATE 115200
193 #define EL_UART_TX_BUF_DIM 80
194 #define EL_UART_RX_BUF_DIM 64
196 extern volatile el_bool el_uart_reset_code_enable;
197 extern el_uint8 el_uart_reset_code;
198 extern el_uint16 el_uart1_tx_counter;
199 extern char*el_uart1_tx_pointer;
200 extern char el_uart1_tx_buffer[EL_UART_TX_BUF_DIM];
201 extern volatile el_uint8 el_uart1_rx_buf_i;
202 extern volatile el_uint8 el_uart1_rx_buf_o;
203 extern char el_uart1_rx_buffer[EL_UART_RX_BUF_DIM];
206 void el_uart1_tx_clear();
207 void el_uart1_tx_issue();
208 void el_uart2_tx_clear();
209 void el_uart2_tx_issue();
void el_uart_send_char(el_index ch, char c)
Send one byte of data to the serial channel.
el_uint16 el_uart_get_string(el_index ch, char *buf, el_uint16 buf_size, el_bool return_line)
Get a string ended with a null (0 or '\0') or a carriage-return ('\r', (the "Enter" key)...
void el_uart_use_reset_code(el_bool k, el_int8 x)
Setup a value that: upon receiving that value, reset the chip.
void el_uart_send_string(el_index ch, const char *str)
Send a string (an array of char terminated by a null) to the serial channel.
el_uint16 el_uart_get_char_counter(el_index ch)
Check how many bytes are received and buffered in the channel.
char el_uart_peek_first_char(el_index ch)
Check the first byte in the receiving buffer, but does not remove it from the buffer.
char el_uart_peek_last_char(el_index ch)
Check the last byte in the receiving buffer but do not remove it from the buffer. ...
void el_uart_flush_char(el_index ch)
Totally clear up the receiving buffer of a serial channel.
char el_uart_get_char(el_index ch)
Take out one byte from the receiving buffer in order of first-in-first-out.
void el_uart_erase_last_char(el_index ch)
Remove the last byte received in the receiving buffer.
bool el_uart_is_sending(el_index ch)
Check whether the transmission issued in the last sending function is finished.