HALFRED  0.4.0
Enumerations | Functions
hal_ioserial.h File Reference

Serial port API. More...

Detailed Description

Serial port API.

Purpose
HALFRED Hardware Abstraction Layer
Version
Revision
1500
License
$License$
#include <stdbool.h>

Go to the source code of this file.

Enumerations

enum  IOSERIAL_NumberOfDataBits {
  IOSERIAL_DATABITS_8, IOSERIAL_DATABITS_5, IOSERIAL_DATABITS_6, IOSERIAL_DATABITS_7,
  IOSERIAL_DATABITS_9
}
 
enum  IOSERIAL_Parity {
  IOSERIAL_PARITY_NONE, IOSERIAL_PARITY_ODD, IOSERIAL_PARITY_EVEN, IOSERIAL_PARITY_MARK,
  IOSERIAL_PARITY_SPACE
}
 
enum  IOSERIAL_NumberOfStopBits { IOSERIAL_STOPBITS_1, IOSERIAL_STOPBITS_1_5, IOSERIAL_STOPBITS_2 }
 
enum  IOSERIAL_Handshaking { IOSERIAL_HANDSHAKING_NONE, IOSERIAL_HANDSHAKING_RTS_CTS }
 

Functions

unsigned int IOSERIAL_Enumerate (void)
 
const char * IOSERIAL_GetEnumeratedDeviceName (unsigned int index)
 
IODevice IOSERIAL_Create (const char *name)
 
void IOSERIAL_Destroy (IODevice serial)
 
HALRESULT IOSERIAL_SetBaudrate (IODevice serial, uint32_t baudrate)
 
uint32_t IOSERIAL_GetBaudrate (IODevice serial)
 
HALRESULT IOSERIAL_SetFrameFormat (IODevice serial, IOSERIAL_NumberOfDataBits data_bits, IOSERIAL_Parity parity, IOSERIAL_NumberOfStopBits stop)
 
HALRESULT IOSERIAL_GetFrameFormat (IODevice serial, IOSERIAL_NumberOfDataBits *data_bits, IOSERIAL_Parity *parity, IOSERIAL_NumberOfStopBits *stop)
 
HALRESULT IOSERIAL_SetHandshaking (IODevice serial, IOSERIAL_Handshaking handshaking)
 
IOSERIAL_Handshaking IOSERIAL_GetHandshaking (IODevice serial)
 
HALRESULT IOSERIAL_EnableRTS (IODevice serial)
 
HALRESULT IOSERIAL_DisableRTS (IODevice serial)
 
HALRESULT IOSERIAL_SetRTS (IODevice serial, bool rts)
 
bool IOSERIAL_GetRTS (IODevice serial)
 
HALRESULT IOSERIAL_EnableCTS (IODevice serial)
 
HALRESULT IOSERIAL_DisableCTS (IODevice serial)
 
HALRESULT IOSERIAL_SetCTS (IODevice serial, bool cts)
 
bool IOSERIAL_GetCTS (IODevice serial)