Nut/OS  5.0.5
API Reference
portdio.c File Reference
#include <string.h>
#include <stdio.h>
#include <dev/board.h>
#include <dev/gpio.h>
#include <sys/heap.h>
#include <sys/thread.h>
#include <sys/timer.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <net/route.h>
#include <netdb.h>
#include <pro/dhcp.h>
Include dependency graph for portdio.c:

Defines

#define MY_MAC   {0x00,0x06,0x98,0x20,0x00,0x00}
#define MY_IP   "192.168.192.100"
#define MY_MASK   "255.255.255.0"
#define MY_PORT   12345

Functions

void ProcessRequests (FILE *stream)
void init_dio (void)
void service (void)
void service_thread (void *arg)
int main (void)

Define Documentation

#define MY_MAC   {0x00,0x06,0x98,0x20,0x00,0x00}

Referenced by main().

#define MY_IP   "192.168.192.100"

Referenced by main().

#define MY_MASK   "255.255.255.0"

Referenced by main().

#define MY_PORT   12345
Examples:
portdio/portdio.c.

Referenced by service().


Function Documentation

void ProcessRequests ( FILE stream)
Examples:
portdio/portdio.c, and tcps/tcps.c.

References fflush(), fgets(), fprintf(), fputs(), GpioPinSetHigh, GpioPinSetLow, NutHeapAvailable, NutThreadYield(), strchr(), strlen(), and strncmp().

Referenced by main(), and service().

Here is the call graph for this function:

void init_dio ( void  )
Examples:
portdio/portdio.c.

References GPIO_CFG_OUTPUT, GPIO_CFG_PULLUP, GpioPinConfigSet(), and GpioPinSetLow.

Referenced by main().

Here is the call graph for this function:

void service ( void  )
Examples:
portdio/portdio.c.

References _fdopen(), fclose(), MY_PORT, NutTcpAccept(), NutTcpCloseSocket(), NutTcpCreateSocket(), and ProcessRequests().

Referenced by main(), and service_thread().

Here is the call graph for this function:

void service_thread ( void *  arg)
Examples:
portdio/portdio.c.

References service().

Referenced by main().

Here is the call graph for this function:

int main ( void  )

References DEV_ETHER, DEV_ETHER_NAME, inet_addr(), init_dio(), MY_IP, MY_MAC, MY_MASK, NutDhcpIfConfig(), NutNetIfConfig(), NutRegisterDevice(), NutThreadCreate(), service(), and service_thread().

Here is the call graph for this function: