removed code smells; unused functions and prototypes

This commit is contained in:
Jake Goodwin 2023-02-18 22:49:39 -08:00
parent 410d8b3c83
commit 631f889661
2 changed files with 0 additions and 53 deletions

View File

@ -158,24 +158,6 @@ void serial0_write(unsigned char* buffer, uint8_t write_length) {
}
/*
* Input: none
* Output: none
* Description:
*/
void serial0_enable_line_feeds(void) {
;
}
/*
* Input: none
* Output: none
* Description:
*/
void serial0_enable_carriage_returns(void) {
;
}
/*
* Input: A parity setting as a 8bit uint
* Output: none
@ -233,40 +215,6 @@ void serial0_read(unsigned char* buffer, uint8_t buf_length) {
}
/*
* Inupt: A serialbuffer and length
* Output: None
* Description: Reads the serial data into a buffer of x length,
* it does error checking from the register first.
*/
void serial0_read_with_err_checking(unsigned char* buffer, uint8_t buf_length) {
//first wait for the data to be received.
while( !(UCSR0A & (1<<RXC0)) ) {
;//Equiv of continue
}
//check for errors in the register.
//Check for frame error.
if(UCSR0A & (1<<FE0)) {
led_blink();
}
//check for data over-run
else if(UCSR0A & (1<<DOR0)) {
led_blink();
led_blink();
}
//check for parity error
else if(UCSR0A & (1<<UPE0)) {
led_blink();
led_blink();
led_blink();
}
//now return the data
buffer[0] = UDR0;
}
/*
* Inupt: BUAD RATE as uint8_t
* Output: None

View File

@ -64,7 +64,6 @@ unsigned char rx_usart0(void);
void serial0_write(unsigned char* buffer, uint8_t write_length);
void serial0_read(unsigned char* buffer, uint8_t buf_length);
void serial0_read_with_err_checking(unsigned char* buffer, uint8_t buf_length);
void serial0_set_baud(uint8_t baud);
void seiral0_enable_timeouts(uint8_t ms);
void serial0_flush_rxbuf(void);