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

Committer:
krebyy
Date:
Thu Jun 29 20:20:49 2017 +0000
Revision:
3:9c7195d31602
Parent:
1:3a73d77c2cef
Update to TON Board V1.2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
krebyy 1:3a73d77c2cef 1 /* Ioton USBCD Library
krebyy 1:3a73d77c2cef 2 * Copyright (c) 2016 Ioton Technology
krebyy 1:3a73d77c2cef 3 *
krebyy 1:3a73d77c2cef 4 * Licensed under the Apache License, Version 2.0 (the "License");
krebyy 1:3a73d77c2cef 5 * you may not use this file except in compliance with the License.
krebyy 1:3a73d77c2cef 6 * You may obtain a copy of the License at
krebyy 1:3a73d77c2cef 7 *
krebyy 1:3a73d77c2cef 8 * http://www.apache.org/licenses/LICENSE-2.0
krebyy 1:3a73d77c2cef 9 *
krebyy 1:3a73d77c2cef 10 * Unless required by applicable law or agreed to in writing, software
krebyy 1:3a73d77c2cef 11 * distributed under the License is distributed on an "AS IS" BASIS,
krebyy 1:3a73d77c2cef 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
krebyy 1:3a73d77c2cef 13 * See the License for the specific language governing permissions and
krebyy 1:3a73d77c2cef 14 * limitations under the License.
krebyy 1:3a73d77c2cef 15 */
krebyy 1:3a73d77c2cef 16
krebyy 1:3a73d77c2cef 17 #include "usb_user.h"
krebyy 1:3a73d77c2cef 18
krebyy 1:3a73d77c2cef 19
krebyy 1:3a73d77c2cef 20 /* External Variables ------------------------------------------------------- */
krebyy 1:3a73d77c2cef 21 extern PCD_HandleTypeDef hpcd;
krebyy 1:3a73d77c2cef 22 USBD_HandleTypeDef USBD_Device;
krebyy 1:3a73d77c2cef 23
krebyy 1:3a73d77c2cef 24 /**
krebyy 1:3a73d77c2cef 25 * @brief USB initialization
krebyy 1:3a73d77c2cef 26 * @param None
krebyy 1:3a73d77c2cef 27 * @return None
krebyy 1:3a73d77c2cef 28 */
krebyy 1:3a73d77c2cef 29 void initUSB(void)
krebyy 1:3a73d77c2cef 30 {
krebyy 1:3a73d77c2cef 31 USBD_Init(&USBD_Device, &VCP_Desc, 0);
krebyy 1:3a73d77c2cef 32 USBD_RegisterClass(&USBD_Device, &USBD_CDC);
krebyy 1:3a73d77c2cef 33 USBD_CDC_RegisterInterface(&USBD_Device, &USBD_CDC_Template_fops);
krebyy 1:3a73d77c2cef 34 USBD_Start(&USBD_Device);
krebyy 1:3a73d77c2cef 35 }
krebyy 1:3a73d77c2cef 36
krebyy 1:3a73d77c2cef 37
krebyy 1:3a73d77c2cef 38 /**
krebyy 1:3a73d77c2cef 39 * @brief This function handles USB-On-The-Go FS global interrupt request.
krebyy 1:3a73d77c2cef 40 * @param None
krebyy 1:3a73d77c2cef 41 * @retval None
krebyy 1:3a73d77c2cef 42 */
krebyy 1:3a73d77c2cef 43 void OTG_FS_IRQHandler(void)
krebyy 1:3a73d77c2cef 44 {
krebyy 1:3a73d77c2cef 45 HAL_PCD_IRQHandler(&hpcd);
krebyy 1:3a73d77c2cef 46 }