embedded - C code to manipulate AVR processor registries and stack -


is possible, using following c code, modify stack pointer, processor registers etc. in avr microcontroller (like atmega88 etc.)

#define load_sp(sph, spl) (sp = (sph<<8)|spl)  #define load_pc(pc_h, pc_l) { sp_ = sp \     *sp_ = pc_l; \     sp_ = sp_-1; \     *sp_ = pc_h; \     sp_ = sp_-1; \     sp = sp_;    \ } 

where sp_ global variable ... unsigned int *sp use these macros original preemptive scheduler, want code. mention overall program builds without errors or warnings, want ask professional advice before uploading on actual hardware.


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -