Reworked remaining KFile functions

This commit is contained in:
Mark Qvist 2014-04-04 08:52:03 +02:00
parent 319f18330c
commit 2dc4e73d38
2 changed files with 12 additions and 14 deletions

View File

@ -364,29 +364,27 @@ static size_t afsk_write(KFile *fd, const void *_buf, size_t size) {
return buf - (const uint8_t *)_buf; return buf - (const uint8_t *)_buf;
} }
static int afsk_flush(KFile *fd) static int afsk_flush(KFile *fd) {
{ Afsk *afsk = AFSK_CAST(fd);
Afsk *af = AFSK_CAST(fd); while (afsk->sending) {
while (af->sending)
cpu_relax(); cpu_relax();
}
return 0; return 0;
} }
static int afsk_error(KFile *fd) static int afsk_error(KFile *fd) {
{ Afsk *afsk = AFSK_CAST(fd);
Afsk *af = AFSK_CAST(fd);
int err; int err;
ATOMIC(err = afsk->status);
ATOMIC(err = af->status);
return err; return err;
} }
static void afsk_clearerr(KFile *fd) static void afsk_clearerr(KFile *fd) {
{ Afsk *afsk = AFSK_CAST(fd);
Afsk *af = AFSK_CAST(fd); ATOMIC(afsk->status = 0);
ATOMIC(af->status = 0);
} }
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
// Modem Initialization // // Modem Initialization //
////////////////////////////////////////////////////// //////////////////////////////////////////////////////

View File

@ -1,2 +1,2 @@
#define VERS_BUILD 119 #define VERS_BUILD 123
#define VERS_HOST "vixen" #define VERS_HOST "vixen"