File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 1414#include " constants.h"
1515
1616#ifdef __cplusplus
17+ class __FlashStringHelper ;
18+ #define F (string_literal ) (reinterpret_cast <const __FlashStringHelper *>(PSTR(string_literal)))
19+
1720extern " C" {
1821#endif
1922
2023typedef uint8_t byte;
2124
22-
23- //__attribute(( used, section(".init9") )) int main();
25+ // main in .init9 saves rjmp instruction
2426__attribute (( section(" .init9" ) )) int main();
2527
2628void setup ();
2729void loop ();
2830
2931uint32_t millis ();
3032
33+ typedef volatile uint8_t * ioregptr;
34+
35+ extern inline ioregptr portOutputRegister (unsigned addr)
36+ { return (ioregptr) addr; }
37+
38+ extern inline ioregptr portModeRegister (unsigned addr)
39+ { return (ioregptr) (addr - 1 ); }
40+
41+ extern inline ioregptr portInputRegister (unsigned addr)
42+ { return (ioregptr) (addr - 2 ); }
43+
3144void badArg (const char *) __attribute((error(" " )));
3245
3346#define ASSERT_CONST (pin ) \
You can’t perform that action at this time.
0 commit comments