|
Z-Wave Protocol Controller Reference
|
Serial Port API for the Z-Wave module. Used for low level read/write functions to the serial port. More...
Go to the source code of this file.
Functions | |
| int | zwapi_serial_init (const char *serial_port) |
| Initialize the serial port to 115200 BAUD 8N1. More... | |
| void | zwapi_serial_close (void) |
| De-Initialize the serial port. More... | |
| int | zwapi_serial_restart (void) |
| Closes and re-initialize the last open serial port. More... | |
| int | zwapi_serial_get_byte (uint8_t *c) |
| Reads a byte from the serial port device. More... | |
| void | zwapi_serial_put_byte (uint8_t c) |
| Write a byte to serial port device. More... | |
| int | zwapi_serial_get_buffer (uint8_t *c, int len) |
| Reads the output of the serial port device and stores the content in a buffer. More... | |
| void | zwapi_serial_put_buffer (uint8_t *c, int len) |
| Writes the content of a buffer to the serial port device. More... | |
| bool | zwapi_serial_is_file_available (void) |
| Check the file descriptor for the serial device is available for I/O operations. More... | |
| void | zwapi_serial_drain_buffer (void) |
| Flush the serial output if using buffered output. More... | |
| sl_status_t | zwapi_serial_log_to_file_disable () |
| Disable/stop logging serial data to file. More... | |
| sl_status_t | zwapi_serial_log_to_file_enable (const char *filename) |
| Enable logging of serial data to a file. More... | |
Serial Port API for the Z-Wave module. Used for low level read/write functions to the serial port.
| void zwapi_serial_close | ( | void | ) |
De-Initialize the serial port.
aka SerialClose
| void zwapi_serial_drain_buffer | ( | void | ) |
Flush the serial output if using buffered output.
This function calls tcdrain, which waits that the TTY buffer data has been written to the hardware.
aka SerialFlush
| int zwapi_serial_get_buffer | ( | uint8_t * | c, |
| int | len | ||
| ) |
Reads the output of the serial port device and stores the content in a buffer.
| c | buffer to store data from serial port to. |
| len | length of buffer. |
aka SerialGetBuffer
| int zwapi_serial_get_byte | ( | uint8_t * | c | ) |
Reads a byte from the serial port device.
| c | char to store data from serial port to. |
aka SerialGetByte
| int zwapi_serial_init | ( | const char * | serial_port | ) |
Initialize the serial port to 115200 BAUD 8N1.
aka SerialInit
| bool zwapi_serial_is_file_available | ( | void | ) |
Check the file descriptor for the serial device is available for I/O operations.
aka SerialCheck
| sl_status_t zwapi_serial_log_to_file_disable | ( | ) |
Disable/stop logging serial data to file.
This will stop the logging of serial data to file.
| sl_status_t zwapi_serial_log_to_file_enable | ( | const char * | filename | ) |
Enable logging of serial data to a file.
The log will append to the file, it is up to the user to handle log rotation, free disk space monitoring etc.
| filename | file to log serial trace to, log will append to this file. |
| void zwapi_serial_put_buffer | ( | uint8_t * | c, |
| int | len | ||
| ) |
Writes the content of a buffer to the serial port device.
| c | buffer with data to write to serial port. |
| len | length of data in buffer. |
aka SerialPutBuffer
| void zwapi_serial_put_byte | ( | uint8_t | c | ) |
Write a byte to serial port device.
aka SerialPutByte
| int zwapi_serial_restart | ( | void | ) |
Closes and re-initialize the last open serial port.
aka SerialRestart