Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 216534

Forum Post: RE: Using INT_TIMER0A without a P/N defined (INT_RESOLVE declared implicitly)

$
0
0
Rather than use a if statement for every interrupt vector in the library a more maintainable solution might be to use a macro such as RUN_TIME_RESOLVE_INT: #include #include #include #include #include #include /* * At runtime resolve the TMC4C123 or TM4C129 class specific interrupt vector. * This will result in a compile error if intname doesn't exist on both TMC4C123 or TM4C129 class processors. */ #define RUN_TIME_RESOLVE_INT(intname) (CLASS_IS_TM4C129 ? intname##_TM4C129 : intname##_TM4C123) void enable_timer_interrupt (void) { IntEnable(RUN_TIME_RESOLVE_INT (INT_TIMER5A)); }

Viewing all articles
Browse latest Browse all 216534

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>