Go to the source code of this file.
Functions | |
Stack * | stack_new (StackFP_Pop pop, StackFP_Push push) |
void | stack_construct (Stack *stack, StackFP_Pop pop, StackFP_Push push) |
void | stack_destroy (void *stack) |
uint32_t | stack_pop (Stack *stack, int bytes) |
void | stack_push (Stack *stack, int bytes, uint32_t val) |
HWStack * | hwstack_new (int depth) |
void | hwstack_construct (HWStack *stack, int depth) |
void | hwstack_destroy (void *stack) |
MemStack * | memstack_new (Memory *mem) |
void | memstack_construct (MemStack *stack, Memory *mem) |
void | memstack_destroy (void *stack) |
Defines the classes stack, hw_stack, and mem_stack.
FIXME: Ted, I would really really really love to put in a description of what is the difference between these three classes and how they're used, but I don't understand it myself.
Definition in file stack.c.
|
Allocates memory for a new Stack object. This is a virtual method for higher level stack implementations and as such should not be used directly. Definition at line 81 of file stack.c. References avr_new, class_overload_destroy(), stack_construct(), and stack_destroy(). |
|
Constructor for the Stack class. This is a virtual method for higher level stack implementations and as such should not be used directly. Definition at line 98 of file stack.c. References avr_error, and class_construct(). Referenced by hwstack_construct(), memstack_construct(), and stack_new(). |
|
Destructor for the Stack class. This is a virtual method for higher level stack implementations and as such should not be used directly. Definition at line 115 of file stack.c. References class_destroy(). Referenced by hwstack_destroy(), memstack_destroy(), and stack_new(). |
|
Pops a byte or a word off the stack and returns it.
|
|
Pushes a byte or a word of data onto the stack.
|
|
Allocate a new HWStack object. This is the stack implementation used by devices which lack SRAM and only have a fixed size hardware stack (e.i., the at90s1200) Definition at line 162 of file stack.c. References avr_new, class_overload_destroy(), hwstack_construct(), and hwstack_destroy(). Referenced by avr_core_construct(). |
|
Constructor for HWStack object. Definition at line 176 of file stack.c. References avr_error, avr_new0, and stack_construct(). Referenced by hwstack_new(). |
|
Destructor for HWStack object. Definition at line 190 of file stack.c. References avr_free(), and stack_destroy(). Referenced by hwstack_new(). |
|
Allocate a new MemStack object. Definition at line 363 of file stack.c. References avr_new, class_overload_destroy(), memstack_construct(), and memstack_destroy(). Referenced by avr_core_construct(). |
|
Constructor for MemStack object. Definition at line 377 of file stack.c. References avr_error, class_ref(), mem_attach(), and stack_construct(). Referenced by memstack_new(). |
|
Destructor for MemStack object. Definition at line 395 of file stack.c. References class_unref(), and stack_destroy(). Referenced by memstack_new(). |