From 873cacfc73187ddc7088fb41141c6d40caede8fd Mon Sep 17 00:00:00 2001 From: Michel Jaouen Date: Mon, 13 Feb 2017 09:50:13 +0100 Subject: [PATCH] Revert "Revert "Target stm usb config"" This reverts commit ec329be6f24a2cdc6cc1b2ce9cc28eb8b4ffb5bf. --- .../USBDevice/TARGET_STM/USBHAL_STM32.cpp | 11 +- .../USBDevice/USBDevice/USBEndpoints.h | 2 +- .../unsupported/USBDevice/USBDevice/USBHAL.h | 2 +- .../TARGET_NUCLEO_F103RB/USBHAL_STM32F103RB.h | 143 ++++++++++++++++++ .../TARGET_NUCLEO_F103RB/USBHAL_STM_TARGET.h | 19 +++ .../USBHALHost_STM_TARGET.h | 19 +++ .../TARGET_NUCLEO_F207ZG}/USBHAL_STM_TARGET.h | 22 --- .../USBHAL_STM32F303ZE.h | 0 .../TARGET_NUCLEO_F303ZE/USBHAL_STM_TARGET.h | 18 +++ .../TARGET_DISCO_F407VG/USBHAL_STM_TARGET.h | 18 +++ .../USBHALHost_DISCOF429ZI.h | 0 .../USBHALHost_STM_TARGET.h | 18 +++ .../TARGET_F429_F439/USBHALHost_STM_TARGET.h | 18 +++ .../TARGET_F429_F439/USBHAL_STM_TARGET.h | 18 +++ .../USBHALHost_STM_TARGET.h | 20 +++ .../TARGET_NUCLEO_F401RE/USBHAL_STM_TARGET.h | 18 +++ .../USBHALHost_STM_TARGET.h | 0 .../TARGET_NUCLEO_F411RE/USBHAL_STM_TARGET.h | 19 +++ .../USBHALHost_STM_TARGET.h | 19 +++ .../TARGET_NUCLEO_F412ZG/USBHAL_STM_TARGET.h | 18 +++ .../USBHALHost_STM_TARGET.h | 19 +++ .../TARGET_NUCLEO_F446ZE/USBHAL_STM_TARGET.h | 18 +++ .../TARGET_DISCO_F769NI}/USBHAL_STM32F769NI.h | 0 .../TARGET_DISCO_F769NI/USBHAL_STM_TARGET.h | 19 +++ .../TARGET_F746_F756/USBHALHost_STM_TARGET.h | 18 +++ .../TARGET_F746_F756/USBHAL_STM_TARGET.h | 19 +++ .../USBHALHost_STM_TARGET.h | 19 +++ .../TARGET_NUCLEO_F767ZI/USBHAL_STM_TARGET.h | 18 +++ .../USBHALHost_DISCOL476VG.h | 0 .../USBHALHost_STM_TARGET.h | 18 +++ .../TARGET_DISCO_L476VG}/USBHAL_STM32L476VG.h | 0 .../TARGET_DISCO_L476VG/USBHAL_STM_TARGET.h | 18 +++ .../USBHALHost_STM_TARGET.h | 19 +++ .../TARGET_STM/USBHALHost_STM_144_64pins.h | 0 .../TARGET_STM/USBHAL_STM_144_64pins.h | 0 targets/targets.json | 2 +- 36 files changed, 562 insertions(+), 27 deletions(-) create mode 100644 targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/USBHAL_STM32F103RB.h create mode 100644 targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/USBHAL_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/USBHALHost_STM_TARGET.h rename {features/unsupported/USBDevice/USBDevice/TARGET_STM => targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG}/USBHAL_STM_TARGET.h (68%) rename {features/unsupported/USBDevice/USBDevice/TARGET_STM => targets/TARGET_STM/TARGET_STM32F3/TARGET_NUCLEO_F303ZE}/USBHAL_STM32F303ZE.h (100%) create mode 100644 targets/TARGET_STM/TARGET_STM32F3/TARGET_NUCLEO_F303ZE/USBHAL_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F407VG/USBHAL_STM_TARGET.h rename {features/unsupported/USBHost/USBHost/TARGET_STM => targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI}/USBHALHost_DISCOF429ZI.h (100%) create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/USBHALHost_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_F429_F439/USBHALHost_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_F429_F439/USBHAL_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/USBHALHost_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/USBHAL_STM_TARGET.h rename {features/unsupported/USBHost/USBHost/TARGET_STM => targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F411RE}/USBHALHost_STM_TARGET.h (100%) create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F411RE/USBHAL_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F412ZG/USBHALHost_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F412ZG/USBHAL_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446ZE/USBHALHost_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446ZE/USBHAL_STM_TARGET.h rename {features/unsupported/USBDevice/USBDevice/TARGET_STM => targets/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F769NI}/USBHAL_STM32F769NI.h (100%) create mode 100644 targets/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F769NI/USBHAL_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F7/TARGET_F746_F756/USBHALHost_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F7/TARGET_F746_F756/USBHAL_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F767ZI/USBHALHost_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F767ZI/USBHAL_STM_TARGET.h rename {features/unsupported/USBHost/USBHost/TARGET_STM => targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG}/USBHALHost_DISCOL476VG.h (100%) create mode 100644 targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHALHost_STM_TARGET.h rename {features/unsupported/USBDevice/USBDevice/TARGET_STM => targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG}/USBHAL_STM32L476VG.h (100%) create mode 100644 targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHAL_STM_TARGET.h create mode 100644 targets/TARGET_STM/TARGET_STM32L4/TARGET_L476_L486/TARGET_NUCLEO_L476RG/USBHALHost_STM_TARGET.h rename {features/unsupported/USBHost/USBHost => targets}/TARGET_STM/USBHALHost_STM_144_64pins.h (100%) rename {features/unsupported/USBDevice/USBDevice => targets}/TARGET_STM/USBHAL_STM_144_64pins.h (100%) diff --git a/features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM32.cpp b/features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM32.cpp index 491b833d24..36c0caf359 100644 --- a/features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM32.cpp +++ b/features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM32.cpp @@ -15,9 +15,16 @@ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if (defined (USB_STM_HAL) && defined(TARGET_STM32F4)) \ -|| defined(TARGET_STM32F2) || defined (TARGET_STM32F7) || defined (TARGET_STM32F3) || defined (TARGET_STM32L4) +/* TARGET NOT STM does not support this HAL */ +#ifndef TARGET_STM +#define USBSTM_HAL_UNSUPPORTED +#endif +/* F4 famlily wihtout USB_STM_HAL use another HAL*/ +#if defined(TARGET_STM) && defined(TARGET_STM32F4) && !defined(USB_STM_HAL) +#define USBSTM_HAL_UNSUPPORTED +#endif +#ifndef USBSTM_HAL_UNSUPPORTED #include "USBHAL.h" #include "pinmap.h" /* mbed endpoint definition to hal definition */ diff --git a/features/unsupported/USBDevice/USBDevice/USBEndpoints.h b/features/unsupported/USBDevice/USBDevice/USBEndpoints.h index d1220bbdad..9da0b57225 100644 --- a/features/unsupported/USBDevice/USBDevice/USBEndpoints.h +++ b/features/unsupported/USBDevice/USBDevice/USBEndpoints.h @@ -45,7 +45,7 @@ typedef enum { #include "USBEndpoints_KL25Z.h" #elif !defined(USB_STM_HAL) && defined(TARGET_STM32F4) #include "USBEndpoints_STM32F4.h" -#elif defined (TARGET_STM32F4) || defined (TARGET_STM32F2) || defined (TARGET_STM32F7) || defined (TARGET_STM32F3) || defined(TARGET_STM32L4) +#elif defined (TARGET_STM32F4) || defined (TARGET_STM32F2) || defined (TARGET_STM32F7) || defined (TARGET_STM32F3) || defined(TARGET_STM32L4) || defined(TARGET_STM32F1) #include "USBEndpoints_STM32.h" #elif defined (TARGET_RZ_A1H) || defined (TARGET_VK_RZ_A1H) #include "USBEndpoints_RZ_A1H.h" diff --git a/features/unsupported/USBDevice/USBDevice/USBHAL.h b/features/unsupported/USBDevice/USBDevice/USBHAL.h index 1a98427de7..86f0786d9c 100644 --- a/features/unsupported/USBDevice/USBDevice/USBHAL.h +++ b/features/unsupported/USBDevice/USBDevice/USBHAL.h @@ -130,7 +130,7 @@ private: bool (USBHAL::*epCallback[10 - 2])(void); #elif (defined(TARGET_STM32F4) && !defined(USB_STM_HAL)) || defined(TARGET_NUMAKER_PFM_M453) bool (USBHAL::*epCallback[8 - 2])(void); -#elif defined(TARGET_STM32F4) || defined(TARGET_STM32F3) || defined (TARGET_STM32F2)|| defined(TARGET_STM32L4) || defined(TARGET_STM32F7) +#elif defined(TARGET_STM) PCD_HandleTypeDef hpcd; #elif defined(TARGET_NUMAKER_PFM_NUC472) bool (USBHAL::*epCallback[14 - 2])(void); diff --git a/targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/USBHAL_STM32F103RB.h b/targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/USBHAL_STM32F103RB.h new file mode 100644 index 0000000000..45c6561c74 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/USBHAL_STM32F103RB.h @@ -0,0 +1,143 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#ifndef USBHAL_STM32F103RB +#define USBHAL_STM32F103RB + +#define USBHAL_IRQn USB_LP_CAN1_RX0_IRQn + + +#define NB_ENDPOINT 8 +/* must be multiple of 4 bytes */ +#define MAXTRANSFER_SIZE 0x200 +#define FIFO_USB_RAM_SIZE (MAXTRANSFER_SIZE+MAX_PACKET_SIZE_EP0+MAX_PACKET_SIZE_EP1+MAX_PACKET_SIZE_EP2+MAX_PACKET_SIZE_EP3) +#if (FIFO_USB_RAM_SIZE > 0x500) +#error "FIFO dimensioning incorrect" +#endif + +typedef struct +{ + USBHAL *inst; + void (USBHAL::*bus_reset)(void); + void (USBHAL::*sof)(int frame); + void (USBHAL::*connect_change)(unsigned int connected); + void (USBHAL::*suspend_change)(unsigned int suspended); + void (USBHAL::*ep0_setup)(void); + void (USBHAL::*ep0_in)(void); + void (USBHAL::*ep0_out)(void); + void (USBHAL::*ep0_read)(void); + bool (USBHAL::*ep_realise)(uint8_t endpoint, uint32_t maxPacket, uint32_t flags); + bool (USBHAL::*epCallback[2*NB_ENDPOINT-2])(void); + uint8_t epComplete[8]; + /* memorize dummy buffer used for reception */ + uint32_t pBufRx[MAXTRANSFER_SIZE>>2]; + uint32_t pBufRx0[MAX_PACKET_SIZE_EP0>>2]; + gpio_t usb_switch; +}USBHAL_Private_t; + +void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state){ + USBHAL_Private_t *priv=((USBHAL_Private_t *)(hpcd->pData)); + gpio_write(&(priv->usb_switch),!state); +} + +uint32_t HAL_PCDEx_GetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo) +{ + return 1024; +} +void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd) { + USBHAL_Private_t *priv=((USBHAL_Private_t *)(hpcd->pData)); + USBHAL *obj= priv->inst; + uint32_t sofnum = (hpcd->Instance->FNR) & USB_FNR_FN; + void (USBHAL::*func)(int frame) = priv->sof; + /* fix me call with same frame number */ + (obj->*func)(sofnum); +} + +USBHAL * USBHAL::instance; + +USBHAL::USBHAL(void) { + /* init parameter */ + USBHAL_Private_t *HALPriv = new(USBHAL_Private_t); + /* initialized all field of init including 0 field */ + /* constructor does not fill with zero */ + hpcd.Instance = USB; + /* initialized all field of init including 0 field */ + /* constructor does not fill with zero */ + memset(&hpcd.Init, 0, sizeof(hpcd.Init)); + hpcd.Init.dev_endpoints = NB_ENDPOINT; + hpcd.Init.ep0_mps = MAX_PACKET_SIZE_EP0; + hpcd.Init.phy_itface = PCD_PHY_EMBEDDED; + hpcd.Init.Sof_enable = 1; + hpcd.Init.speed = PCD_SPEED_FULL; + /* pass instance for usage inside call back */ + HALPriv->inst = this; + HALPriv->bus_reset = &USBHAL::busReset; + HALPriv->suspend_change = &USBHAL::suspendStateChanged; + HALPriv->connect_change = &USBHAL::connectStateChanged; + HALPriv->sof = &USBHAL::SOF; + HALPriv->ep0_setup = &USBHAL::EP0setupCallback; + HALPriv->ep_realise = &USBHAL::realiseEndpoint; + HALPriv->ep0_in = &USBHAL::EP0in; + HALPriv->ep0_out = &USBHAL::EP0out; + HALPriv->ep0_read = &USBHAL::EP0read; + hpcd.pData = (void*)HALPriv; + HALPriv->epCallback[0] = &USBHAL::EP1_OUT_callback; + HALPriv->epCallback[1] = &USBHAL::EP1_IN_callback; + HALPriv->epCallback[2] = &USBHAL::EP2_OUT_callback; + HALPriv->epCallback[3] = &USBHAL::EP2_IN_callback; + HALPriv->epCallback[4] = &USBHAL::EP3_OUT_callback; + HALPriv->epCallback[5] = &USBHAL::EP3_IN_callback; + instance = this; + + + /* Configure USB VBUS GPIO */ + gpio_init_out(&HALPriv->usb_switch,PB_14); + gpio_mode(&HALPriv->usb_switch,OpenDrain); + /* Configure USB FS GPIOs */ + + /* Configure DM DP Pins */ + /* - USB-DP (D+ of the USB connector) <======> PA12 (Nucleo board) + Make sure to connect a 1.5KOhm pull up to USB-DP PA12 pin (permanent pull-up) + - USB-DM (D- of the USB connector) <======> PA11 (Nucleo board) */ + + pin_function(PA_11, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_MODE_AF_INPUT)); + pin_function(PA_12, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_MODE_AF_INPUT)); + + __HAL_RCC_USB_CLK_ENABLE(); + + hpcd.State = HAL_PCD_STATE_RESET; + + HAL_PCD_Init(&hpcd); + /* hardcoded size of FIFO according definition*/ + HAL_PCDEx_PMAConfig(&hpcd , 0x00 , PCD_SNG_BUF, 0x30); + HAL_PCDEx_PMAConfig(&hpcd , 0x80 , PCD_SNG_BUF, 0x70); + HAL_PCDEx_PMAConfig(&hpcd , 0x01 , PCD_SNG_BUF, 0x90); + HAL_PCDEx_PMAConfig(&hpcd , 0x81 , PCD_SNG_BUF, 0xb0); +#if 0 + HAL_PCDEx_PMAConfig(&hpcd , 0x2, PCD_DBL_BUF, 0x018000b0); +#else + HAL_PCDEx_PMAConfig(&hpcd , 0x2, PCD_SNG_BUF, 0x100); +#endif + HAL_PCDEx_PMAConfig(&hpcd , 0x82, PCD_SNG_BUF, 0x120); + + NVIC_SetVector(USBHAL_IRQn,(uint32_t)&_usbisr); + NVIC_SetPriority( USBHAL_IRQn, 1); + + HAL_PCD_Start(&hpcd); +} + +#endif diff --git a/targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..792a1827cb --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/USBHAL_STM_TARGET.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHAL_STM32F103RB.h" + diff --git a/targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/USBHALHost_STM_TARGET.h new file mode 100644 index 0000000000..64e2ac4af6 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/USBHALHost_STM_TARGET.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHALHost_STM_144_64pins.h" + diff --git a/features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/USBHAL_STM_TARGET.h similarity index 68% rename from features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM_TARGET.h rename to targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/USBHAL_STM_TARGET.h index 63125644be..4b800c6894 100644 --- a/features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM_TARGET.h +++ b/targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/USBHAL_STM_TARGET.h @@ -15,27 +15,5 @@ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifdef TARGET_STM32F303ZE -#include "USBHAL_STM32F303ZE.h" -#endif - -#if defined(TARGET_STM32F207ZG) || \ - defined(TARGET_STM32F401RE) || \ - defined(TARGET_STM32F407VG) || \ - defined(TARGET_STM32F411RE) || \ - defined(TARGET_STM32F412ZG) || \ - defined(TARGET_STM32F429ZI) || \ - defined(TARGET_STM32F446ZE) || \ - defined(TARGET_STM32F746ZG) || \ - defined(TARGET_STM32F767ZI) #include "USBHAL_STM_144_64pins.h" -#endif -#ifdef TARGET_STM32L476VG -#include "USBHAL_STM32L476VG.h" -#endif - -#ifdef TARGET_STM32F769NI -#include "USBHAL_STM32F769NI.h" -#endif diff --git a/features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM32F303ZE.h b/targets/TARGET_STM/TARGET_STM32F3/TARGET_NUCLEO_F303ZE/USBHAL_STM32F303ZE.h similarity index 100% rename from features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM32F303ZE.h rename to targets/TARGET_STM/TARGET_STM32F3/TARGET_NUCLEO_F303ZE/USBHAL_STM32F303ZE.h diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_NUCLEO_F303ZE/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F3/TARGET_NUCLEO_F303ZE/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..d3b8275f6b --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F3/TARGET_NUCLEO_F303ZE/USBHAL_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHAL_STM32F303ZE.h" diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F407VG/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F407VG/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..238f70e296 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F407VG/USBHAL_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHAL_STM_144_64pins.h" diff --git a/features/unsupported/USBHost/USBHost/TARGET_STM/USBHALHost_DISCOF429ZI.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/USBHALHost_DISCOF429ZI.h similarity index 100% rename from features/unsupported/USBHost/USBHost/TARGET_STM/USBHALHost_DISCOF429ZI.h rename to targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/USBHALHost_DISCOF429ZI.h diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/USBHALHost_STM_TARGET.h new file mode 100644 index 0000000000..a2c64dec53 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/USBHALHost_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHALHost_DISCOF429ZI.h" diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_F429_F439/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_F429_F439/USBHALHost_STM_TARGET.h new file mode 100644 index 0000000000..29d3666cf2 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_F429_F439/USBHALHost_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHALHost_STM_144_64pins.h" diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_F429_F439/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_F429_F439/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..238f70e296 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_F429_F439/USBHAL_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHAL_STM_144_64pins.h" diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/USBHALHost_STM_TARGET.h new file mode 100644 index 0000000000..466535271a --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/USBHALHost_STM_TARGET.h @@ -0,0 +1,20 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#define USBHALHOST_64pins +#include "USBHALHost_STM_144_64pins.h" + diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..238f70e296 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/USBHAL_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHAL_STM_144_64pins.h" diff --git a/features/unsupported/USBHost/USBHost/TARGET_STM/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F411RE/USBHALHost_STM_TARGET.h similarity index 100% rename from features/unsupported/USBHost/USBHost/TARGET_STM/USBHALHost_STM_TARGET.h rename to targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F411RE/USBHALHost_STM_TARGET.h diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F411RE/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F411RE/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..843e323c46 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F411RE/USBHAL_STM_TARGET.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "USBHAL_STM_144_64pins.h" diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F412ZG/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F412ZG/USBHALHost_STM_TARGET.h new file mode 100644 index 0000000000..64e2ac4af6 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F412ZG/USBHALHost_STM_TARGET.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHALHost_STM_144_64pins.h" + diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F412ZG/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F412ZG/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..238f70e296 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F412ZG/USBHAL_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHAL_STM_144_64pins.h" diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446ZE/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446ZE/USBHALHost_STM_TARGET.h new file mode 100644 index 0000000000..64e2ac4af6 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446ZE/USBHALHost_STM_TARGET.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHALHost_STM_144_64pins.h" + diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446ZE/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446ZE/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..238f70e296 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446ZE/USBHAL_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHAL_STM_144_64pins.h" diff --git a/features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM32F769NI.h b/targets/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F769NI/USBHAL_STM32F769NI.h similarity index 100% rename from features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM32F769NI.h rename to targets/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F769NI/USBHAL_STM32F769NI.h diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F769NI/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F769NI/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..921d628954 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F769NI/USBHAL_STM_TARGET.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "USBHAL_STM32F769NI.h" diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_F746_F756/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F7/TARGET_F746_F756/USBHALHost_STM_TARGET.h new file mode 100644 index 0000000000..29d3666cf2 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_F746_F756/USBHALHost_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHALHost_STM_144_64pins.h" diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_F746_F756/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F7/TARGET_F746_F756/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..4b800c6894 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_F746_F756/USBHAL_STM_TARGET.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHAL_STM_144_64pins.h" + diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F767ZI/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F767ZI/USBHALHost_STM_TARGET.h new file mode 100644 index 0000000000..64e2ac4af6 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F767ZI/USBHALHost_STM_TARGET.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHALHost_STM_144_64pins.h" + diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F767ZI/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F767ZI/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..238f70e296 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F767ZI/USBHAL_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHAL_STM_144_64pins.h" diff --git a/features/unsupported/USBHost/USBHost/TARGET_STM/USBHALHost_DISCOL476VG.h b/targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHALHost_DISCOL476VG.h similarity index 100% rename from features/unsupported/USBHost/USBHost/TARGET_STM/USBHALHost_DISCOL476VG.h rename to targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHALHost_DISCOL476VG.h diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHALHost_STM_TARGET.h new file mode 100644 index 0000000000..655bcb53f5 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHALHost_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHALHost_DISCOL476VG.h" diff --git a/features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM32L476VG.h b/targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHAL_STM32L476VG.h similarity index 100% rename from features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM32L476VG.h rename to targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHAL_STM32L476VG.h diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHAL_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHAL_STM_TARGET.h new file mode 100644 index 0000000000..cff7955d05 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/USBHAL_STM_TARGET.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include "USBHAL_STM32L476VG.h" diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_L476_L486/TARGET_NUCLEO_L476RG/USBHALHost_STM_TARGET.h b/targets/TARGET_STM/TARGET_STM32L4/TARGET_L476_L486/TARGET_NUCLEO_L476RG/USBHALHost_STM_TARGET.h new file mode 100644 index 0000000000..1615a0c29f --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_L476_L486/TARGET_NUCLEO_L476RG/USBHALHost_STM_TARGET.h @@ -0,0 +1,19 @@ +/* Copyright (c) 2016 mbed.org, MIT License +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software +* and associated documentation files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all copies or +* substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#define USBHALHOST_64pins +#include "USBHALHost_STM_144_64pins.h" diff --git a/features/unsupported/USBHost/USBHost/TARGET_STM/USBHALHost_STM_144_64pins.h b/targets/TARGET_STM/USBHALHost_STM_144_64pins.h similarity index 100% rename from features/unsupported/USBHost/USBHost/TARGET_STM/USBHALHost_STM_144_64pins.h rename to targets/TARGET_STM/USBHALHost_STM_144_64pins.h diff --git a/features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM_144_64pins.h b/targets/TARGET_STM/USBHAL_STM_144_64pins.h similarity index 100% rename from features/unsupported/USBDevice/USBDevice/TARGET_STM/USBHAL_STM_144_64pins.h rename to targets/TARGET_STM/USBHAL_STM_144_64pins.h diff --git a/targets/targets.json b/targets/targets.json index 1297e9a507..e95493fc3e 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -903,7 +903,7 @@ "extra_labels": ["STM", "STM32F4", "STM32F439", "STM32F439ZI", "STM32F439xx", "STM32F439xI", "FLASH_CMSIS_ALGO"], "supported_toolchains": ["ARM", "uARM", "GCC_ARM", "IAR"], "progen": {"target": "nucleo-f439zi"}, - "macros": ["TRANSACTION_QUEUE_SIZE_SPI=2", "MBEDTLS_CONFIG_HW_SUPPORT"], + "macros": ["TRANSACTION_QUEUE_SIZE_SPI=2", "MBEDTLS_CONFIG_HW_SUPPORT", "USB_STM_HAL", "USBHOST_OTHER"], "device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "TRNG", "FLASH"], "detect_code": ["0797"], "features": ["LWIP"],