author | Tero Marttila <terom@paivola.fi> |
Wed, 24 Sep 2014 22:54:09 +0300 | |
changeset 4 | 959d4b9c3f0a |
parent 0 | 893a25a6c372 |
child 6 | c5ab059eadc1 |
permissions | -rw-r--r-- |
#ifndef QMSK_ARDUINO_STDLIB_H #define QMSK_ARDUINO_STDLIB_H #include <stdint.h> #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); } #endif