37 template <
typename bus,
int base,
int address >
41 ( (
int)bus::type == bmptk::type_i2c_bus ),
42 "bus must be an i2c bus"
51 static void set(
unsigned int x ){
53 bus::put_byte( base + ( address << 1 ) );
61 static unsigned int get(){
63 bus::put_byte( base + (( address << 1 ) | 0x01 ));
65 unsigned int result = bus::get_byte();
73 template<
typename bus,
int address = 0 >
75 pcf8574x_channel< bus, 0x40, address > >{};
78 template<
typename bus,
int address = 0 >
80 pcf8574x_channel< bus, 0x70, address > >{};