Main Page | Class List | File List | Class Members | File Members | Related Pages

src/drivers/uart_serial.c File Reference

ISO 9141 data link layer protocol. More...

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/types.h>
#include <assert.h>
#include <termios.h>
#include <linux/serial.h>
#include <sys/ioctl.h>
#include <time.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <otto/otto.h>
#include <otto/packet.h>
#include <otto/device.h>
#include <otto/control.h>


struct  uart_serial_priv
 Driver specific private data for open driver. More...


const char _ID_[] __attribute__ ((unused))="$Id: uart_serial.c,v 1.9 2004/07/07 22:07:11 alpha Exp $"
int uart_serial_write_half_duplex (int fd, const void *buf, size_t count)
int uart_serial_read_flush (struct otto_device *dev)
int uart_serial_init_fast (struct otto_device *dev)
int uart_serial_init_slow (struct otto_device *dev, unsigned char adr)
int uart_serial_control_sbusrate (struct otto_device *dev, int rate)
otto_deviceuart_serial_open (const char *fname)
int uart_serial_close (struct otto_device *dev)
int uart_serial_read (struct otto_device *dev, int bus, union otto_packet *pkt)
int uart_serial_write (struct otto_device *dev, int bus, union otto_packet *pkt)
int uart_serial_control (struct otto_device *dev, int bus, void *data, int cmd)
void __attribute ((constructor))


const int UART_SERIAL_DEFAULT_RATE = 10400
otto_driver uart_serial_drv

Detailed Description

ISO 9141 data link layer protocol.

keep alive?

maintain list of open devices?

keep timestamp of last rx?

Function Documentation

void __attribute (constructor)   )  [static]

const char _ID_ [] __attribute__ (unused)   )  [static]

int uart_serial_close struct otto_device dev  )  [static]

int uart_serial_control struct otto_device dev,
int  bus,
void *  data,
int  cmd

int uart_serial_control_sbusrate struct otto_device dev,
int  rate

int uart_serial_init_fast struct otto_device dev  )  [static]

int uart_serial_init_slow struct otto_device dev,
unsigned char  adr

struct otto_device* uart_serial_open const char *  fname  )  [static]

initialize busses (only 1)

int uart_serial_read struct otto_device dev,
int  bus,
union otto_packet pkt

int uart_serial_read_flush struct otto_device dev  )  [static]

int uart_serial_write struct otto_device dev,
int  bus,
union otto_packet pkt

int uart_serial_write_half_duplex int  fd,
const void *  buf,
size_t  count

save read data in case match is wrong

drain read buffer before writing

Variable Documentation

const int UART_SERIAL_DEFAULT_RATE = 10400 [static]

struct otto_driver uart_serial_drv [static]

Initial value:

{ .name = "uart_serial", .desc = "Device driver for a ISO 9141 bus over a serial port", .author = "Darius Rad <>", .license = "GPL", .open = uart_serial_open, .close = uart_serial_close, .write = uart_serial_write, .read = uart_serial_read, .control = uart_serial_control, }

Generated on Thu Jul 8 19:26:07 2004 for OpenOtto by doxygen 1.3.7