osd-contiki/libmc1322x/include/utils.h
Mariano Alvira d0f8336f13 sleep.
had to comment out radio_off since I don't have the maca stuff moved
over yet.
2010-02-26 16:37:20 -05:00

15 lines
379 B
C

#ifndef UTILS_H
#define UTILS_H
#define mem32(x) ((volatile uint32_t *)(x))
#define mem16(x) ((volatile uint16_t *)(x))
#define CAT2(x, y, z) x##y##z
#define bit(bit) (1 << bit)
#define bit_is_set(val, bit) (((val & (1 << bit)) >> bit) == 1)
#define clear_bit(val, bit) (val = (val & ~(1 << bit)))
#define set_bit(val, bit) (val = (val | (1 << bit)))
#endif /* UTILS_H */