uint32_t sl_status_t
Definition: sl_status.h:139
int zwapi_serial_init(const char *serial_port)
Initialize the serial port to 115200 BAUD 8N1.
Definition: zwapi_serial.c:141
void zwapi_serial_drain_buffer(void)
Flush the serial output if using buffered output.
Definition: zwapi_serial.c:316
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.
Definition: zwapi_serial.c:220
void zwapi_serial_put_byte(uint8_t c)
Write a byte to serial port device.
Definition: zwapi_serial.c:215
bool zwapi_serial_is_file_available(void)
Check the file descriptor for the serial device is available for I/O operations.
Definition: zwapi_serial.c:289
sl_status_t zwapi_serial_log_to_file_enable(const char *filename)
Enable logging of serial data to a file.
Definition: zwapi_serial.c:161
sl_status_t zwapi_serial_log_to_file_disable()
Disable/stop logging serial data to file.
Definition: zwapi_serial.c:184
int zwapi_serial_restart(void)
Closes and re-initialize the last open serial port.
Definition: zwapi_serial.c:200
void zwapi_serial_close(void)
De-Initialize the serial port.
Definition: zwapi_serial.c:194
int zwapi_serial_get_byte(uint8_t *c)
Reads a byte from the serial port device.
Definition: zwapi_serial.c:210
void zwapi_serial_put_buffer(uint8_t *c, int len)
Writes the content of a buffer to the serial port device.
Definition: zwapi_serial.c:252