233 |
#include <avr/io.h> |
#include <avr/io.h> |
234 |
|
|
235 |
void my_init_portb (void) __attribute__ ((naked)) \ |
void my_init_portb (void) __attribute__ ((naked)) \ |
236 |
__attribute__ ((section (".init1"))); |
__attribute__ ((section (".init3"))); |
237 |
|
|
238 |
void |
void |
239 |
my_init_portb (void) |
my_init_portb (void) |
243 |
} |
} |
244 |
\endcode |
\endcode |
245 |
|
|
246 |
|
\note Section .init3 is used in this example, as this ensures the |
247 |
|
inernal <tt>__zero_reg__</tt> has already been set up. The code |
248 |
|
generated by the compiler might blindly rely on <tt>__zero_reg__</tt> |
249 |
|
being really 0. |
250 |
|
|
251 |
*/ |
*/ |
252 |
|
|