IOTON boards API using mbed SDK - http://ioton.cc/plataforma-ton

Dependents:   ton-bot_teste ton-bot_seguidor_linha ton-bot_seguidor_parede

Fork of IOTON-API by Kleber Silva

Revision:
1:3a73d77c2cef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usb_user.c	Thu Jun 29 20:11:00 2017 +0000
@@ -0,0 +1,46 @@
+/* Ioton USBCD Library
+ * Copyright (c) 2016 Ioton Technology
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "usb_user.h"
+
+
+/* External Variables ------------------------------------------------------- */
+extern PCD_HandleTypeDef hpcd;
+USBD_HandleTypeDef USBD_Device;
+
+/**
+  * @brief USB initialization
+  * @param None
+  * @return None
+  */
+void initUSB(void)
+{
+	USBD_Init(&USBD_Device, &VCP_Desc, 0);
+	USBD_RegisterClass(&USBD_Device, &USBD_CDC);
+	USBD_CDC_RegisterInterface(&USBD_Device, &USBD_CDC_Template_fops);
+	USBD_Start(&USBD_Device);
+}
+
+
+/**
+  * @brief  This function handles USB-On-The-Go FS global interrupt request.
+  * @param  None
+  * @retval None
+  */
+void OTG_FS_IRQHandler(void)
+{
+    HAL_PCD_IRQHandler(&hpcd);
+}