src/stdlib.h
author Tero Marttila <terom@paivola.fi>
Sun, 20 Apr 2014 22:47:41 +0300
changeset 78 504c2310cddb
parent 58 a445e08b63e0
permissions -rw-r--r--
timer: continuous interval-sleep operation
#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);
}