Nut/OS  5.0.5
API Reference
unix_devs.c File Reference
#include <fcntl_orig.h>
#include <arch/unix.h>
#include <sys/atom.h>
#include <sys/device.h>
#include <sys/file.h>
#include <sys/timer.h>
#include <sys/thread.h>
#include <sys/event.h>
#include <dev/usart.h>
#include <dev/irqreg.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <termios.h>
#include <dev/unix_devs.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/uio.h>
Include dependency graph for unix_devs.c:

Defines

#define NO_STDIO_NUT_WRAPPER

Functions

char * dtostre (double f, char *str, uint8_t prec, uint8_t flags)
char * dtostrf (double f, char width, char prec, char *str)
unsigned int resolve (char *)
int UnixDevIOCTL (NUTDEVICE *dev, int req, void *conf)
 Perform USART control functions.

Variables

pthread_attr_t unix_devs_attr
pthread_mutex_t unix_devs_mutex
pthread_cond_t unix_devs_cv
NUTDEVICE devDebug0
 Debug device 0 information structure.
NUTDEVICE devDebug1
 Debug device 1 information structure.
NUTDEVICE devUart0
 uart device 0 information structure.
NUTDEVICE devUart1
 uart device 1 information structure.
NUTDEVICE devUart2
 uart device 2 information structure.
NUTDEVICE devUsartAvr0
 usartavr device 0 information structure.
NUTDEVICE devUsartAvr1
 usartavr device 1 information structure.
NUTDEVICE devUsartAvr2
 usartavr device 2 information structure.

Define Documentation

#define NO_STDIO_NUT_WRAPPER

Function Documentation

char * dtostre ( double  f,
char *  str,
uint8_t  prec,
uint8_t  flags 
)

References sprintf.

Referenced by _putf().

char * dtostrf ( double  f,
char  width,
char  prec,
char *  str 
)

References sprintf.

Referenced by _putf().

unsigned int resolve ( char *  ip_addr)

References inet_addr(), and memcpy().

Here is the call graph for this function:

int UnixDevIOCTL ( NUTDEVICE dev,
int  req,
void *  conf 
)

Perform USART control functions.

This function is called by the ioctl() function of the C runtime library.

Parameters:
devIdentifies the device that receives the device-control function.
reqRequested control function. May be set to one of the following constants:
confPoints to a buffer that contains any data required for the given control function or receives data from that function.
Returns:
0 on success, -1 otherwise.
Warning:
Timeout values are given in milliseconds and are limited to the granularity of the system timer. To disable timeout, set the parameter to NUT_WAIT_INFINITE.

References _UNIXDCB::dcb_fd, _UNIXDCB::dcb_modeflags, _UNIXDCB::dcb_socket, _NUTDEVICE::dev_dcb, errno, printf, UART_GETBLOCKREAD, UART_GETDATABITS, UART_GETFLOWCONTROL, UART_GETPARITY, UART_GETSPEED, UART_GETSTATUS, UART_GETSTOPBITS, UART_HS_MODEM, UART_HS_RTSCTS, UART_HS_SOFT, UART_SETBLOCKREAD, UART_SETCOOKEDMODE, UART_SETDATABITS, UART_SETFLOWCONTROL, UART_SETPARITY, UART_SETRXBUFHWMARK, UART_SETRXBUFLWMARK, UART_SETRXBUFSIZ, UART_SETSPEED, UART_SETSTATUS, UART_SETSTOPBITS, UART_SETTXBUFHWMARK, UART_SETTXBUFLWMARK, UART_SETTXBUFSIZ, and USART_MF_BLOCKREAD.


Variable Documentation

pthread_attr_t unix_devs_attr
pthread_mutex_t unix_devs_mutex
pthread_cond_t unix_devs_cv