ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
1.0
ESP8266ILI9341DisplayProject
Main Page
Related Pages
Data Structures
Files
File List
Globals
yield
cont.h
Go to the documentation of this file.
1
/*
2
cont.h - continuations support for Xtensa call0 ABI
3
Copyright (c) 2014 Ivan Grokhotkov. All rights reserved.
4
This file is part of the esp8266 core for Arduino environment.
5
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2.1 of the License, or (at your option) any later version.
10
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Lesser General Public License for more details.
15
16
You should have received a copy of the GNU Lesser General Public
17
License along with this library; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#ifndef CONT_H_
22
#define CONT_H_
23
24
#include <stdbool.h>
25
26
#ifndef CONT_STACKSIZE
27
#define CONT_STACKSIZE (1024*4)
28
#endif
29
30
typedef
struct
cont_
31
{
32
void (*
pc_ret
)(void);
33
unsigned
*
sp_ret
;
34
35
void (*
pc_yield
)(void);
36
unsigned
*
sp_yield
;
37
38
unsigned
*
stack_end
;
39
unsigned
unused1
;
40
unsigned
unused2
;
41
unsigned
stack_guard1
;
42
43
unsigned
stack
[
CONT_STACKSIZE
/ 4];
44
45
unsigned
stack_guard2
;
46
unsigned
*
struct_start
;
47
}
cont_t
;
48
49
// Initialize the cont_t structure before calling cont_run
50
void
cont_init
(
cont_t
*);
51
52
// Run function pfn in a separate stack, or continue execution
53
// at the point where cont_yield was called
54
void
cont_run
(
cont_t
*,
void
(*pfn)(
void
));
55
56
// Return to the point where cont_run was called, saving the
57
// execution state (registers and stack)
58
void
cont_yield
(
cont_t
*);
59
60
// Check guard bytes around the stack. Return 0 in case everything is ok,
61
// return 1 if guard bytes were overwritten.
62
int
cont_check
(
cont_t
* cont);
63
64
// Check if yield() may be called. Returns true if we are running inside
65
// continuation stack
66
bool
cont_can_yield
(
cont_t
* cont);
67
#endif
/* CONT_H_ */
cont_::pc_ret
void(* pc_ret)(void)
Definition:
cont.h:32
cont_yield
void cont_yield(cont_t *)
cont_::stack
unsigned stack[CONT_STACKSIZE/4]
Definition:
cont.h:43
cont_::stack_guard2
unsigned stack_guard2
Definition:
cont.h:45
CONT_STACKSIZE
#define CONT_STACKSIZE
Definition:
cont.h:27
cont_check
int cont_check(cont_t *cont)
Definition:
cont_util.c:36
cont_::sp_ret
unsigned * sp_ret
Definition:
cont.h:33
cont_can_yield
bool cont_can_yield(cont_t *cont)
Definition:
cont_util.c:44
cont_::pc_yield
void(* pc_yield)(void)
Definition:
cont.h:35
cont_::sp_yield
unsigned * sp_yield
Definition:
cont.h:36
cont_::unused2
unsigned unused2
Definition:
cont.h:40
cont_run
void cont_run(cont_t *, void(*pfn)(void))
cont_
Definition:
cont.h:30
cont_init
void cont_init(cont_t *)
Definition:
cont_util.c:27
cont_::stack_guard1
unsigned stack_guard1
Definition:
cont.h:41
cont_::stack_end
unsigned * stack_end
Definition:
cont.h:38
cont_::unused1
unsigned unused1
Definition:
cont.h:39
cont_::struct_start
unsigned * struct_start
Definition:
cont.h:46
cont_t
struct cont_ cont_t
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by
1.8.11