src/stdlib.h
author Tero Marttila <terom@paivola.fi>
Thu, 30 Jul 2015 02:45:08 +0300
changeset 116 8d42dba32bb7
parent 58 a445e08b63e0
permissions -rw-r--r--
fixup namespace package for python3.3 style implict namespace package directories
#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);
}