Data Structures | |
struct | _NUTOWIINFO_UART |
OWI runtime control block container. More... | |
Defines | |
#define | OWI_UART_WRITE_RST 0xf0 |
Data to send on the UART for the OWI primitives. | |
#define | OWI_UART_WRITE_ONE 0xff |
UART data for write '1' and read. | |
#define | OWI_UART_WRITE_ZERO 0x00 |
UART data for write '0'. | |
#define | OWI_UART_READ_ONE 0x01 |
Data to expect from the UART for the OWI primitives. | |
#define | OWI_UART_BAUD_RESET 9600 |
Baud rates to use for OWI primitives. | |
#define | OWI_UART_BAUD_RWBIT 115200 |
UART baudrate for RW bit. | |
Typedefs | |
typedef struct _NUTOWIINFO_UART | NUTOWIINFO_UART |
Functions | |
int | NutRegisterOwiBus_Uart (NUTOWIBUS *bus, NUTDEVICE *uart, int pullup_port, uint_fast8_t pullup_pin) |
Register the One-Wire bus. |
#define OWI_UART_WRITE_RST 0xf0 |
Data to send on the UART for the OWI primitives.
UART data for presence impulse.
#define OWI_UART_WRITE_ONE 0xff |
UART data for write '1' and read.
#define OWI_UART_WRITE_ZERO 0x00 |
UART data for write '0'.
#define OWI_UART_READ_ONE 0x01 |
Data to expect from the UART for the OWI primitives.
UART data received for read '1'.
#define OWI_UART_BAUD_RESET 9600 |
Baud rates to use for OWI primitives.
UART baudrate for presence impulse.
#define OWI_UART_BAUD_RWBIT 115200 |
UART baudrate for RW bit.
typedef struct _NUTOWIINFO_UART NUTOWIINFO_UART |
int NutRegisterOwiBus_Uart | ( | NUTOWIBUS * | bus, |
NUTDEVICE * | uart, | ||
int | pullup_port, | ||
uint_fast8_t | pullup_pin | ||
) |
Register the One-Wire bus.
bus | The returned NUTOWIBUS. |
uart | The UART device to use. |
pullup_port | If given, port to control strong pull-up for parasitic powered devices. |
pullup_pin | The pin to control strong pull-up for parasitic powered devices. |
References _ioctl(), _O_BINARY, _O_RDWR, _open(), calloc, _NUTDEVICE::dev_name, _NUTOWIBUS::mode, NULL, NutRegisterDevice(), OWI_INVALID_HW, OWI_OUT_OF_MEM, OWI_SUCCESS, _NUTOWIBUS::owibus_info, _NUTOWIBUS::OwiReadBlock, _NUTOWIBUS::OwiTouchReset, _NUTOWIBUS::OwiWriteBlock, _NUTOWIINFO_UART::uart_fd, UART_SETREADTIMEOUT, and UART_SETSTOPBITS.