ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
1.0
ESP8266ILI9341DisplayProject
|
System memory and reset utilities. More...
Go to the source code of this file.
Macros | |
#define | free(p) safefree(p) |
#define | calloc(n, s) safecalloc(n,s) |
#define | malloc(s) safemalloc(s) |
Functions | |
MEMSPACE size_t | freeRam (void) |
Return Free memory. More... | |
MEMSPACE void | PrintRam (void) |
Display Free memory and regions. More... | |
MEMSPACE void * | safecalloc (size_t nmemb, size_t size) |
Safe Calloc - Display Error message if Calloc fails. More... | |
MEMSPACE void * | safemalloc (size_t size) |
Safe Malloc - Display Error message if Malloc fails. More... | |
MEMSPACE void | safefree (void *p) |
Safe free - Only free a pointer if it is in malloc memory range. We want to try to catch frees of static or bogus data. More... | |
MEMSPACE void | reset (void) |
reset system More... | |
MEMSPACE void | wdt_reset (void) |
reset watchdog More... | |
System memory and reset utilities.
h
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 system.h.
#define calloc | ( | n, | |
s | |||
) | safecalloc(n,s) |
#define malloc | ( | s | ) | safemalloc(s) |
MEMSPACE void PrintRam | ( | void | ) |
Display Free memory and regions.
Definition at line 113 of file system.c.
Referenced by calloc(), free(), malloc(), safecalloc(), safefree(), setup(), and user_tests().
Safe Calloc - Display Error message if Calloc fails.
[in] | nmemb | number of elements |
[in] | size | size of elements |
Definition at line 128 of file system.c.
Referenced by copy(), fatfs_ls(), fdevopen(), html_msg(), MatAlloc(), new_file_descriptor(), ntp_setup(), queue_new(), rwbuf_create(), safemalloc(), servertest_setup(), stralloc(), and strnalloc().
MEMSPACE void safefree | ( | void * | p | ) |
Safe free - Only free a pointer if it is in malloc memory range. We want to try to catch frees of static or bogus data.
[in] | p | pointer to free. |
Definition at line 165 of file system.c.
Referenced by copy(), fatfs_ls(), fatfs_tests(), free_file_descriptor(), html_msg(), MatFree(), mkfs(), new_file_descriptor(), ntp_setup(), queue_del(), queue_new(), and rwbuf_delete().
Safe Malloc - Display Error message if Malloc fails.
[in] | size | size |
Definition at line 146 of file system.c.
Referenced by fatfs_tests(), and mkfs().
MEMSPACE void wdt_reset | ( | void | ) |
reset watchdog
Definition at line 190 of file system.c.
Referenced by cat(), copy(), fatfs_ls(), fatfs_scan_files(), fgetc(), fputc(), hexdump(), ls(), mmc_test_timeout(), setup(), sum(), testpage(), and wire_draw().