src/stdlib.h
author Tero Marttila <terom@paivola.fi>
Thu, 29 Jan 2015 23:11:44 +0200
changeset 107 05707929ff6f
parent 58 a445e08b63e0
permissions -rw-r--r--
qmsk.web.async: handle HTTPExceptions
#define false       0
#define true        1

typedef uint8_t byte;

typedef volatile uint8_t ioport_t;

static inline ioport_t tbi(ioport_t *port, int bit)
{
    return *port & (1 << bit);
}

static inline void sbi(ioport_t *port, int bit)
{
    *port |= (1 << bit);
}

static inline void cbi(ioport_t *port, int bit)
{
    *port &= ~(1 << bit);
}

static inline void xbi(ioport_t *port, int bit)
{
    *port ^= (1 << bit);
}