USB Library
From v2.9j to v2.10

  • Type definition changes
In this release all type definitions were changed from GenericTypeDefs.h to the standard C99 types. The size and signedness of the variables remained the same. Applications that used the GenericTypeDefs.h file may need to port their types as well but it should not affect behavior at all. Below is a list of some of the most common usages and their transitions:

GenericTypeDefs.h (old) 
C99 (new) 
New Header Required 
DWORD, UINT32 
uint32_t 
stdint.h 
WORD, UINT16 
uint16_t 
stdint.h 
BYTE, UINT8 
uint8_t 
stdint.h 
BOOL 
bool 
stdbool.h 
TRUE 
true 
stdbool.h 
FALSE 
false 
stdbool.h 

  • All 16-bit peripheral/device applications:
Previous versions of the stack redefined the USBDeviceTasks() function to the interrupt vector function, _USB1Interrupt(), when the stack was run in interrupt mode. This meant that users didn't have to call the USBDeviceTasks() function for 16-bit products in interrupt mode. The side effect, however, is that since the host stack took the same approach, dual role or OTG solutions could not use interrupt mode for their peripheral/device operation. In this release of the stack this redefinition has been removed. As such, 16-bit applications using interrupt mode must now define the USB interrupt handler function in the application space and call the USBDeviceTasks() function:

#if defined(USB_INTERRUPT)
void __attribute__((interrupt,auto_psv)) _USB1Interrupt()
{
    USBDeviceTasks();
}
#endif

  • All 16-bit host applications:
Previous versions of the stack redefined the USB interrupt vector function, _USB1Interrupt(), in the host stack in order to handle USB interrupts. The side effect, however, is that since the host stack took control over the USB interrupt vector, dual role or OTG solutions could not use interrupt mode for their peripheral/device operation. In this release of the stack this behavior has been changed so that the host stack doesn't take control over the USB interrupt vector. As such, 16-bit applications must now define the USB interrupt handler function in the application space and call the USB_HostInterruptHandler() function:

void __attribute__((interrupt,auto_psv)) _USB1Interrupt()
{
    USB_HostInterruptHandler();
}

  • Include paths
Since the overall folder structure of the MLA has changed, if porting between two versions of the USB Library, a user will need to modify the include paths so that the application points to the new library folder and to the application space. To point to the library, the include path should have a link to the "<MLA install directory>\framework" folder. To include a USB header file you would designate the "usb\" folder before specifying the header file required. 

Example - #include "usb\usb.h"

MLA - USB Library Help Version : 2.16
http://www.microchip.com/mla