Skip to content

maintainership conversation (and some of my fixes :P) #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: Master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ uint8_t uart_get_buffered(void) {
}
return c;
}

int uart_getch(void) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation incomplete / Is not used anywhere else? | Should be as safer way to get uart_get_buffered()?

if (byte_avail_at_position() != UART_EMPTY_INDICATOR)
return uart_get_buffered();
return -1;
}

// FIXME only needed as long as the other displays do not use new functions
// and instead have their own irq handler

Expand Down
1 change: 1 addition & 0 deletions uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ void uart_fill_rx_packet_buffer(uint8_t *buffer, uint8_t bufferSize, uint8_t *bu
void uart_init (void);
void putbyte(uint8_t c);

int uart_getch(void);
#endif /* _UART_H */