ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts  1.0
ESP8266ILI9341DisplayProject
Functions | Variables
network.c File Reference

Network test client This code receives a message and displays iit. More...

#include "user_config.h"
#include <stdint.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include "display/ili9341.h"
#include "network/network.h"
#include "../../ssid.h"

Go to the source code of this file.

Functions

MEMSPACE char * ipv4_2str (uint32_t ip)
 
MEMSPACE void wifi_event_cb (System_Event_t *event_p)
 WIFI Event Callback. More...
 
MEMSPACE void setup_networking ()
 Code fragments if(!wifi_station_dhcpc_stop()) printf( "ERROR wifi_station_dhcpc_stop() \n ");. More...
 

Variables

int network_init = 0
 
uint8_t ip_msg [64]
 test task Runs corrected cube demo from Sem Optionally wireframe Earth viewer More...
 
int ip_msg_state
 
static struct station_config StationConfig
 
static struct ip_info info
 
static uint8_t macaddr [6]
 
static uint8_t received = 0
 
static char _ipv4_2str [32]
 Convert IP address to string. More...
 

Detailed Description

Network test client This code receives a message and displays iit.

Copyright © 2015 Mike Gore, GPL License
You are free to use this code under the terms of GPL
please retain a copy of this notice in any code you use it in.

This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file network.c.

Function Documentation

MEMSPACE char* ipv4_2str ( uint32_t  ip)

Definition at line 66 of file network.c.

Referenced by ntp_setup(), and user_loop().

MEMSPACE void setup_networking ( void  )

Code fragments if(!wifi_station_dhcpc_stop()) printf( "ERROR wifi_station_dhcpc_stop() \n ");.

if(!wifi_set_ip_info( STATION_IF , &info)) printf( "ERROR wifi_set_ip_info()\n");

if(!wifi_station_connect()) printf( "ERROR wifi_station_connect()\n");

if(!wifi_station_set_auto_connect( TRUE) ) printf("ERROR wifi_station_set_auto_connect(1)\n"); IP4_ADDR( & info.ip , 192 , 168 , 200 , 123); IP4_ADDR( & info.netmask , 255 , 255 , 255 , 0); IP4_ADDR( & info.gw, 192 , 168 , 200 , 1); if(!wifi_set_ip_info( STATION_IF , &info) ) printf( "ERROR wifi_set_ip_info() \n "); if(!wifi_station_set_auto_connect( TRUE) ) printf( "ERROR wifi_station_set_auto_connect(1) \n "); Setup Wifi Network Credits: ideas borrowed from David Ogilvy(MetalPhreak)

Returns
void

Definition at line 165 of file network.c.

Referenced by setup().

MEMSPACE void wifi_event_cb ( System_Event_t *  event_p)

WIFI Event Callback.

Parameters
[in]*event_pWifi event structure This callback status code borrowed from David Ogilvy(MetalPhreak)
Returns
void

Definition at line 80 of file network.c.

Referenced by setup_networking().

Variable Documentation

char _ipv4_2str[32]
static

Convert IP address to string.

Parameters
[in]ipIPV4 address
Returns
char * pointer to string result

Definition at line 64 of file network.c.

Referenced by ipv4_2str().

struct ip_info info
static

Definition at line 55 of file network.c.

Referenced by fatfs_ls(), fatfs_scan_files(), FreeFont(), InitFonts(), main(), setup_networking(), and stat().

uint8_t ip_msg[64]

test task Runs corrected cube demo from Sem Optionally wireframe Earth viewer

Returns
void

Definition at line 51 of file network.c.

Referenced by setup(), setup_networking(), and wifi_event_cb().

int ip_msg_state

Definition at line 52 of file network.c.

Referenced by wifi_event_cb().

uint8_t macaddr[6]
static

Definition at line 56 of file network.c.

Referenced by setup_networking().

int network_init = 0

Definition at line 50 of file network.c.

Referenced by ntp_setup(), and wifi_event_cb().

uint8_t received = 0
static

Definition at line 57 of file network.c.

struct station_config StationConfig
static

Definition at line 54 of file network.c.

Referenced by setup_networking().