Subversion Repositories group.electronics

Rev

Rev 123 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef MIO_H
#define MIO_H

struct {
        uint8_t i2c_addr;
} mio;


inline uint8_t mio_readPin(uint8_t pin);
inline uint8_t mio_read(void);
inline void mio_latch(uint8_t data);
void mio_latchPin(uint8_t pin, uint8_t value);

inline void mio_iodir(uint8_t dir);

inline void mio_pullups(uint8_t pu);

void mio_init();
void mio_init_addr(uint8_t i2c_addr);
uint8_t mio_readReg(uint8_t address);
void mio_writeReg(uint8_t address, uint8_t reg);

#endif