libicsc  1.0.0
 All Data Structures Files Functions Modules
Functions
Initialization

Functions used for initializing and finisging with an ICSC instance. More...

Functions

icsc_ptr icsc_init_de (const char *uart, unsigned long baud, uint8_t station, int de)
 Create a new ICSC context, initialize the hardware, and start listening for messages. More...
 
icsc_ptr icsc_init (const char *uart, unsigned long baud, uint8_t station)
 Create a new ICSC context, initialize the hardware, and start listening for messages. More...
 
int icsc_close (icsc_ptr icsc)
 Close an ICSC instance freeing the memory. Terminates all communication. More...
 

Detailed Description

Functions used for initializing and finisging with an ICSC instance.

Function Documentation

int icsc_close ( icsc_ptr  icsc)

Close an ICSC instance freeing the memory. Terminates all communication.

Parameters
icscPointer to an icsc context created using icsc_init() or icsc_init_de()
Returns
0 on success or -1 on error.
icsc_ptr icsc_init ( const char *  uart,
unsigned long  baud,
uint8_t  station 
)

Create a new ICSC context, initialize the hardware, and start listening for messages.

Parameters
uartThe path name of the UART device to communicate with (e.g., /dev/ttyAMA0)
baudThe baud rate symbolic name in the form Bxxxx (e.g., B115200)
stationThe station number of this device
Returns
The pointer to the newly created context.
icsc_ptr icsc_init_de ( const char *  uart,
unsigned long  baud,
uint8_t  station,
int  de 
)

Create a new ICSC context, initialize the hardware, and start listening for messages.

Parameters
uartThe path name of the UART device to communicate with (e.g., /dev/ttyAMA0)
baudThe baud rate symbolic name in the form Bxxxx (e.g., B115200)
stationThe station number of this device
deThe GPIO number to use for the RS-485 DE pin.
Returns
The pointer to the newly created context.