Move SROM register definition to ec/scratch.h

This commit is contained in:
Jeremy Soller
2020-09-15 12:28:36 -06:00
committed by Jeremy Soller
parent fd0bbc53f4
commit 882dd02e06
3 changed files with 29 additions and 20 deletions

View File

@@ -0,0 +1,14 @@
#ifndef _EC_SCRATCH_H
#define _EC_SCRATCH_H
#include <stdint.h>
// SCAR0 is stored in processor cache, not in xram
volatile uint8_t __xdata __at(0x1040) SCAR0L;
volatile uint8_t __xdata __at(0x1041) SCAR0M;
volatile uint8_t __xdata __at(0x1042) SCAR0H;
#define SCARL SCAR0L
#define SCARM SCAR0M
#define SCARH SCAR0H
#endif // _EC_SCRATCH_H

View File

@@ -0,0 +1,14 @@
#ifndef _EC_SCRATCH_H
#define _EC_SCRATCH_H
#include <stdint.h>
// SCAR1 is in xram at 0x800-0xC00
volatile uint8_t __xdata __at(0x1043) SCAR1L;
volatile uint8_t __xdata __at(0x1044) SCAR1M;
volatile uint8_t __xdata __at(0x1045) SCAR1H;
#define SCARL SCAR1L
#define SCARM SCAR1M
#define SCARH SCAR1H
#endif // _EC_SCRATCH_H