projects
/
stellaris
/
led_blink.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9deb531
)
Only use input when the previous byte is complete
author
Matt Mullins
<mmullins@mmlx.us>
Sun, 23 Dec 2012 22:09:25 +0000
(14:09 -0800)
committer
Matt Mullins
<mmullins@mmlx.us>
Sun, 23 Dec 2012 22:09:25 +0000
(14:09 -0800)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
0aed93b
..
d6cdc51
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-93,12
+93,13
@@
__attribute__((isr))
void uart0_isr() {
// Receive data, increment by 1 and send it back through the UART
int data = UART0_DR_R & 0xFF;
- blink_char = data;
+ if (!bit_count) {
+ blink_char = data;
+ bit_count = 8;
+ }
data = (data + 1) & 0xFF;
UART0_DR_R = data;
-
- bit_count = 8;
}
__attribute__((isr))