Fake registers, functions, values, and macros
This commit is contained in:
3
smoother/avr/interrupt.h
Normal file
3
smoother/avr/interrupt.h
Normal file
@ -0,0 +1,3 @@
|
||||
#define ISR(f) void f()
|
||||
inline void cli() {}
|
||||
inline void sei() {}
|
64
smoother/avr/io.h
Normal file
64
smoother/avr/io.h
Normal file
@ -0,0 +1,64 @@
|
||||
#include <stdint.h>
|
||||
|
||||
struct DummyReg {
|
||||
operator uint8_t() {return 0;}
|
||||
uint8_t operator=(uint8_t x) {return x;}
|
||||
uint8_t operator&=(uint8_t x) {return *this = *this & x;}
|
||||
uint8_t operator|=(uint8_t x) {return *this = *this | x;}
|
||||
};
|
||||
|
||||
extern DummyReg DDRA;
|
||||
extern DummyReg DDRB;
|
||||
extern DummyReg DDRC;
|
||||
extern DummyReg DDRD;
|
||||
|
||||
extern DummyReg PORTA;
|
||||
extern DummyReg PORTB;
|
||||
extern DummyReg PORTC;
|
||||
extern DummyReg PORTD;
|
||||
|
||||
extern DummyReg PINA;
|
||||
extern DummyReg PINB;
|
||||
extern DummyReg PINC;
|
||||
extern DummyReg PIND;
|
||||
|
||||
extern DummyReg EEAR;
|
||||
extern DummyReg EECR;
|
||||
extern DummyReg EEDR;
|
||||
extern DummyReg EEMPE;
|
||||
extern DummyReg EEPE;
|
||||
extern DummyReg OCIE0A;
|
||||
extern DummyReg OCIE0B;
|
||||
extern DummyReg OCIE1A;
|
||||
extern DummyReg OCR1A;
|
||||
extern DummyReg PCICR;
|
||||
extern DummyReg PCIE0;
|
||||
extern DummyReg PCIE1;
|
||||
extern DummyReg PCMSK0;
|
||||
extern DummyReg PCMSK1;
|
||||
extern DummyReg SREG;
|
||||
extern DummyReg TCCR0A;
|
||||
extern DummyReg TCCR0B;
|
||||
extern DummyReg TCCR0B;
|
||||
extern DummyReg TCCR1A;
|
||||
extern DummyReg TCCR1B;
|
||||
extern DummyReg TCNT0;
|
||||
extern DummyReg TIMSK0;
|
||||
extern DummyReg TIMSK1;
|
||||
extern DummyReg TOIE0;
|
||||
|
||||
static const int COM1A0 = 0;
|
||||
static const int COM1A1 = 0;
|
||||
static const int COM1B0 = 0;
|
||||
static const int COM1B1 = 0;
|
||||
static const int CS01 = 0;
|
||||
static const int CS10 = 0;
|
||||
static const int CS11 = 0;
|
||||
static const int CS12 = 0;
|
||||
static const int EEMWE = 0;
|
||||
static const int EERE = 0;
|
||||
static const int EEWE = 0;
|
||||
static const int WGM10 = 0;
|
||||
static const int WGM11 = 0;
|
||||
static const int WGM12 = 0;
|
||||
static const int WGM13 = 0;
|
3
smoother/avr/pgmspace.h
Normal file
3
smoother/avr/pgmspace.h
Normal file
@ -0,0 +1,3 @@
|
||||
#define PSTR(s) s
|
||||
|
||||
inline char pgm_read_byte_near(const char* p) {return *p;}
|
0
smoother/avr/wdt.h
Normal file
0
smoother/avr/wdt.h
Normal file
Reference in New Issue
Block a user