Arguments, Serial functions structure – Comtrol eCos User Manual

Page 382

Advertising
background image

Chapter 17. How to Write a Driver

Arguments

l

The "C" label for this structure.

funs

The set of interface functions (see below).

dev_priv

A placeholder for any device specific data for this channel.

baud

The initial baud rate value (cyg_serial_baud_t).

stop

The initial stop bits value (cyg_serial_stop_bits_t).

parity

The initial parity mode value (cyg_serial_parity_t).

word_length

The initial word length value (cyg_serial_word_length_t).

flags

The initial driver flags value.

out_buf

Pointer to the output buffer.

NULL

if none required.

out_buflen

The length of the output buffer.

in_buf

pointer to the input buffer.

NULL

if none required.

in_buflen

The length of the input buffer.

If either buffer length is zero, no buffering will take place in that direction and only polled mode functions will be
used.

The interface from the hardware independent driver into the hardware interface module is contained in the

funs

table. This is defined by the macro:

278

Advertising