diff --git a/README.md b/README.md index bcd751e..fbc2d71 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,28 @@ likely end up being the end result. ```C #include "avr_usart.h" -void send_bt_cmd(char* cmd) { +/* + *Description: Echos a single char back to the term. + */ +void echo_char(char* cmd) { init_usart(); - unsigned char data[] = "AT+WAKE\0"; - uint8_t result = usart_send_str(data); - if(result) { - raise_error(); + unsigned char data[1] = "0"; + uint8_t data_len = 1; + + //clear the buffer + serial0_flush_rxbuf(); + + //receive the char. + serial0_read(data, data_len); + + //Now echo it. + serial0_write(data, data_len); +} + +int main() { + while(1) { + echo_char(); } }