ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
1.0
ESP8266ILI9341DisplayProject
|
Main user and initialization code This initialize the platform and runs the main user task. All display updates and task are called from here. More...
#include <stdint.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include "user_config.h"
#include "time.h"
#include "timer.h"
#include "matrix.h"
#include "esp8266/system.h"
#include "lib/stringsup.h"
Go to the source code of this file.
Macros | |
#define | R1 330000.0 |
#define | R2 100000.0 |
#define | VERROR 0.95 |
#define | VSCALE (VERROR*((R1+R2)/R2)/1024.0) |
Functions | |
void | ets_timer_disarm (ETSTimer *ptimer) |
void | ets_timer_setfn (ETSTimer *ptimer, ETSTimerFunc *pfunction, void *parg) |
MEMSPACE void | ms_clear () |
Clear 1000HZ timer We loop in case the update of ms_time is not "atomic" - done in a single instruction. More... | |
MEMSPACE unsigned long | ms_read () |
Read 1000HZ timer We loop in case the update of ms_time is not "atomic" - done in a single instruction. More... | |
void | ms_task (void) |
1000HZ timer task More... | |
MEMSPACE void | ms_init () |
Initialize 1000HZ timer task. More... | |
void | ntp_setup (void) |
user_tasks () | |
float | adc_read () |
return system_adc_read scaled to a float T_OUT pin is connected to the junction of a voltage divider R1 and R2 R1 is connected to VCC R2 is connected to ground T_OUT is connected to the junction of R1 and R2 FIXME T_OUT has a loading value More... | |
void | user_loop (void) |
void | loop () |
void | user_help () |
MEMSPACE int | user_tests (int argc, char *argv[]) |
help functions test parser More... | |
test_types () | |
MEMSPACE void | setup (void) |
main() Initialize user task More... | |
Variables | |
unsigned long | ms_time = 0 |
int | ntp_init = 0 |
int | signal_loop = 0 |
time_t | seconds = 0 |
uint8_t | ip_msg [] |
test task Runs corrected cube demo from Sem Optionally wireframe Earth viewer More... | |
int | skip = 0 |
long | last_time10 = 0 |
long | last_time50 = 0 |
time_t | sec = 0 |
int | loop_cnt = 0 |
int | inloop = 0 |
Main user and initialization code This initialize the platform and runs the main user task. All display updates and task are called from here.
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 user_main.c.
#define R1 330000.0 |
Definition at line 313 of file user_main.c.
#define R2 100000.0 |
Definition at line 315 of file user_main.c.
#define VERROR 0.95 |
Definition at line 319 of file user_main.c.
Definition at line 321 of file user_main.c.
Referenced by adc_read().
float adc_read | ( | ) |
return system_adc_read scaled to a float T_OUT pin is connected to the junction of a voltage divider R1 and R2 R1 is connected to VCC R2 is connected to ground T_OUT is connected to the junction of R1 and R2 FIXME T_OUT has a loading value
Definition at line 332 of file user_main.c.
Referenced by user_loop().
void ets_timer_disarm | ( | ETSTimer * | ptimer | ) |
void ets_timer_setfn | ( | ETSTimer * | ptimer, |
ETSTimerFunc * | pfunction, | ||
void * | parg | ||
) |
void loop | ( | ) |
Definition at line 533 of file user_main.c.
Referenced by atexit(), and loop_wrapper().
MEMSPACE void ms_clear | ( | ) |
Clear 1000HZ timer We loop in case the update of ms_time is not "atomic" - done in a single instruction.
Definition at line 136 of file user_main.c.
MEMSPACE void ms_init | ( | ) |
Initialize 1000HZ timer task.
Definition at line 166 of file user_main.c.
Referenced by setup().
MEMSPACE unsigned long ms_read | ( | ) |
Read 1000HZ timer We loop in case the update of ms_time is not "atomic" - done in a single instruction.
Definition at line 146 of file user_main.c.
Referenced by user_loop().
void ms_task | ( | void | ) |
void ntp_setup | ( | void | ) |
Definition at line 176 of file user_main.c.
Referenced by user_loop().
MEMSPACE void setup | ( | void | ) |
main() Initialize user task
Definition at line 971 of file user_main.c.
Referenced by atexit(), loop_wrapper(), and user_init().
test_types | ( | ) |
test byte order and basic type sizes
Definition at line 783 of file user_main.c.
Referenced by setup().
void user_help | ( | ) |
Definition at line 592 of file user_main.c.
Referenced by user_tests().
void user_loop | ( | void | ) |
Definition at line 348 of file user_main.c.
Referenced by loop().
user_tasks | ( | ) |
second argument 1 = only report when an EOL is detectedEOL
Definition at line 274 of file user_main.c.
Referenced by user_loop().
MEMSPACE int user_tests | ( | int | argc, |
char * | argv[] | ||
) |
help functions test parser
[in] | str | User supplied command line |
Definition at line 631 of file user_main.c.
Referenced by user_tasks().
int inloop = 0 |
Definition at line 532 of file user_main.c.
Referenced by loop().
uint8_t ip_msg[] |
test task Runs corrected cube demo from Sem Optionally wireframe Earth viewer
Definition at line 51 of file network.c.
Referenced by setup(), setup_networking(), and wifi_event_cb().
long last_time10 = 0 |
Definition at line 306 of file user_main.c.
Referenced by user_loop().
long last_time50 = 0 |
Definition at line 307 of file user_main.c.
Referenced by user_loop().
int loop_cnt = 0 |
Definition at line 310 of file user_main.c.
unsigned long ms_time = 0 |
Definition at line 127 of file user_main.c.
Referenced by ms_clear(), ms_init(), ms_read(), and ms_task().
int ntp_init = 0 |
Definition at line 175 of file user_main.c.
Referenced by ntp_setup().
time_t sec = 0 |
Definition at line 308 of file user_main.c.
Referenced by ntp_setup(), tm2epoch(), and user_loop().
time_t seconds = 0 |
Definition at line 293 of file user_main.c.
Referenced by clock_set(), display_clock(), initialize_clock(), setdate_r(), timegm(), tm2epoch(), and user_loop().
int signal_loop = 0 |
Definition at line 291 of file user_main.c.
int skip = 0 |
Definition at line 304 of file user_main.c.
Referenced by FontAdjustFull(), and FontAdjustSmall().