STRUCT W1_BUS_MASTER(9) | W1 API internal to the kernel | STRUCT W1_BUS_MASTER(9) |
NAME¶
struct_w1_bus_master - operations available on a bus master
SYNOPSIS¶
struct w1_bus_master {
void * data;
u8 (* read_bit) (void *);
void (* write_bit) (void *, u8);
u8 (* touch_bit) (void *, u8);
u8 (* read_byte) (void *);
void (* write_byte) (void *, u8);
u8 (* read_block) (void *, u8 *, int);
void (* write_block) (void *, const u8 *, int);
u8 (* triplet) (void *, u8);
u8 (* reset_bus) (void *);
u8 (* set_pullup) (void *, int);
void (* search) (void *, struct w1_master *,u8, w1_slave_found_callback); };
MEMBERS¶
void * data
u8 (*)(void *) read_bit
void (*)(void *, u8) write_bit
u8 (*)(void *, u8) touch_bit
u8 (*)(void *) read_byte
void (*)(void *, u8) write_byte
u8 (*)(void *, u8 *, int) read_block
void (*)(void *, const u8 *, int) write_block
u8 (*)(void *, u8) triplet
u8 (*)(void *) reset_bus
u8 (*)(void *, int) set_pullup
void (*)(void *, struct w1_master *,u8, w1_slave_found_callback) search
NOTE¶
read_bit and write_bit are very low level functions and should only be used with hardware that doesn't really support 1-wire operations, like a parallel/serial port. Either define read_bit and write_bit OR define, at minimum, touch_bit and reset_bus.
AUTHOR¶
David Fries <David@Fries.net>
COPYRIGHT¶
June 2017 | Kernel Hackers Manual 4.11 |