summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2012-06-15 18:36:18 +0000
committerChristian Pointner <equinox@mur.at>2012-06-15 18:36:18 +0000
commit68a2a5f73f495f9a56fbcafad465b7367c542e71 (patch)
tree7f8ea448957a824c57e73656f88427b5c7a9f42d /tools
parentcleaned up output (diff)
cleanup
git-svn-id: https://svn.spreadspace.org/mur.sat@535 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'tools')
-rw-r--r--tools/idm-ringbuffer/ringbuffer.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/tools/idm-ringbuffer/ringbuffer.c b/tools/idm-ringbuffer/ringbuffer.c
index c4e6373..0baa2a3 100644
--- a/tools/idm-ringbuffer/ringbuffer.c
+++ b/tools/idm-ringbuffer/ringbuffer.c
@@ -88,17 +88,6 @@ void rbuf_next()
}
}
-void beginRead()
-{
- spiData = underrun ? -1 : *readPtr;
-}
-
-void endRead()
-{
- *readPtr = 0;
- rbuf_next();
-}
-
void timer2Interrupt()
{
static char value = 0;
@@ -111,11 +100,12 @@ void timer2Interrupt()
void sspInterrupt()
{
if (cmd_read && spiData == 0) {
- endRead();
- beginRead();
+ *readPtr = 0;
+ rbuf_next();
+ spiData = underrun ? -1 : *readPtr;
} else if (spiData == 'r') {
cmd_read = TRUE;
- beginRead();
+ spiData = underrun ? -1 : *readPtr;
} else {
cmd_read = FALSE;
printf("%s\n", "I don't like you!");