3 * - By John Hodge (thePowersGang)
6 * - Wrapper for 'Serial' ports (UARTs and the like)
8 #ifndef _META_SERIAL_H_
9 #define _META_SERIAL_H_
11 typedef struct sSerialPort tSerialPort;
12 typedef struct sSerialHandler tSerialHandlers;
14 typedef int (*tSerial_SetFmt)(void *Handle, Uint32 Format);
15 typedef int (*tSerial_CanSend)(void *Handle);
16 typedef size_t (*tSerial_Send)(void *Handle, size_t Bytes, const void *Data);
21 tSerial_SetFmt SetFmt;
22 tSerial_CanSend CanSend;
26 extern tSerialPort *Serial_AddPort(tSerialHandlers *Handlers, void *Handle, const char *Ident);
27 extern void Serial_RemovePort(tSerialPort *Port);
28 extern void Serial_RecieveData(tSerialPort *Port, size_t Bytes, const void *Data);