summaryrefslogtreecommitdiff
path: root/stmhal/usbd_cdc_interface.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-11-01 21:26:06 +0000
committerDamien George <damien.p.george@gmail.com>2015-02-13 14:02:51 +0000
commitd39c7aa517b722161a7dd792fafc5096d58beec8 (patch)
treef7287fe0f4b6790a3538e31b0a5a06b8939fd64f /stmhal/usbd_cdc_interface.c
parentb384bcc5de2c20d1d985e2768729578373bd73c1 (diff)
stmhal: Add Python-configurable USB HID mode.
Different HID modes can be configured in Python. You can either use predefined mouse or keyboard, or write your own report descriptor.
Diffstat (limited to 'stmhal/usbd_cdc_interface.c')
-rw-r--r--stmhal/usbd_cdc_interface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stmhal/usbd_cdc_interface.c b/stmhal/usbd_cdc_interface.c
index 5814da646..66bfe1a22 100644
--- a/stmhal/usbd_cdc_interface.c
+++ b/stmhal/usbd_cdc_interface.c
@@ -35,12 +35,15 @@
/* Includes ------------------------------------------------------------------*/
#include <stdbool.h>
+#include <stdint.h>
-#include "stm32f4xx_hal.h"
#include "usbd_cdc_msc_hid.h"
#include "usbd_cdc_interface.h"
#include "pendsv.h"
+#include "py/obj.h"
+#include "usb.h"
+
// CDC control commands
#define CDC_SEND_ENCAPSULATED_COMMAND 0x00
#define CDC_GET_ENCAPSULATED_RESPONSE 0x01
@@ -76,9 +79,6 @@ static uint8_t UserTxNeedEmptyPacket = 0; // used to flush the USB IN endpoint i
static int user_interrupt_char = -1;
static void *user_interrupt_data = NULL;
-/* USB handler declaration */
-extern USBD_HandleTypeDef hUSBDDevice;
-
/* Private function prototypes -----------------------------------------------*/
static int8_t CDC_Itf_Init (void);
static int8_t CDC_Itf_DeInit (void);