set DIO dir con read_bit and write_bit