INET Framework for OMNeT++/OMNEST
|
#include "lwip/arch.h"
Macros | |
#define | __SIO_H__ |
Typedefs | |
typedef void * | sio_fd_t |
Functions | |
sio_fd_t | sio_open (u8_t devnum) |
Opens a serial device for communication. More... | |
void | sio_send (u8_t c, sio_fd_t fd) |
Sends a single character to the serial device. More... | |
u8_t | sio_recv (sio_fd_t fd) |
Receives a single character from the serial device. More... | |
u32_t | sio_read (sio_fd_t fd, u8_t *data, u32_t len) |
Reads from the serial device. More... | |
u32_t | sio_tryread (sio_fd_t fd, u8_t *data, u32_t len) |
Tries to read from the serial device. More... | |
u32_t | sio_write (sio_fd_t fd, u8_t *data, u32_t len) |
Writes to the serial device. More... | |
void | sio_read_abort (sio_fd_t fd) |
Aborts a blocking sio_read() call. More... | |
#define __SIO_H__ |
typedef void* sio_fd_t |
sio_fd_t sio_open | ( | u8_t | devnum | ) |
Opens a serial device for communication.
devnum | device number |
u32_t sio_read | ( | sio_fd_t | fd, |
u8_t * | data, | ||
u32_t | len | ||
) |
Reads from the serial device.
fd | serial device handle |
data | pointer to data buffer for receiving |
len | maximum length (in bytes) of data to receive |
void sio_read_abort | ( | sio_fd_t | fd | ) |
Aborts a blocking sio_read() call.
fd | serial device handle |
u8_t sio_recv | ( | sio_fd_t | fd | ) |
Receives a single character from the serial device.
fd | serial device handle |
void sio_send | ( | u8_t | c, |
sio_fd_t | fd | ||
) |
Sends a single character to the serial device.
c | character to send |
fd | serial device handle |
u32_t sio_tryread | ( | sio_fd_t | fd, |
u8_t * | data, | ||
u32_t | len | ||
) |
Tries to read from the serial device.
Same as sio_read but returns immediately if no data is available and never blocks.
fd | serial device handle |
data | pointer to data buffer for receiving |
len | maximum length (in bytes) of data to receive |
u32_t sio_write | ( | sio_fd_t | fd, |
u8_t * | data, | ||
u32_t | len | ||
) |
Writes to the serial device.
fd | serial device handle |
data | pointer to data to send |
len | length (in bytes) of data to send |