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;
}
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 //
//////////////////////////////////////////////////////

View File

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