diff options
| author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-19 00:20:10 +0300 |
|---|---|---|
| committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-19 00:20:10 +0300 |
| commit | 9514d847feb70c330d310a366b92013960729bdc (patch) | |
| tree | eb231d0a20847fba154d07f4e7f58f6b4865878c /esp8266/mpconfigport.h | |
| parent | 462748de0c2668d40b7f2ea8f2b264d134d5d39b (diff) | |
esp8266: Add MP_FASTCODE modifier to put a function to iRAM.
It can be used in the following manner:
void MP_FASTCODE(foo)(int arg) { ... }
Diffstat (limited to 'esp8266/mpconfigport.h')
| -rw-r--r-- | esp8266/mpconfigport.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/esp8266/mpconfigport.h b/esp8266/mpconfigport.h index 201057f12..602b3e9c8 100644 --- a/esp8266/mpconfigport.h +++ b/esp8266/mpconfigport.h @@ -182,4 +182,6 @@ extern const struct _mp_obj_module_t onewire_module; #define MICROPY_HW_MCU_NAME "ESP8266" #define MICROPY_PY_SYS_PLATFORM "esp8266" +#define MP_FASTCODE(n) __attribute__((section(".iram0.text." #n))) n + #define _assert(expr) ((expr) ? (void)0 : __assert_func(__FILE__, __LINE__, __func__, #expr)) |
