00001 #ifndef PORTS_H 00002 #define PORTS_H 00003 00004 #include <stdint.h> 00005 #include "common.h" 00006 00007 00026 typedef struct GATE_PORT_ { 00027 uint8_t number; 00028 uint8_t* PORT; 00029 uint8_t* PIN; 00030 uint8_t* DDR; 00031 uint8_t default_busy_mask; 00032 uint8_t busy_mask; 00033 struct GATE_PORT_* next; 00034 } GATE_PORT; 00035 00042 GATE_RESULT gate_port_register(uint8_t number, GATE_PORT* spec); 00043 00054 GATE_RESULT gate_port_config(uint8_t number, uint8_t mask, uint8_t value); 00055 00064 GATE_RESULT gate_port_write(uint8_t number, uint8_t mask, uint8_t value); 00065 00070 GATE_RESULT gate_port_read(uint8_t number, uint8_t* bits); 00071 00081 GATE_RESULT gate_port_reserve(uint8_t number, uint8_t mask, uint8_t value); 00082 00083 GATE_PORT* find_port(uint8_t number); 00084 00087 #endif
1.5.6