From 2dc4e73d38fb404f3bd2f72a1ff9de99d98356da Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 4 Apr 2014 08:52:03 +0200 Subject: [PATCH] Reworked remaining KFile functions --- Modem/afsk.c | 24 +++++++++++------------- buildrev.h | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Modem/afsk.c b/Modem/afsk.c index 4028757..c4ad488 100644 --- a/Modem/afsk.c +++ b/Modem/afsk.c @@ -364,29 +364,27 @@ static size_t afsk_write(KFile *fd, const void *_buf, size_t size) { return buf - (const uint8_t *)_buf; } -static int afsk_flush(KFile *fd) -{ - Afsk *af = AFSK_CAST(fd); - while (af->sending) +static int afsk_flush(KFile *fd) { + Afsk *afsk = AFSK_CAST(fd); + while (afsk->sending) { cpu_relax(); + } return 0; } -static int afsk_error(KFile *fd) -{ - Afsk *af = AFSK_CAST(fd); +static int afsk_error(KFile *fd) { + Afsk *afsk = AFSK_CAST(fd); int err; - - ATOMIC(err = af->status); + ATOMIC(err = afsk->status); return err; } -static void afsk_clearerr(KFile *fd) -{ - Afsk *af = AFSK_CAST(fd); - ATOMIC(af->status = 0); +static void afsk_clearerr(KFile *fd) { + Afsk *afsk = AFSK_CAST(fd); + ATOMIC(afsk->status = 0); } + ////////////////////////////////////////////////////// // Modem Initialization // ////////////////////////////////////////////////////// diff --git a/buildrev.h b/buildrev.h index 08f2960..ef3342b 100644 --- a/buildrev.h +++ b/buildrev.h @@ -1,2 +1,2 @@ -#define VERS_BUILD 119 +#define VERS_BUILD 123 #define VERS_HOST "vixen"