Implements a stack with stack register using RAM as stackarea. More...
#include <hwstack.h>


Public Member Functions | |
| HWStackSram (AvrDevice *core, int bitsize, bool initRAMEND=false) | |
| Creates a stack instance. | |
| virtual void | Push (unsigned char val) |
| Pushs one byte to stack. | |
| virtual unsigned char | Pop () |
| Pops one byte from stack. | |
| virtual void | PushAddr (unsigned long addr) |
| Pushs a address to stack. | |
| virtual unsigned long | PopAddr () |
| Pops a address from stack. | |
| virtual void | Reset () |
| Resets stack pointer and listener table. | |
Public Attributes | |
| IOReg< HWStackSram > | sph_reg |
| IOReg< HWStackSram > | spl_reg |
Protected Member Functions | |
| void | SetSpl (unsigned char) |
| void | SetSph (unsigned char) |
| unsigned char | GetSpl () |
| unsigned char | GetSph () |
| void | OnSPReadByTarget () |
Protected Attributes | |
| unsigned long | stackCeil |
| bool | initRAMEND |
Implements a stack with stack register using RAM as stackarea.
Definition at line 131 of file hwstack.h.
| HWStackSram::HWStackSram | ( | AvrDevice * | core, | |
| int | bitsize, | |||
| bool | initRAMEND = false | |||
| ) |
Creates a stack instance.
Definition at line 62 of file hwstack.cpp.
References Reset(), and stackCeil.

| unsigned char HWStackSram::GetSph | ( | ) | [protected] |
Definition at line 172 of file hwstack.cpp.
References OnSPReadByTarget(), and HWStack::stackPointer.

| unsigned char HWStackSram::GetSpl | ( | ) | [protected] |
Definition at line 177 of file hwstack.cpp.
References OnSPReadByTarget(), and HWStack::stackPointer.

| void HWStackSram::OnSPReadByTarget | ( | ) | [protected] |
Definition at line 181 of file hwstack.cpp.
References HWStack::m_ThreadList, ThreadList::OnSPRead(), and HWStack::stackPointer.
Referenced by GetSph(), and GetSpl().


| unsigned char HWStackSram::Pop | ( | ) | [virtual] |
Pops one byte from stack.
Implements HWStack.
Definition at line 103 of file hwstack.cpp.
References HWStack::CheckReturnPoints(), HWStack::core, AvrDevice::GetRWMem(), IOReg< P >::hardwareChange(), HWStack::m_ThreadList, ThreadList::OnPop(), sph_reg, spl_reg, stackCeil, HWStack::stackPointer, AvrDevice::trace_on, and traceOut.
Referenced by PopAddr().


| unsigned long HWStackSram::PopAddr | ( | ) | [virtual] |
Pops a address from stack.
Implements HWStack.
Definition at line 128 of file hwstack.cpp.
References HWStack::core, AvrDevice::PC_size, and Pop().

| void HWStackSram::Push | ( | unsigned char | val | ) | [virtual] |
Pushs one byte to stack.
Implements HWStack.
Definition at line 85 of file hwstack.cpp.
References HWStack::CheckReturnPoints(), HWStack::core, IOReg< P >::hardwareChange(), HWStack::lowestStackPointer, HWStack::m_ThreadList, ThreadList::OnPush(), AvrDevice::SetRWMem(), sph_reg, spl_reg, stackCeil, HWStack::stackPointer, AvrDevice::trace_on, and traceOut.
Referenced by PushAddr().


| void HWStackSram::PushAddr | ( | unsigned long | addr | ) | [virtual] |
Pushs a address to stack.
Implements HWStack.
Definition at line 117 of file hwstack.cpp.
References HWStack::core, AvrDevice::PC_size, and Push().

| void HWStackSram::Reset | ( | void | ) | [virtual] |
Resets stack pointer and listener table.
Reimplemented from HWStack.
Definition at line 74 of file hwstack.cpp.
References HWStack::core, AvrDevice::GetMemIOSize(), AvrDevice::GetMemIRamSize(), AvrDevice::GetMemRegisterSize(), initRAMEND, HWStack::lowestStackPointer, HWStack::returnPointList, and HWStack::stackPointer.
Referenced by HWStackSram().


| void HWStackSram::SetSph | ( | unsigned char | val | ) | [protected] |
Definition at line 155 of file hwstack.cpp.
References avr_warning, HWStack::CheckReturnPoints(), HWStack::core, IOReg< P >::hardwareChange(), HWStack::m_ThreadList, ThreadList::OnSPWrite(), sph_reg, stackCeil, HWStack::stackPointer, AvrDevice::trace_on, and traceOut.

| void HWStackSram::SetSpl | ( | unsigned char | val | ) | [protected] |
Definition at line 140 of file hwstack.cpp.
References HWStack::CheckReturnPoints(), HWStack::core, IOReg< P >::hardwareChange(), HWStack::m_ThreadList, ThreadList::OnSPWrite(), spl_reg, stackCeil, HWStack::stackPointer, AvrDevice::trace_on, and traceOut.

bool HWStackSram::initRAMEND [protected] |
unsigned long HWStackSram::stackCeil [protected] |
1.6.3