From 40e04e3772726829d66c12e69f24b03920d79c67 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 25 Jan 2017 22:24:18 +0100 Subject: o Moving tinyprintf and stm libraries under thirdparty. --- .../Projects/JoyStickMouse/inc/hw_config.h | 62 ++++++ .../Projects/JoyStickMouse/inc/platform_config.h | 216 +++++++++++++++++++++ .../Projects/JoyStickMouse/inc/stm32_it.h | 58 ++++++ .../Projects/JoyStickMouse/inc/stm32f10x_conf.h | 85 ++++++++ .../Projects/JoyStickMouse/inc/stm32f37x_conf.h | 83 ++++++++ .../Projects/JoyStickMouse/inc/stm32l1xx_conf.h | 82 ++++++++ .../Projects/JoyStickMouse/inc/usb_conf.h | 91 +++++++++ .../Projects/JoyStickMouse/inc/usb_istr.h | 95 +++++++++ .../Projects/JoyStickMouse/inc/usb_prop.h | 82 ++++++++ .../Projects/JoyStickMouse/inc/usb_pwr.h | 71 +++++++ 10 files changed, 925 insertions(+) create mode 100644 thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/hw_config.h create mode 100644 thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/platform_config.h create mode 100644 thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32_it.h create mode 100644 thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32f10x_conf.h create mode 100644 thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32f37x_conf.h create mode 100644 thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32l1xx_conf.h create mode 100644 thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_conf.h create mode 100644 thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_istr.h create mode 100644 thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_prop.h create mode 100644 thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_pwr.h (limited to 'thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc') diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/hw_config.h b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/hw_config.h new file mode 100644 index 0000000..f23e72a --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/hw_config.h @@ -0,0 +1,62 @@ +/** + ****************************************************************************** + * @file hw_config.h + * @author MCD Application Team + * @version V4.0.0 + * @date 21-January-2013 + * @brief Hardware Configuration & Setup + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2013 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 + * + * 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __HW_CONFIG_H +#define __HW_CONFIG_H + +/* Includes ------------------------------------------------------------------*/ +#include "platform_config.h" +#include "usb_type.h" + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported define -----------------------------------------------------------*/ +#define CURSOR_STEP 20 + +#define DOWN 2 +#define LEFT 3 +#define RIGHT 4 +#define UP 5 + +/* Exported functions ------------------------------------------------------- */ +void Set_System(void); +void Set_USBClock(void); +void GPIO_AINConfig(void); +void Enter_LowPowerMode(void); +void Leave_LowPowerMode(void); +void USB_Interrupts_Config(void); +void USB_Cable_Config (FunctionalState NewState); +void Joystick_Send(uint8_t Keys); +uint8_t JoyState(void); +void Get_SerialNum(void); + +#endif /*__HW_CONFIG_H*/ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/platform_config.h b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/platform_config.h new file mode 100644 index 0000000..9bb96d1 --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/platform_config.h @@ -0,0 +1,216 @@ +/** + ****************************************************************************** + * @file platform_config.h + * @author MCD Application Team + * @version V4.0.0 + * @date 21-January-2013 + * @brief Evaluation board specific configuration file. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2013 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 + * + * 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __PLATFORM_CONFIG_H +#define __PLATFORM_CONFIG_H + +/* Includes ------------------------------------------------------------------*/ +#if defined(STM32L1XX_MD) || defined(STM32L1XX_HD)|| defined(STM32L1XX_MD_PLUS) + #include "stm32l1xx.h" + #if defined (USE_STM32L152_EVAL) + #include "stm32l152_eval.h" + #elif defined (USE_STM32L152D_EVAL) + #include "stm32l152d_eval.h" + #else + #error "Missing define: USE_STM32L152_EVAL or USE_STM32L152D_EVAL" + #endif /* USE_STM32L152_EVAL */ +#elif defined (STM32F10X_MD) || defined (STM32F10X_HD) || defined (STM32F10X_XL) + #include "stm32f10x.h" + #if defined (USE_STM3210B_EVAL) + #include "stm3210b_eval.h" + #elif defined (USE_STM3210E_EVAL) + #include "stm3210e_eval.h" + #else + #error "Missing define: USE_STM3210B_EVAL, USE_STM3210E_EVAL" + #endif /* USE_STM3210B_EVAL */ +#elif defined (USE_STM32373C_EVAL) + #include "stm32f37x.h" + #include "stm32373c_eval.h" + +#elif defined (USE_STM32303C_EVAL) + #include "stm32f30x.h" + #include "stm32303c_eval.h" +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Uncomment the line corresponding to the STMicroelectronics evaluation board + used to run the example */ +#if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) && !defined (USE_STM32L152_EVAL) && !defined (USE_STM32L152D_EVAL)&& !defined (USE_STM32373C_EVAL) && !defined (USE_STM32303C_EVAL) + //#define USE_STM3210B_EVAL + //#define USE_STM3210E_EVAL + //#define USE_STM32L152_EVAL +//#define USE_STM32L152D_EVAL +//#define USE_STM32373C_EVAL + #define USE_STM32303C_EVAL +#endif + +/*Unique Devices IDs register set*/ + +#if defined(STM32L1XX_MD) || defined(STM32L1XX_HD) || defined(STM32L1XX_MD_PLUS) + +#define ID1 (0x1FF80050) +#define ID2 (0x1FF80054) +#define ID3 (0x1FF80064) + +#elif defined (STM32F37X) || defined(STM32F30X) + +#define ID1 (0x1FFFF7AC) +#define ID2 (0x1FFFF7B0) +#define ID3 (0x1FFFF7B4) + +#else /*STM32F1x*/ + +#define ID1 (0x1FFFF7E8) +#define ID2 (0x1FFFF7EC) +#define ID3 (0x1FFFF7F0) + +#endif + +/* Define the STM32F10x hardware depending on the used evaluation board */ +#ifdef USE_STM3210B_EVAL + #define USB_DISCONNECT GPIOD + #define USB_DISCONNECT_PIN GPIO_Pin_9 + + #define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOD + + #define RCC_APB2Periph_ALLGPIO (RCC_APB2Periph_GPIOA \ + | RCC_APB2Periph_GPIOB \ + | RCC_APB2Periph_GPIOC \ + | RCC_APB2Periph_GPIOD \ + | RCC_APB2Periph_GPIOE ) + +#elif defined (USE_STM3210E_EVAL) + #define USB_DISCONNECT GPIOB + #define USB_DISCONNECT_PIN GPIO_Pin_14 + #define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOB + + #define RCC_APB2Periph_ALLGPIO (RCC_APB2Periph_GPIOA \ + | RCC_APB2Periph_GPIOB \ + | RCC_APB2Periph_GPIOC \ + | RCC_APB2Periph_GPIOD \ + | RCC_APB2Periph_GPIOE \ + | RCC_APB2Periph_GPIOF \ + | RCC_APB2Periph_GPIOG ) + +#elif defined (USE_STM32L152_EVAL) || defined (USE_STM32L152D_EVAL) + /* + For STM32L15xx devices it is possible to use the internal USB pullup + controlled by register SYSCFG_PMC (refer to RM0038 reference manual for + more details). + It is also possible to use external pullup (and disable the internal pullup) + by setting the define USB_USE_EXTERNAL_PULLUP in file platform_config.h + and configuring the right pin to be used for the external pull up configuration. + To have more details on how to use an external pull up, please refer to + STM3210E-EVAL evaluation board manuals. + */ + /* Uncomment the following define to use an external pull up instead of the + integrated STM32L15xx internal pull up. In this case make sure to set up + correctly the external required hardware and the GPIO defines below.*/ +/* #define USB_USE_EXTERNAL_PULLUP */ + + #if !defined(USB_USE_EXTERNAL_PULLUP) + #define STM32L15_USB_CONNECT SYSCFG_USBPuCmd(ENABLE) + #define STM32L15_USB_DISCONNECT SYSCFG_USBPuCmd(DISABLE) + + #elif defined(USB_USE_EXTERNAL_PULLUP) + /* PA0 is chosen just as illustrating example, you should modify the defines + below according to your hardware configuration. */ + #define USB_DISCONNECT GPIOA + #define USB_DISCONNECT_PIN GPIO_Pin_0 + #define RCC_AHBPeriph_GPIO_DISCONNECT RCC_AHBPeriph_GPIOA + #define STM32L15_USB_CONNECT GPIO_ResetBits(USB_DISCONNECT, USB_DISCONNECT_PIN) + #define STM32L15_USB_DISCONNECT GPIO_SetBits(USB_DISCONNECT, USB_DISCONNECT_PIN) + #endif /* USB_USE_EXTERNAL_PULLUP */ + + #define RCC_AHBPeriph_ALLGPIO (RCC_AHBPeriph_GPIOA \ + | RCC_AHBPeriph_GPIOB \ + | RCC_AHBPeriph_GPIOC \ + | RCC_AHBPeriph_GPIOD \ + | RCC_AHBPeriph_GPIOE \ + | RCC_AHBPeriph_GPIOF \ + | RCC_AHBPeriph_GPIOH) +#elif defined (USE_STM32373C_EVAL) + + #define USB_DISCONNECT GPIOC + #define USB_DISCONNECT_PIN GPIO_Pin_5 + #define RCC_AHBPeriph_GPIO_DISCONNECT RCC_AHBPeriph_GPIOC + + #define GPIO_Pin_KEY GPIO_Pin_6 /* PE.6 */ + #define GPIO_Pin_UP GPIO_Pin_10 /* PF.10 */ + #define GPIO_Pin_DOWN GPIO_Pin_2 /* PF.2 */ + #define GPIO_Pin_LEFT GPIO_Pin_4 /* PF.4 */ + #define GPIO_Pin_RIGHT GPIO_Pin_9 /* PF.9 */ + + #define RCC_AHBPeriph_GPIO_JOY_SET1 RCC_AHBPeriph_GPIOF + + #define GPIO_RIGHT GPIOF + #define GPIO_LEFT GPIOF + #define GPIO_DOWN GPIOF + #define GPIO_UP GPIOF + #define GPIO_KEY GPIOE + +#elif defined (USE_STM32303C_EVAL) + + #define USB_DISCONNECT GPIOB + #define USB_DISCONNECT_PIN GPIO_Pin_8 + #define RCC_AHBPeriph_GPIO_DISCONNECT RCC_AHBPeriph_GPIOB + + + #define GPIO_Pin_KEY GPIO_Pin_6 /* PE.6 */ + #define GPIO_Pin_UP GPIO_Pin_7 /* PE.7 */ + #define GPIO_Pin_DOWN GPIO_Pin_5 /* PD.5 */ + #define GPIO_Pin_LEFT GPIO_Pin_5 /* PB.4 */ + #define GPIO_Pin_RIGHT GPIO_Pin_6 /* PD.2 */ + + #define RCC_AHBPeriph_GPIO_JOY_SET1 RCC_AHBPeriph_GPIOF + + #define GPIO_RIGHT GPIOD + #define GPIO_LEFT GPIOB + #define GPIO_DOWN GPIOD + #define GPIO_UP GPIOE + #define GPIO_KEY GPIOE + + +#define RCC_AHBPeriph_ALLGPIO (RCC_AHBPeriph_GPIOA \ + | RCC_AHBPeriph_GPIOB \ + | RCC_AHBPeriph_GPIOC \ + | RCC_AHBPeriph_GPIOD \ + | RCC_AHBPeriph_GPIOE \ + | RCC_AHBPeriph_GPIOF ) +#define GPIO_KEY_EXTI_Line EXTI_Line18 +#endif /* USE_STM3210B_EVAL */ + +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ + +#endif /* __PLATFORM_CONFIG_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32_it.h b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32_it.h new file mode 100644 index 0000000..82d81f2 --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32_it.h @@ -0,0 +1,58 @@ +/** + ****************************************************************************** + * @file stm32_it.h + * @author MCD Application Team + * @version V4.0.0 + * @date 21-January-2013 + * @brief This file contains the headers of the interrupt handlers. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2013 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 + * + * 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32_IT_H +#define __STM32_IT_H + +/* Includes ------------------------------------------------------------------*/ +#include "platform_config.h" + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ + +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); +void USB_LP_CAN1_RX0_IRQHandler(void); +void EXTI9_5_IRQHandler(void); +void USBWakeUp_IRQHandler(void); + +#endif /* __STM32_IT_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + + diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32f10x_conf.h b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32f10x_conf.h new file mode 100644 index 0000000..e08299d --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32f10x_conf.h @@ -0,0 +1,85 @@ +/** + ****************************************************************************** + * @file stm32f10x_conf.h + * @author MCD Application Team + * @version V4.0.0 + * @date 21-January-2013 + * @brief Library configuration file. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2013 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 + * + * 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F10x_CONF_H +#define __STM32F10x_CONF_H + +/* Includes ------------------------------------------------------------------*/ +/* Uncomment the line below to enable peripheral header file inclusion */ +#include "stm32f10x_adc.h" +#include "stm32f10x_bkp.h" +#include "stm32f10x_can.h" +#include "stm32f10x_crc.h" +#include "stm32f10x_dac.h" +#include "stm32f10x_dbgmcu.h" +#include "stm32f10x_dma.h" +#include "stm32f10x_exti.h" +#include "stm32f10x_flash.h" +#include "stm32f10x_fsmc.h" +#include "stm32f10x_gpio.h" +#include "stm32f10x_i2c.h" +#include "stm32f10x_iwdg.h" +#include "stm32f10x_pwr.h" +#include "stm32f10x_rcc.h" +#include "stm32f10x_rtc.h" +#include "stm32f10x_sdio.h" +#include "stm32f10x_spi.h" +#include "stm32f10x_tim.h" +#include "stm32f10x_usart.h" +#include "stm32f10x_wwdg.h" +#include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Uncomment the line below to expanse the "assert_param" macro in the + Standard Peripheral Library drivers code */ +/* #define USE_FULL_ASSERT 1 */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT + +/******************************************************************************* +* Macro Name : assert_param +* Description : The assert_param macro is used for function's parameters check. +* Input : - expr: If expr is false, it calls assert_failed function +* which reports the name of the source file and the source +* line number of the call that failed. +* If expr is true, it returns no value. +* Return : None +*******************************************************************************/ + #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ + void assert_failed(uint8_t* file, uint32_t line); +#else + #define assert_param(expr) ((void)0) +#endif /* USE_FULL_ASSERT */ + +#endif /* __STM32F10x_CONF_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32f37x_conf.h b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32f37x_conf.h new file mode 100644 index 0000000..3d39101 --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32f37x_conf.h @@ -0,0 +1,83 @@ +/** + ****************************************************************************** + * @file stm32f37x_conf.h + * @author MCD Application Team + * @version V4.0.0 + * @date 21-January-2013 + * @brief Library configuration file. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2013 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 + * + * 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F37X_CONF_H +#define __STM32F37X_CONF_H + +/* Includes ------------------------------------------------------------------*/ +/* Comment the line below to disable peripheral header file inclusion */ +#include "stm32f37x_adc.h" +#include "stm32f37x_can.h" +#include "stm32f37x_cec.h" +#include "stm32f37x_crc.h" +#include "stm32f37x_comp.h" +#include "stm32f37x_dac.h" +#include "stm32f37x_dbgmcu.h" +#include "stm32f37x_dma.h" +#include "stm32f37x_exti.h" +#include "stm32f37x_flash.h" +#include "stm32f37x_gpio.h" +#include "stm32f37x_syscfg.h" +#include "stm32f37x_i2c.h" +#include "stm32f37x_iwdg.h" +#include "stm32f37x_pwr.h" +#include "stm32f37x_rcc.h" +#include "stm32f37x_rtc.h" +#include "stm32f37x_sdadc.h" +#include "stm32f37x_spi.h" +#include "stm32f37x_tim.h" +#include "stm32f37x_usart.h" +#include "stm32f37x_wwdg.h" +#include "stm32f37x_misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Uncomment the line below to expanse the "assert_param" macro in the + Standard Peripheral Library drivers code */ +/* #define USE_FULL_ASSERT 1 */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT + +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr: If expr is false, it calls assert_failed function which reports + * the name of the source file and the source line number of the call + * that failed. If expr is true, it returns no value. + * @retval None + */ + #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ + void assert_failed(uint8_t* file, uint32_t line); +#else + #define assert_param(expr) ((void)0) +#endif /* USE_FULL_ASSERT */ + +#endif /* __STM32F37X_CONF_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32l1xx_conf.h b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32l1xx_conf.h new file mode 100644 index 0000000..ae4a251 --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/stm32l1xx_conf.h @@ -0,0 +1,82 @@ +/** + ****************************************************************************** + * @file stm32l1xx_conf.h + * @author MCD Application Team + * @version V4.0.0 + * @date 21-January-2013 + * @brief Library configuration file. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2013 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 + * + * 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32L1xx_CONF_H +#define __STM32L1xx_CONF_H + +/* Includes ------------------------------------------------------------------*/ +/* Uncomment the line below to enable peripheral header file inclusion */ +#include "stm32l1xx_adc.h" +#include "stm32l1xx_crc.h" +#include "stm32l1xx_comp.h" +#include "stm32l1xx_dac.h" +#include "stm32l1xx_dbgmcu.h" +#include "stm32l1xx_dma.h" +#include "stm32l1xx_exti.h" +#include "stm32l1xx_flash.h" +#include "stm32l1xx_gpio.h" +#include "stm32l1xx_syscfg.h" +#include "stm32l1xx_i2c.h" +#include "stm32l1xx_iwdg.h" +#include "stm32l1xx_lcd.h" +#include "stm32l1xx_pwr.h" +#include "stm32l1xx_rcc.h" +#include "stm32l1xx_rtc.h" +#include "stm32l1xx_spi.h" +#include "stm32l1xx_tim.h" +#include "stm32l1xx_usart.h" +#include "stm32l1xx_wwdg.h" +#include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Uncomment the line below to expanse the "assert_param" macro in the + Standard Peripheral Library drivers code */ +/* #define USE_FULL_ASSERT 1 */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT + +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr: If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval : None + */ + #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ + void assert_failed(uint8_t* file, uint32_t line); +#else + #define assert_param(expr) ((void)0) +#endif /* USE_FULL_ASSERT */ + +#endif /* __STM32L1xx_CONF_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_conf.h b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_conf.h new file mode 100644 index 0000000..ff5541b --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_conf.h @@ -0,0 +1,91 @@ +/** + ****************************************************************************** + * @file usb_conf.h + * @author MCD Application Team + * @version V4.0.0 + * @date 21-January-2013 + * @brief Joystick Mouse demo configuration file + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2013 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 + * + * 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __USB_CONF_H +#define __USB_CONF_H + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +/* External variables --------------------------------------------------------*/ +/*-------------------------------------------------------------*/ +/* EP_NUM */ +/* defines how many endpoints are used by the device */ +/*-------------------------------------------------------------*/ +#define EP_NUM (2) + +/*-------------------------------------------------------------*/ +/* -------------- Buffer Description Table -----------------*/ +/*-------------------------------------------------------------*/ +/* buffer table base address */ +/* buffer table base address */ +#define BTABLE_ADDRESS (0x00) + +/* EP0 */ +/* rx/tx buffer base address */ +#define ENDP0_RXADDR (0x18) +#define ENDP0_TXADDR (0x58) + +/* EP1 */ +/* tx buffer base address */ +#define ENDP1_TXADDR (0x100) + + +/*-------------------------------------------------------------*/ +/* ------------------- ISTR events -------------------------*/ +/*-------------------------------------------------------------*/ +/* IMR_MSK */ +/* mask defining which events has to be handled */ +/* by the device application software */ +#define IMR_MSK (CNTR_CTRM | CNTR_WKUPM | CNTR_SUSPM | CNTR_ERRM | CNTR_SOFM \ + | CNTR_ESOFM | CNTR_RESETM ) + +/* CTR service routines */ +/* associated to defined endpoints */ +/* #define EP1_IN_Callback NOP_Process*/ +#define EP2_IN_Callback NOP_Process +#define EP3_IN_Callback NOP_Process +#define EP4_IN_Callback NOP_Process +#define EP5_IN_Callback NOP_Process +#define EP6_IN_Callback NOP_Process +#define EP7_IN_Callback NOP_Process + +#define EP1_OUT_Callback NOP_Process +#define EP2_OUT_Callback NOP_Process +#define EP3_OUT_Callback NOP_Process +#define EP4_OUT_Callback NOP_Process +#define EP5_OUT_Callback NOP_Process +#define EP6_OUT_Callback NOP_Process +#define EP7_OUT_Callback NOP_Process + +#endif /*__USB_CONF_H*/ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_istr.h b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_istr.h new file mode 100644 index 0000000..d2a07f6 --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_istr.h @@ -0,0 +1,95 @@ +/** + ****************************************************************************** + * @file usb_istr.h + * @author MCD Application Team + * @version V4.0.0 + * @date 21-January-2013 + * @brief This file includes the peripherals header files in the user application. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2013 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 + * + * 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __USB_ISTR_H +#define __USB_ISTR_H + +/* Includes ------------------------------------------------------------------*/ +#include "usb_conf.h" + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ + + void USB_Istr(void); + +/* function prototypes Automatically built defining related macros */ + +void EP1_IN_Callback(void); +void EP2_IN_Callback(void); +void EP3_IN_Callback(void); +void EP4_IN_Callback(void); +void EP5_IN_Callback(void); +void EP6_IN_Callback(void); +void EP7_IN_Callback(void); + +void EP1_OUT_Callback(void); +void EP2_OUT_Callback(void); +void EP3_OUT_Callback(void); +void EP4_OUT_Callback(void); +void EP5_OUT_Callback(void); +void EP6_OUT_Callback(void); +void EP7_OUT_Callback(void); + +#ifdef CTR_CALLBACK +void CTR_Callback(void); +#endif + +#ifdef DOVR_CALLBACK +void DOVR_Callback(void); +#endif + +#ifdef ERR_CALLBACK +void ERR_Callback(void); +#endif + +#ifdef WKUP_CALLBACK +void WKUP_Callback(void); +#endif + +#ifdef SUSP_CALLBACK +void SUSP_Callback(void); +#endif + +#ifdef RESET_CALLBACK +void RESET_Callback(void); +#endif + +#ifdef SOF_CALLBACK +void SOF_Callback(void); +#endif + +#ifdef ESOF_CALLBACK +void ESOF_Callback(void); +#endif + +#endif /*__USB_ISTR_H*/ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_prop.h b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_prop.h new file mode 100644 index 0000000..f228ad2 --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_prop.h @@ -0,0 +1,82 @@ +/** + ****************************************************************************** + * @file usb_prop.h + * @author MCD Application Team + * @version V4.0.0 + * @date 21-January-2013 + * @brief All processing related to Joystick Mouse demo + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2013 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 + * + * 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __USB_PROP_H +#define __USB_PROP_H + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +typedef enum _HID_REQUESTS +{ + GET_REPORT = 1, + GET_IDLE, + GET_PROTOCOL, + + SET_REPORT = 9, + SET_IDLE, + SET_PROTOCOL +} HID_REQUESTS; + +/* Exported constants --------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void Joystick_init(void); +void Joystick_Reset(void); +void Joystick_SetConfiguration(void); +void Joystick_SetDeviceAddress (void); +void Joystick_Status_In (void); +void Joystick_Status_Out (void); +RESULT Joystick_Data_Setup(uint8_t); +RESULT Joystick_NoData_Setup(uint8_t); +RESULT Joystick_Get_Interface_Setting(uint8_t Interface, uint8_t AlternateSetting); +uint8_t *Joystick_GetDeviceDescriptor(uint16_t ); +uint8_t *Joystick_GetConfigDescriptor(uint16_t); +uint8_t *Joystick_GetStringDescriptor(uint16_t); +RESULT Joystick_SetProtocol(void); +uint8_t *Joystick_GetProtocolValue(uint16_t Length); +RESULT Joystick_SetProtocol(void); +uint8_t *Joystick_GetReportDescriptor(uint16_t Length); +uint8_t *Joystick_GetHIDDescriptor(uint16_t Length); + +/* Exported define -----------------------------------------------------------*/ +#define Joystick_GetConfiguration NOP_Process +//#define Joystick_SetConfiguration NOP_Process +#define Joystick_GetInterface NOP_Process +#define Joystick_SetInterface NOP_Process +#define Joystick_GetStatus NOP_Process +#define Joystick_ClearFeature NOP_Process +#define Joystick_SetEndPointFeature NOP_Process +#define Joystick_SetDeviceFeature NOP_Process +//#define Joystick_SetDeviceAddress NOP_Process + +#define REPORT_DESCRIPTOR 0x22 + +#endif /* __USB_PROP_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_pwr.h b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_pwr.h new file mode 100644 index 0000000..31891f1 --- /dev/null +++ b/thirdparty/STM32_USB-FS-Device_Lib_V4.0.0/Projects/JoyStickMouse/inc/usb_pwr.h @@ -0,0 +1,71 @@ +/** + ****************************************************************************** + * @file usb_pwr.h + * @author MCD Application Team + * @version V4.0.0 + * @date 21-January-2013 + * @brief Connection/disconnection & power management header + ****************************************************************************** + * @attention + * + *

© COPYRIGHT 2013 STMicroelectronics

+ * + * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 + * + * 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __USB_PWR_H +#define __USB_PWR_H + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +typedef enum _RESUME_STATE +{ + RESUME_EXTERNAL, + RESUME_INTERNAL, + RESUME_LATER, + RESUME_WAIT, + RESUME_START, + RESUME_ON, + RESUME_OFF, + RESUME_ESOF +} RESUME_STATE; + +typedef enum _DEVICE_STATE +{ + UNCONNECTED, + ATTACHED, + POWERED, + SUSPENDED, + ADDRESSED, + CONFIGURED +} DEVICE_STATE; + +/* Exported constants --------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void Suspend(void); +void Resume_Init(void); +void Resume(RESUME_STATE eResumeSetVal); +RESULT PowerOn(void); +RESULT PowerOff(void); +/* External variables --------------------------------------------------------*/ +extern __IO uint32_t bDeviceState; /* USB device status */ +extern __IO bool fSuspendEnabled; /* true when suspend is possible */ + +#endif /*__USB_PWR_H*/ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ -- cgit v1.2.3