Branch to BusPal vs keyboard function depending on Wormhole->enumerationMode

This commit is contained in:
László Monda
2017-05-01 19:26:38 +02:00
parent 8675effabc
commit d1d847ff57
9 changed files with 78 additions and 67 deletions

View File

@@ -3,6 +3,8 @@
#include "usb_descriptors/usb_descriptor_hid.h"
#include "usb_descriptors/usb_descriptor_strings.h"
#include "bootloader_config.h"
#include "bus_pal_hardware.h"
#include "wormhole.h"
static usb_status_t UsbDeviceCallback(usb_device_handle handle, uint32_t event, void *param);
usb_composite_device_t UsbCompositeDevice;
@@ -97,12 +99,12 @@ static usb_status_t UsbDeviceCallback(usb_device_handle handle, uint32_t event,
return error;
}
#ifndef ENABLE_BUSPAL
void USB0_IRQHandler()
void USB0_IRQHandler(void)
{
USB_DeviceKhciIsrFunction(UsbCompositeDevice.deviceHandle);
USB_DeviceKhciIsrFunction(Wormhole->enumerationMode == EnumerationMode_BusPal
? BuspalCompositeUsbDevice.device_handle
: UsbCompositeDevice.deviceHandle);
}
#endif
void InitUsb()
{