inspektors/base_station/include/common.h

13 lines
341 B
C
Raw Normal View History

2018-01-02 13:45:56 +02:00
#ifndef COMMON_H
#define COMMON_H
2018-01-02 19:14:50 +02:00
#include <stdint.h>
#define BIT(mask) (1 << (mask))
#define SET(var, mask) ((var) |= (uint8_t)BIT(mask))
#define CLR(var, mask) ((var) &= (uint8_t)~(BIT(mask)))
#define CHK(var, mask) ((var) & (uint8_t)BIT(mask))
2018-01-17 18:08:58 +02:00
#define TOG(var, mask) ((var) ^= (uint8_t)BIT(mask))
2018-01-02 13:45:56 +02:00
#endif /* COMMON_H */