Clean up bus_pal_hardware.[ch]. Add the ENABLE_BUSPAL macro and setup up BusPal if it's 1 instead of the default UHK USB interfaces.

This commit is contained in:
László Monda
2017-04-12 22:58:53 +02:00
parent 4750effd51
commit adc69dcad5
5 changed files with 30 additions and 458 deletions

View File

@@ -2,6 +2,7 @@
#include "usb_composite_device.h"
#include "usb_descriptors/usb_descriptor_hid.h"
#include "usb_descriptors/usb_descriptor_strings.h"
#include "bootloader_config.h"
static usb_status_t UsbDeviceCallback(usb_device_handle handle, uint32_t event, void *param);
usb_composite_device_t UsbCompositeDevice;
@@ -96,10 +97,12 @@ static usb_status_t UsbDeviceCallback(usb_device_handle handle, uint32_t event,
return error;
}
#ifndef ENABLE_BUSPAL
void USB0_IRQHandler()
{
USB_DeviceKhciIsrFunction(UsbCompositeDevice.deviceHandle);
}
#endif
void InitUsb()
{