Main Page Data Structures File List Data Fields Globals Related Pages

# clib/fossil.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | FossilDriverInfo_t
## Defines
#define | FOSSIL_EXT 0
#define | FOSSIL_COM 1
#define | FOSSIL_PARITY_NO 0
#define | FOSSIL_PARITY_ODD 1
#define | FOSSIL_PARITY_EVEN 2
#define | FOSSIL_PARITY_MARK 3
#define | FOSSIL_PARITY_SPACE 4
#define | FOSSIL_OUTPUT_BUFFER_EMPTY 0x40
#define | FOSSIL_OUTPUT_NOT_FULL 0x20
#define | FOSSIL_LINE_BREAK 0x10
#define | FOSSIL_FRAMING_ERROR 0x08
#define | FOSSIL_PARITY_ERROR 0x04
#define | FOSSIL_OVERRUN_ERROR 0x02
#define | FOSSIL_DATA_AVAILABLE 0x01
#define | FOSSIL_FLOWCTRL_OFF 0x00
#define | FOSSIL_FLOWCTRL_XONXOFF_SEND 0x01
#define | FOSSIL_FLOWCTRL_RTSCTS 0x02
#define | FOSSIL_FLOWCTRL_XONXOFF_RECV 0x08
#define | FOSSIL_RS485_LOWACTIVE 0
#define | FOSSIL_RS485_HIGHACTIVE 1
#define | FOSSIL_RS485_DISABLE 2
## Functions
int | fossil_init (int port)
void | fossil_deinit (int port)
int | fossil_setbaud (int port, long baudrate, int parity, int wordlen, int stopbits)
int | fossil_putbyte_wait (int port, int ch)
int | fossil_putbyte (int port, int ch)
int | fossil_getbyte_wait (int port)
int | fossil_peek_input (int port)
int | fossil_status_request (int port)
void | fossil_flush_output (int port)
void | fossil_purge_output (int port)
void | fossil_purge_input (int port)
void | fossil_set_flowcontrol (int port, int flowctrl)
unsigned int | fossil_readblock (int port, unsigned char *buffer, unsigned int count)
unsigned int | fossil_writeblock (int port, unsigned char *buffer, unsigned int count)
void | fossil_set_rs485 (int port, int mode)
void | fossil_set_rs485_txenable (int port, int pin)
void | fossil_set_extctrl (int port, int divider, int parity, int wordlen, int stopbits)
int | fossil_get_driver_info (int port, FossilDriverInfo_t *drv_info)
void | fossil_send_break (int port, unsigned char longbreak)
int | fossil_get_bytes_in_uart (int port)

## Define Documentation

#define FOSSIL_COM 1

| Definition at line 53 of file fossil.h.

#define FOSSIL_DATA_AVAILABLE 0x01

| Definition at line 69 of file fossil.h.

#define FOSSIL_EXT 0

| Definition at line 52 of file fossil.h.

#define FOSSIL_FLOWCTRL_OFF 0x00

| Definition at line 72 of file fossil.h.

#define FOSSIL_FLOWCTRL_RTSCTS 0x02

| Definition at line 74 of file fossil.h.

#define FOSSIL_FLOWCTRL_XONXOFF_RECV 0x08

| Definition at line 75 of file fossil.h.

#define FOSSIL_FLOWCTRL_XONXOFF_SEND 0x01

| Definition at line 73 of file fossil.h.

#define FOSSIL_FRAMING_ERROR 0x08

| Definition at line 66 of file fossil.h.

#define FOSSIL_LINE_BREAK 0x10

| Definition at line 65 of file fossil.h.

#define FOSSIL_OUTPUT_BUFFER_EMPTY 0x40

| Definition at line 63 of file fossil.h.

#define FOSSIL_OUTPUT_NOT_FULL 0x20

| Definition at line 64 of file fossil.h.

#define FOSSIL_OVERRUN_ERROR 0x02

| Definition at line 68 of file fossil.h.

#define FOSSIL_PARITY_ERROR 0x04

