MIP_SDK  latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
Classes | Typedefs | Functions

A simple implementation for reading and writing to/from a serial port. More...

Classes

struct  serial_port
 

Typedefs

typedef struct serial_port serial_port
 

Functions

void serial_port_init (serial_port *port)
 
bool serial_port_open (serial_port *port, const char *port_str, int baudrate)
 
bool serial_port_set_baudrate (serial_port *port, int baudrate)
 
bool serial_port_close (serial_port *port)
 
bool serial_port_write (serial_port *port, const void *buffer, size_t num_bytes, size_t *bytes_written)
 
bool serial_port_read (serial_port *port, void *buffer, size_t num_bytes, int wait_time, size_t *bytes_read)
 
uint32_t serial_port_read_count (serial_port *port)
 
bool serial_port_is_open (const serial_port *port)
 

Detailed Description

A simple implementation for reading and writing to/from a serial port.

Typedef Documentation

◆ serial_port

typedef struct serial_port serial_port

Function Documentation

◆ serial_port_close()

bool serial_port_close ( serial_port port)

◆ serial_port_init()

void serial_port_init ( serial_port port)

◆ serial_port_is_open()

bool serial_port_is_open ( const serial_port port)

◆ serial_port_open()

bool serial_port_open ( serial_port port,
const char *  port_str,
int  baudrate 
)

◆ serial_port_read()

bool serial_port_read ( serial_port port,
void *  buffer,
size_t  num_bytes,
int  wait_time,
size_t *  bytes_read 
)

◆ serial_port_read_count()

uint32_t serial_port_read_count ( serial_port port)

◆ serial_port_set_baudrate()

bool serial_port_set_baudrate ( serial_port port,
int  baudrate 
)

◆ serial_port_write()

bool serial_port_write ( serial_port port,
const void *  buffer,
size_t  num_bytes,
size_t *  bytes_written 
)