IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


Fossil API for Serial Ports


Detailed Description

Here is the API definition for access to the serial ports.

Functions

int fossil_initmode (int port, BOOL dcd, BOOL txDMA, BOOL rxDMA)
 Initialize the serial fossil driver for specified port.
void fossil_deinit (int port)
 Deinitialize the serial fossil driver for specified port.
int fossil_setbaud (int port, long baudrate, FOSSIL_PARITY parity, int wordlen, int stopbits)
 Set baud rate and port configuration for specified port.
void fossil_set_multidrop (int port, FOS_MULTIDROP_MODE mode)
 Set the current multidrop mode.
void fossil_set_flowcontrol (int port, FOS_FLOW_CTRL modeMask)
 Enable/Disable flow control for specified port.
void fossil_force_rts (int port, FOS_RTS_MODE mode)
 Force RTS# to low, high or reset to normal activity.
BYTE fossil_read_cts (int port)
 Read level on CTS# pin.
BYTE fossil_cts_changed (int port)
 Read if state of CTS# pin has changed.
BYTE fossil_read_dcd (int port)
 Read level on DCD# pin.
BYTE fossil_dcd_changed (int port)
 Read if state of DCD# pin has changed.
int fossil_status_request (int port)
 Get the serial port status.
int fossil_get_driver_info (int port, FossilDriverInfo_t *drv_info)
 Get driver information.
int fossil_get_bytes_in_uart (int port)
 Get number of bytes currently in UART hardware transmit buffers.
void fossil_set_rs485 (int port, RS485_MODE mode)
 Enable/Disable the RS485 mode.
void fossil_enable_transmitter (int port, FOS_TXRX_MODE mode)
 Enable/Disable the UART transmitter.
void fossil_enable_receiver (int port, FOS_TXRX_MODE mode)
 Enable/Disable the UART receiver.
int fossil_putbyte_wait (int port, int ch)
 Put byte in output buffer, wait if needed.
int fossil_putbyte (int port, int ch)
 Put byte in output buffer, without wait.
unsigned int fossil_writeblock (int port, const BYTE *buffer, unsigned int count)
 Write a block of data to output buffer, without wait.
void fossil_writeblock_wait (int port, const BYTE *buffer, unsigned int count)
 Write a block of data to output buffer, wait if needed.
int fossil_output_done (int port)
 Check if output buffer and transmitter are empty.
void fossil_flush_output (int port)
 Flush output buffer, await empty transmit buffer.
void fossil_purge_output (int port)
 Purge output buffer and discard the data.
void fossil_send_break (int port, FOS_BREAK_SIZE break_size)
 Send break signal.
int fossil_data_avail (int port)
 Check if serial data bytes are available.
int fossil_getbyte_wait (int port)
 Get byte from serial input buffer, wait if needed.
int fossil_getbyte (int port)
 Get byte from serial input buffer, do not wait.
int fossil_peek_input (int port)
 Peek if next byte is available.
unsigned int fossil_readblock (int port, BYTE *buffer, unsigned int count)
 Read block of data from serial input buffer, do not wait.
void fossil_readblock_wait (int port, BYTE *buffer, unsigned int count)
 Read block of data from serial input buffer, wait if needed.
void fossil_purge_input (int port)
 Purge input buffer and discard the data.
int fossil_register_external_port (int port, FossilExternalPortCallbacks *callbacks)
 Register an external port.
int fossil_unregister_external_port (int port)
 Unregister an external port.
void fossil_user_callback (int port, FOSSIL_USER_CALLBACK pfFossUCB)
 Install a fossil user callback function.





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:36 2017 by Doxygen 1.6.1