| Definition at line 67 of file fossil.h.

#define FOSSIL_PARITY_EVEN 2

| Definition at line 58 of file fossil.h.

#define FOSSIL_PARITY_MARK 3

| Definition at line 59 of file fossil.h.

#define FOSSIL_PARITY_NO 0

| Definition at line 56 of file fossil.h.

#define FOSSIL_PARITY_ODD 1

| Definition at line 57 of file fossil.h.

#define FOSSIL_PARITY_SPACE 4

| Definition at line 60 of file fossil.h.

#define FOSSIL_RS485_DISABLE 2

| Definition at line 80 of file fossil.h.

#define FOSSIL_RS485_HIGHACTIVE 1

| Definition at line 79 of file fossil.h.

#define FOSSIL_RS485_LOWACTIVE 0

| Definition at line 78 of file fossil.h.

## Function Documentation

void fossil_deinit | ( | int | port | ) |

| Definition at line 87 of file fossil.c. References FOSSILVECT.

void fossil_flush_output | ( | int | port | ) |

| Definition at line 305 of file fossil.c. References FOSSILVECT.

int fossil_get_bytes_in_uart | ( | int | port | ) |

| Definition at line 581 of file fossil.c. References FOSSILVECT.

int fossil_get_driver_info | ( | int | port,
|  | FossilDriverInfo_t * | drv_info
| ) |

| Definition at line 532 of file fossil.c. References FOSSILVECT.

int fossil_getbyte_wait | ( | int | port | ) |

| Definition at line 238 of file fossil.c. References FOSSILVECT.

int fossil_init | ( | int | port | ) |

| Definition at line 64 of file fossil.c. References FOSSILVECT.

int fossil_peek_input | ( | int | port | ) |

| Definition at line 258 of file fossil.c. References FOSSILVECT.

void fossil_purge_input | ( | int | port | ) |

| Definition at line 341 of file fossil.c. References FOSSILVECT.

void fossil_purge_output | ( | int | port | ) |

| Definition at line 323 of file fossil.c. References FOSSILVECT.

int fossil_putbyte | ( | int | port,
|  | int | ch
| ) |

| Definition at line 217 of file fossil.c. References FOSSILVECT.

int fossil_putbyte_wait | ( | int | port,
|  | int | ch
| ) |

| Definition at line 194 of file fossil.c. References FOSSILVECT.

unsigned int fossil_readblock | ( | int | port,
|  | unsigned char * | buffer,
|  | unsigned int | count
| ) |

| Definition at line 390 of file fossil.c. References FOSSILVECT.

void fossil_send_break | ( | int | port,
|  | unsigned char | longbreak
| ) |

| Definition at line 560 of file fossil.c. References FOSSILVECT.

void fossil_set_extctrl | ( | int | port,
|  | int | divider,
|  | int | parity,
|  | int | wordlen,
|  | int | stopbits
| ) |

| Definition at line 503 of file fossil.c. References FOSSILVECT.

void fossil_set_flowcontrol | ( | int | port,
|  | int | flowctrl
| ) |

| Definition at line 368 of file fossil.c. References FOSSILVECT.

void fossil_set_rs485 | ( | int | port,
|  | int | mode
| ) |

| Definition at line 447 of file fossil.c. References FOSSILVECT.

void fossil_set_rs485_txenable | ( | int | port,
|  | int | pin
| ) |

| Definition at line 474 of file fossil.c. References FOSSILVECT.

int fossil_setbaud | ( | int | port,
|  | long | baudrate,
|  | int | parity,
|  | int | wordlen,
|  | int | stopbits
| ) |

| Definition at line 119 of file fossil.c.

int fossil_status_request | ( | int | port | ) |

| Definition at line 286 of file fossil.c. References FOSSILVECT.

unsigned int fossil_writeblock | ( | int | port,
|  | unsigned char * | buffer,
|  | unsigned int | count
| ) |

| Definition at line 416 of file fossil.c. References FOSSILVECT.