fplayer
C99 Falcon Sequence (fseq) file player for Light-O-Rama hardware (like xLights)
Loading...
Searching...
No Matches
serial.h
Go to the documentation of this file.
1
3#ifndef FPLAYER_SERIAL_H
4#define FPLAYER_SERIAL_H
5
6#include <stdint.h>
7
8#include "sl.h"
9
12struct serialdev_s;
13
20int Serial_init(struct serialdev_s** sdev, const char* devName, int baudRate);
21
27void Serial_write(struct serialdev_s* sdev,
28 const uint8_t* b,
29 unsigned long size);
30
33void Serial_drain(struct serialdev_s* sdev);
34
37void Serial_close(struct serialdev_s* sdev);
38
42slist_t* Serial_getPorts(void);
43
44#endif//FPLAYER_SERIAL_H
void Serial_write(struct serialdev_s *sdev, const uint8_t *b, unsigned long size)
Writes the binary data to the open serial port. The data is copied to an internal buffer and written ...
Definition serial.c:135
void Serial_close(struct serialdev_s *sdev)
Closes the open serial device and frees all resources.
Definition serial.c:159
int Serial_init(struct serialdev_s **sdev, const char *devName, int baudRate)
Initializes a write-mode serial port with the provided device name and baud rate pre-configured for u...
Definition serial.c:71
slist_t * Serial_getPorts(void)
Retrieves a list of available serial ports. The caller is responsible for freeing the list with slfre...
Definition serial.c:168
void Serial_drain(struct serialdev_s *sdev)
Waits for all data to be written to the serial device.
Definition serial.c:151
Serial port communication device.
Definition serial.c:14