diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-05-26 06:59:55 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-05-26 06:59:55 +0000 |
commit | 79742c5d24929442175953c796a1834e45a93d0d (patch) | |
tree | 586e05a47ddcd226311d6f965885f3bde6c0fc4a /Projects/XPLAINBridge/Lib/SoftUART.h | |
parent | 9b29d1dc5045b74516e0ddd3ffcc200ef8ad9bff (diff) | |
download | lufa-79742c5d24929442175953c796a1834e45a93d0d.tar.gz lufa-79742c5d24929442175953c796a1834e45a93d0d.tar.bz2 lufa-79742c5d24929442175953c796a1834e45a93d0d.zip |
Make software USART used in the XPLAINBridge project directly check and store into the ring buffers, rather than polling from the main program loop to avoid added latency.
Diffstat (limited to 'Projects/XPLAINBridge/Lib/SoftUART.h')
-rw-r--r-- | Projects/XPLAINBridge/Lib/SoftUART.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/Projects/XPLAINBridge/Lib/SoftUART.h b/Projects/XPLAINBridge/Lib/SoftUART.h index 416490d8d..e54d4a9ae 100644 --- a/Projects/XPLAINBridge/Lib/SoftUART.h +++ b/Projects/XPLAINBridge/Lib/SoftUART.h @@ -37,6 +37,9 @@ #include <avr/io.h> #include <avr/interrupt.h> #include <stdbool.h> + + #include "../XPLAINBridge.h" + #include "LightweightRingBuff.h" /* Macros: */ #define BAUD 9600 @@ -50,24 +53,7 @@ #define STXPORT PORTD #define STXDDR DDRD - /* External Variables: */ - extern volatile bool srx_done; - extern volatile uint8_t stx_count; - - /* Inline Functions: */ - static inline bool SoftUART_IsReady(void) - { - return !(stx_count); - } - - static inline bool SoftUART_IsReceived(void) - { - return srx_done; - } - /* Function Prototypes: */ - void SoftUART_TxByte(uint8_t c); - uint8_t SoftUART_RxByte(void); void SoftUART_Init(void); #endif
\ No newline at end of file |