src/stdlib.h
author Tero Marttila <terom@paivola.fi>
Fri, 02 May 2014 00:10:14 +0300
changeset 86 61925fb4947e
parent 58 a445e08b63e0
permissions -rw-r--r--
split ledbars into two groups
#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);
}