#ifndef __BASE_H__ #define __BASE_H__ typedef struct IO_PIN { volatile uint8_t *port; uint8_t pin; } io_pin_t; inline void set_pin(io_pin_t *pin) { *(pin->port) |= 1 << pin->pin; } inline void clear_pin(io_pin_t *pin) { *(pin->port) &= 0xff ^ (1 << pin->pin); } #endif