mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
A version of the firmware that successfully Acks back and forth over HID. Still need to refine the PIOS interface and make GCS strip out the report ID data (if necessary). Also note: currently if you run too many modules the watchdog timer kicks in. I haven't determined if this is due to an interrupt binding up or what (and why it doesn't happen more often since I can't find any code that explicitly resets the WWDG).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1157 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
d89cd43cd1
commit
840f7ff456
@ -60,7 +60,7 @@ USE_THUMB_MODE = YES
|
|||||||
#MODULES = Telemetry GPS ManualControl Actuator Altitude AHRSComms Stabilization
|
#MODULES = Telemetry GPS ManualControl Actuator Altitude AHRSComms Stabilization
|
||||||
#MODULES = Telemetry Example
|
#MODULES = Telemetry Example
|
||||||
#MODULES = Telemetry MK/MKSerial
|
#MODULES = Telemetry MK/MKSerial
|
||||||
|
MODULES =
|
||||||
#MODULES += Osd/OsdEtStd
|
#MODULES += Osd/OsdEtStd
|
||||||
|
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ SRC += $(PIOSSTM32F10X)/pios_exti.c
|
|||||||
# PIOS USB related files (seperated to make code maintenance more easy)
|
# PIOS USB related files (seperated to make code maintenance more easy)
|
||||||
SRC += $(PIOSSTM32F10X)/pios_usb_hid.c
|
SRC += $(PIOSSTM32F10X)/pios_usb_hid.c
|
||||||
SRC += $(PIOSSTM32F10X)/pios_usb_hid_desc.c
|
SRC += $(PIOSSTM32F10X)/pios_usb_hid_desc.c
|
||||||
SRC += $(PIOSSTM32F10X)/pios_usb_hid_endp.c
|
#SRC += $(PIOSSTM32F10X)/pios_usb_hid_endp.c
|
||||||
SRC += $(PIOSSTM32F10X)/pios_usb_hid_istr.c
|
SRC += $(PIOSSTM32F10X)/pios_usb_hid_istr.c
|
||||||
SRC += $(PIOSSTM32F10X)/pios_usb_hid_prop.c
|
SRC += $(PIOSSTM32F10X)/pios_usb_hid_prop.c
|
||||||
SRC += $(PIOSSTM32F10X)/pios_usb_hid_pwr.c
|
SRC += $(PIOSSTM32F10X)/pios_usb_hid_pwr.c
|
||||||
|
@ -45,51 +45,6 @@ const struct pios_com_driver pios_usb_com_driver = {
|
|||||||
.rx_avail = PIOS_USB_HID_RxBufferUsed,
|
.rx_avail = PIOS_USB_HID_RxBufferUsed,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Local types */
|
|
||||||
typedef enum _HID_REQUESTS {
|
|
||||||
GET_REPORT = 1,
|
|
||||||
GET_IDLE,
|
|
||||||
GET_PROTOCOL,
|
|
||||||
SET_REPORT = 9,
|
|
||||||
SET_IDLE,
|
|
||||||
SET_PROTOCOL
|
|
||||||
} HID_REQUESTS;
|
|
||||||
|
|
||||||
/* Global Variables */
|
|
||||||
|
|
||||||
/* Local Variables */
|
|
||||||
static uint32_t ProtocolValue;
|
|
||||||
|
|
||||||
|
|
||||||
/* Local Functions */
|
|
||||||
static uint8_t *PIOS_USB_HID_GetHIDDescriptor(uint16_t Length);
|
|
||||||
static uint8_t *PIOS_USB_HID_GetReportDescriptor(uint16_t Length);
|
|
||||||
static uint8_t *PIOS_USB_HID_GetProtocolValue(uint16_t Length);
|
|
||||||
|
|
||||||
static const uint8_t PIOS_USB_HID_ReportDescriptor[PIOS_USB_HID_SIZ_REPORT_DESC] = {
|
|
||||||
0x06, 0x9c, 0xff, /* Usage Page (Vendor Defined) */
|
|
||||||
0x09, 0x01, /* Usage (Vendor Defined) */
|
|
||||||
0xa1, 0x01, /* Collection (Vendor Defined) */
|
|
||||||
|
|
||||||
0x09, 0x02, /* Usage (Vendor Defined) */
|
|
||||||
0x75, 0x08, /* Report Size (8) */
|
|
||||||
0x95, (PIOS_USB_HID_DATA_LENGTH), /* Report Count (64) */
|
|
||||||
0x15, 0x00, /* Logical Minimum (0) */
|
|
||||||
0x25, 0xff, /* Logical Maximum (255) */
|
|
||||||
0x81, 0x02, /* Input (Data, Variable, Absolute) */
|
|
||||||
|
|
||||||
0x09, 0x03, /* Usage (Vendor Defined) */
|
|
||||||
0x75, 0x08, /* Report Size (8) */
|
|
||||||
0x95, (PIOS_USB_HID_DATA_LENGTH), /* Report Count (64) */
|
|
||||||
0x15, 0x00, /* Logical Minimum (0) */
|
|
||||||
0x25, 0xff, /* Logical Maximum (255) */
|
|
||||||
0x91, 0x02, /* Output (Data, Variable, Absolute) */
|
|
||||||
|
|
||||||
0xc0 /* End Collection */
|
|
||||||
};
|
|
||||||
static ONE_DESCRIPTOR PIOS_USB_HID_Report_Descriptor = {(uint8_t *) PIOS_USB_HID_ReportDescriptor, PIOS_USB_HID_SIZ_REPORT_DESC};
|
|
||||||
static ONE_DESCRIPTOR PIOS_USB_HID_Hid_Descriptor = {(uint8_t*) PIOS_USB_HID_ReportDescriptor + PIOS_USB_HID_OFF_HID_DESC, PIOS_USB_HID_SIZ_HID_DESC};
|
|
||||||
|
|
||||||
/* Rx/Tx status */
|
/* Rx/Tx status */
|
||||||
static volatile uint8_t rx_buffer_new_data_ctr = 0;
|
static volatile uint8_t rx_buffer_new_data_ctr = 0;
|
||||||
static volatile uint8_t rx_buffer_ix;
|
static volatile uint8_t rx_buffer_ix;
|
||||||
@ -126,10 +81,6 @@ int32_t PIOS_USB_HID_Init(uint32_t mode)
|
|||||||
/* Enable the USB clock */
|
/* Enable the USB clock */
|
||||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USB, ENABLE);
|
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USB, ENABLE);
|
||||||
|
|
||||||
PIOS_LED_On(LED1);
|
|
||||||
// Set_System();
|
|
||||||
// USB_Interrupts_Config();
|
|
||||||
// Set_USBClock();
|
|
||||||
USB_Init();
|
USB_Init();
|
||||||
PIOS_LED_On(LED2);
|
PIOS_LED_On(LED2);
|
||||||
|
|
||||||
@ -188,6 +139,8 @@ int32_t PIOS_USB_HID_TxBufferPutMoreNonBlocking(uint8_t id, const uint8_t *buffe
|
|||||||
/* Send Buffer */
|
/* Send Buffer */
|
||||||
SetEPTxValid(ENDP1);
|
SetEPTxValid(ENDP1);
|
||||||
|
|
||||||
|
PIOS_LED_Toggle( LED2 );
|
||||||
|
|
||||||
/* No error */
|
/* No error */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -244,86 +197,6 @@ int32_t PIOS_USB_HID_RxBufferUsed(uint8_t id)
|
|||||||
return rx_buffer_new_data_ctr;
|
return rx_buffer_new_data_ctr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t PIOS_USB_HID_CB_Data_Setup(uint8_t RequestNo)
|
|
||||||
{
|
|
||||||
uint8_t *(*CopyRoutine)( uint16_t) = NULL;
|
|
||||||
|
|
||||||
CopyRoutine = NULL;
|
|
||||||
|
|
||||||
/* GET_DESCRIPTOR */
|
|
||||||
if((RequestNo == GET_DESCRIPTOR) && (Type_Recipient == (STANDARD_REQUEST | INTERFACE_RECIPIENT)) && (pInformation->USBwIndex0 == 0)) {
|
|
||||||
|
|
||||||
if(pInformation->USBwValue1 == PIOS_USB_HID_REPORT_DESCRIPTOR) {
|
|
||||||
CopyRoutine = PIOS_USB_HID_GetReportDescriptor;
|
|
||||||
} else if(pInformation->USBwValue1 == PIOS_USB_HID_HID_DESCRIPTOR_TYPE) {
|
|
||||||
CopyRoutine = PIOS_USB_HID_GetHIDDescriptor;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* GET_PROTOCOL */
|
|
||||||
else if((Type_Recipient == (CLASS_REQUEST | INTERFACE_RECIPIENT)) && RequestNo == GET_PROTOCOL) {
|
|
||||||
CopyRoutine = PIOS_USB_HID_GetProtocolValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(CopyRoutine == NULL) {
|
|
||||||
return USB_UNSUPPORT;
|
|
||||||
}
|
|
||||||
|
|
||||||
pInformation->Ctrl_Info.CopyData = CopyRoutine;
|
|
||||||
pInformation->Ctrl_Info.Usb_wOffset = 0;
|
|
||||||
(*CopyRoutine)(0);
|
|
||||||
|
|
||||||
return USB_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t PIOS_USB_HID_CB_NoData_Setup(uint8_t RequestNo)
|
|
||||||
{
|
|
||||||
if((Type_Recipient == (CLASS_REQUEST | INTERFACE_RECIPIENT)) && (RequestNo == SET_PROTOCOL)) {
|
|
||||||
uint8_t wValue0 = pInformation->USBwValue0;
|
|
||||||
ProtocolValue = wValue0;
|
|
||||||
return USB_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
return USB_UNSUPPORT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the HID descriptor.
|
|
||||||
* \param[in] Length
|
|
||||||
* \return The address of the configuration descriptor.
|
|
||||||
*/
|
|
||||||
static uint8_t *PIOS_USB_HID_GetHIDDescriptor(uint16_t Length)
|
|
||||||
{
|
|
||||||
return Standard_GetDescriptorData(Length, &PIOS_USB_HID_Hid_Descriptor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the HID report descriptor.
|
|
||||||
* \param[in] Length
|
|
||||||
* \return The address of the configuration descriptor.
|
|
||||||
*/
|
|
||||||
static uint8_t *PIOS_USB_HID_GetReportDescriptor(uint16_t Length)
|
|
||||||
{
|
|
||||||
return Standard_GetDescriptorData(Length, &PIOS_USB_HID_Report_Descriptor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the protocol value
|
|
||||||
* \param[in] Length
|
|
||||||
* \return address of the protocol value.
|
|
||||||
*/
|
|
||||||
static uint8_t *PIOS_USB_HID_GetProtocolValue(uint16_t Length)
|
|
||||||
{
|
|
||||||
if(Length == 0) {
|
|
||||||
pInformation->Ctrl_Info.Usb_wLength = 1;
|
|
||||||
return NULL;
|
|
||||||
} else {
|
|
||||||
return (uint8_t *) (&ProtocolValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EP1 OUT Callback Routine
|
* EP1 OUT Callback Routine
|
||||||
@ -341,6 +214,7 @@ void PIOS_USB_HID_EP1_OUT_Callback(void)
|
|||||||
/* We now have data waiting */
|
/* We now have data waiting */
|
||||||
rx_buffer_new_data_ctr = DataLength;
|
rx_buffer_new_data_ctr = DataLength;
|
||||||
SetEPRxStatus(ENDP1, EP_RX_VALID);
|
SetEPRxStatus(ENDP1, EP_RX_VALID);
|
||||||
|
PIOS_LED_Toggle(LED2);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -123,113 +123,16 @@ const uint8_t PIOS_HID_ReportDescriptor[PIOS_HID_SIZ_REPORT_DESC] =
|
|||||||
0xa1, 0x01, /* COLLECTION (Application) */
|
0xa1, 0x01, /* COLLECTION (Application) */
|
||||||
/* 6 */
|
/* 6 */
|
||||||
|
|
||||||
/* Led 1 */
|
/* Data 1 */
|
||||||
0x85, 0x01, /* REPORT_ID (1) */
|
0x85, 0x01, /* REPORT_ID (1) */
|
||||||
0x09, 0x01, /* USAGE (LED 1) */
|
0x09, 0x01, /* USAGE (LED 1) */
|
||||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
||||||
0x25, 0x01, /* LOGICAL_MAXIMUM (1) */
|
0x25, 0xff, /* LOGICAL_MAXIMUM (255) */
|
||||||
0x75, 0x08, /* REPORT_SIZE (8) */
|
0x75, 0x08, /* REPORT_SIZE (8) */
|
||||||
0x95, 0x01, /* REPORT_COUNT (1) */
|
0x95, 0x01, /* REPORT_COUNT (1) */
|
||||||
0xB1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */
|
0x81, 0x83, /* INPUT (Cnst,Var,Abs,Vol) */
|
||||||
|
0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */
|
||||||
0x85, 0x01, /* REPORT_ID (1) */
|
/* 22 */
|
||||||
0x09, 0x01, /* USAGE (LED 1) */
|
|
||||||
0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */
|
|
||||||
/* 26 */
|
|
||||||
|
|
||||||
/* Led 2 */
|
|
||||||
0x85, 0x02, /* REPORT_ID 2 */
|
|
||||||
0x09, 0x02, /* USAGE (LED 2) */
|
|
||||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
|
||||||
0x25, 0x01, /* LOGICAL_MAXIMUM (1) */
|
|
||||||
0x75, 0x08, /* REPORT_SIZE (8) */
|
|
||||||
0x95, 0x01, /* REPORT_COUNT (1) */
|
|
||||||
0xB1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */
|
|
||||||
|
|
||||||
0x85, 0x02, /* REPORT_ID (2) */
|
|
||||||
0x09, 0x02, /* USAGE (LED 2) */
|
|
||||||
0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */
|
|
||||||
/* 46 */
|
|
||||||
|
|
||||||
/* Led 3 */
|
|
||||||
0x85, 0x03, /* REPORT_ID (3) */
|
|
||||||
0x09, 0x03, /* USAGE (LED 3) */
|
|
||||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
|
||||||
0x25, 0x01, /* LOGICAL_MAXIMUM (1) */
|
|
||||||
0x75, 0x08, /* REPORT_SIZE (8) */
|
|
||||||
0x95, 0x01, /* REPORT_COUNT (1) */
|
|
||||||
0xB1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */
|
|
||||||
|
|
||||||
0x85, 0x03, /* REPORT_ID (3) */
|
|
||||||
0x09, 0x03, /* USAGE (LED 3) */
|
|
||||||
0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */
|
|
||||||
/* 66 */
|
|
||||||
|
|
||||||
/* Led 4 */
|
|
||||||
0x85, 0x04, /* REPORT_ID 4) */
|
|
||||||
0x09, 0x04, /* USAGE (LED 4) */
|
|
||||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
|
||||||
0x25, 0x01, /* LOGICAL_MAXIMUM (1) */
|
|
||||||
0x75, 0x08, /* REPORT_SIZE (8) */
|
|
||||||
0x95, 0x01, /* REPORT_COUNT (1) */
|
|
||||||
0xB1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */
|
|
||||||
|
|
||||||
0x85, 0x04, /* REPORT_ID (4) */
|
|
||||||
0x09, 0x04, /* USAGE (LED 4) */
|
|
||||||
0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */
|
|
||||||
/* 86 */
|
|
||||||
|
|
||||||
/* key Push Button */
|
|
||||||
0x85, 0x05, /* REPORT_ID (5) */
|
|
||||||
0x09, 0x05, /* USAGE (Push Button) */
|
|
||||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
|
||||||
0x25, 0x01, /* LOGICAL_MAXIMUM (1) */
|
|
||||||
0x75, 0x01, /* REPORT_SIZE (1) */
|
|
||||||
0x81, 0x82, /* INPUT (Data,Var,Abs,Vol) */
|
|
||||||
|
|
||||||
0x09, 0x05, /* USAGE (Push Button) */
|
|
||||||
0x75, 0x01, /* REPORT_SIZE (1) */
|
|
||||||
0xb1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */
|
|
||||||
|
|
||||||
0x75, 0x07, /* REPORT_SIZE (7) */
|
|
||||||
0x81, 0x83, /* INPUT (Cnst,Var,Abs,Vol) */
|
|
||||||
0x85, 0x05, /* REPORT_ID (2) */
|
|
||||||
|
|
||||||
0x75, 0x07, /* REPORT_SIZE (7) */
|
|
||||||
0xb1, 0x83, /* FEATURE (Cnst,Var,Abs,Vol) */
|
|
||||||
/* 114 */
|
|
||||||
|
|
||||||
/* Tamper Push Button */
|
|
||||||
0x85, 0x06, /* REPORT_ID (6) */
|
|
||||||
0x09, 0x06, /* USAGE (Tamper Push Button) */
|
|
||||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
|
||||||
0x25, 0x01, /* LOGICAL_MAXIMUM (1) */
|
|
||||||
0x75, 0x01, /* REPORT_SIZE (1) */
|
|
||||||
0x81, 0x82, /* INPUT (Data,Var,Abs,Vol) */
|
|
||||||
|
|
||||||
0x09, 0x06, /* USAGE (Tamper Push Button) */
|
|
||||||
0x75, 0x01, /* REPORT_SIZE (1) */
|
|
||||||
0xb1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */
|
|
||||||
|
|
||||||
0x75, 0x07, /* REPORT_SIZE (7) */
|
|
||||||
0x81, 0x83, /* INPUT (Cnst,Var,Abs,Vol) */
|
|
||||||
0x85, 0x06, /* REPORT_ID (6) */
|
|
||||||
|
|
||||||
0x75, 0x07, /* REPORT_SIZE (7) */
|
|
||||||
0xb1, 0x83, /* FEATURE (Cnst,Var,Abs,Vol) */
|
|
||||||
/* 142 */
|
|
||||||
|
|
||||||
/* ADC IN */
|
|
||||||
0x85, 0x07, /* REPORT_ID (7) */
|
|
||||||
0x09, 0x07, /* USAGE (ADC IN) */
|
|
||||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
|
||||||
0x26, 0xff, 0x00, /* LOGICAL_MAXIMUM (255) */
|
|
||||||
0x75, 0x08, /* REPORT_SIZE (8) */
|
|
||||||
0x81, 0x82, /* INPUT (Data,Var,Abs,Vol) */
|
|
||||||
0x85, 0x07, /* REPORT_ID (7) */
|
|
||||||
0x09, 0x07, /* USAGE (ADC in) */
|
|
||||||
0xb1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */
|
|
||||||
/* 161 */
|
|
||||||
|
|
||||||
0xc0 /* END_COLLECTION */
|
0xc0 /* END_COLLECTION */
|
||||||
}; /* CustomHID_ReportDescriptor */
|
}; /* CustomHID_ReportDescriptor */
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
/******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
|
|
||||||
* File Name : usb_endp.c
|
|
||||||
* Author : MCD Application Team
|
|
||||||
* Version : V3.2.1
|
|
||||||
* Date : 07/05/2010
|
|
||||||
* Description : Endpoint routines
|
|
||||||
********************************************************************************
|
|
||||||
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
|
|
||||||
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
|
|
||||||
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
|
|
||||||
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
|
|
||||||
* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
|
|
||||||
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
|
||||||
#include "stm32f10x.h"
|
|
||||||
#include "usb_lib.h"
|
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
|
||||||
/* Private define ------------------------------------------------------------*/
|
|
||||||
/* Private macro -------------------------------------------------------------*/
|
|
||||||
/* Private variables ---------------------------------------------------------*/
|
|
||||||
uint8_t Receive_Buffer[2];
|
|
||||||
|
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
|
||||||
/* Private functions ---------------------------------------------------------*/
|
|
||||||
/*******************************************************************************
|
|
||||||
* Function Name : EP1_OUT_Callback.
|
|
||||||
* Description : EP1 OUT Callback Routine.
|
|
||||||
* Input : None.
|
|
||||||
* Output : None.
|
|
||||||
* Return : None.
|
|
||||||
*******************************************************************************/
|
|
||||||
void EP1_OUT_Callback(void)
|
|
||||||
{
|
|
||||||
|
|
||||||
/* Read recieved data (2 bytes) */
|
|
||||||
USB_SIL_Read(EP1_OUT, Receive_Buffer);
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef STM32F10X_CL
|
|
||||||
SetEPRxStatus(ENDP1, EP_RX_VALID);
|
|
||||||
#endif /* STM32F10X_CL */
|
|
||||||
|
|
||||||
char Send_Buffer[2];
|
|
||||||
Send_Buffer[0] = 0xff;
|
|
||||||
Send_Buffer[1] = 0xff;
|
|
||||||
USB_SIL_Write(EP1_IN, (uint8_t*) Send_Buffer, 2);
|
|
||||||
//SetEPTxValid(ENDP1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
|||||||
#include "usb_lib.h"
|
#include "usb_lib.h"
|
||||||
#include "pios_usb_hid_pwr.h"
|
#include "pios_usb_hid_pwr.h"
|
||||||
#include "pios_usb_hid_istr.h"
|
#include "pios_usb_hid_istr.h"
|
||||||
|
#include "pios_usb_hid.h"
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
@ -42,7 +43,7 @@ void (*pEpInt_IN[7])(void) =
|
|||||||
|
|
||||||
void (*pEpInt_OUT[7])(void) =
|
void (*pEpInt_OUT[7])(void) =
|
||||||
{
|
{
|
||||||
EP1_OUT_Callback,
|
PIOS_USB_HID_EP1_OUT_Callback,
|
||||||
EP2_OUT_Callback,
|
EP2_OUT_Callback,
|
||||||
EP3_OUT_Callback,
|
EP3_OUT_Callback,
|
||||||
EP4_OUT_Callback,
|
EP4_OUT_Callback,
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#define PIOS_HID_SIZ_DEVICE_DESC 18
|
#define PIOS_HID_SIZ_DEVICE_DESC 18
|
||||||
#define PIOS_HID_SIZ_CONFIG_DESC 41
|
#define PIOS_HID_SIZ_CONFIG_DESC 41
|
||||||
#define PIOS_HID_SIZ_REPORT_DESC 163
|
#define PIOS_HID_SIZ_REPORT_DESC 24
|
||||||
#define PIOS_HID_SIZ_STRING_LANGID 4
|
#define PIOS_HID_SIZ_STRING_LANGID 4
|
||||||
#define PIOS_HID_SIZ_STRING_VENDOR 28
|
#define PIOS_HID_SIZ_STRING_VENDOR 28
|
||||||
#define PIOS_HID_SIZ_STRING_PRODUCT 20
|
#define PIOS_HID_SIZ_STRING_PRODUCT 20
|
||||||
|
Loading…
x
Reference in New Issue
Block a user