[Fx2lib-devel] Updates to interrupt handlers and auto vector code.
Status: Beta
Brought to you by:
mulicheng
From: Dennis M. <de...@ub...> - 2010-01-14 17:30:08
|
A while back, Steve Calfee proposed a patch that put default interrupt handlers into the fx2.lib instead of having to have the firmware define them. I've done a little bit of work with this over the last couple days made a few compatibility changes to the library. * Fx2.lib now builds default handlers for usb and gpif interrupt handlers. These handlers do not clear the interrupt. (I didn't want to take up extra firmware space for handlers that aren't being used. Without any assembly code to clear the interrupt, the blank handlers don't take up much space really. All that is there is the reti instruction. * I renamed usbjt.h to autovector.h. In the autovector header, the two main macros USE_USB_INTS() and USE_GPIF_INTS() used to link in the same usb jump table. They still do (The jump table is one big table for both sets of interrupts and I don't see a simple way to separate them), but if you are not using GPIF interrupts (INT4) then the overlay for the jump table is not included. This leaves INT4 available to be used as an external interrupt if you wanted to configure it that way. (You can't use GPIF interrupts without using USB interrupts though) * I started a new header fx2ints.h. This header includes definitions and ENABLE/CLEAR macros for the standard fx2 interrupts (timers, serial, i2c, suspend, resume etc). These interrupts don't require default routines since there is no linking requirement and a jump table so all you have to do is enable the interrupt and create an interrupt handler with the appropriate constant. * Updated bulkloop and eeprom sample firmware as well as the firmware framework. Thanks for contributions/comments everyone. Latest changes are pushed to github. -Dennis |