Add a ramfunc section in the data segment, which will be copied to ram on startup.

Add a RAMFUNC function attribute to have functions copied to and run from ram.
Fix "blew circular buffer" error in hf 14a snoop by executing SnoopIso14443a from ram (eats about 3.5k of ram)
This commit is contained in:
henryk@ploetzli.ch 2010-10-08 10:23:04 +00:00
commit 6c1e2d95f4
3 changed files with 9 additions and 4 deletions

View file

@ -146,7 +146,7 @@ static struct {
uint8_t *output;
} Uart;
static int MillerDecoding(int bit)
static RAMFUNC int MillerDecoding(int bit)
{
int error = 0;
int bitright;
@ -410,7 +410,7 @@ static struct {
uint8_t *output;
} Demod;
static int ManchesterDecoding(int v)
static RAMFUNC int ManchesterDecoding(int v)
{
int bit;
int modulation;
@ -607,7 +607,7 @@ static int ManchesterDecoding(int v)
// triggering so that we start recording at the point that the tag is moved
// near the reader.
//-----------------------------------------------------------------------------
void SnoopIso14443a(void)
void RAMFUNC SnoopIso14443a(void)
{
// #define RECV_CMD_OFFSET 2032 // original (working as of 21/2/09) values
// #define RECV_RES_OFFSET 2096 // original (working as of 21/2/09) values