added stuff
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
Index: Inc/stm32f1xx_hal_conf.h
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Inc/stm32f1xx_hal_conf.h (date 1511203976000)
|
||||
+++ Inc/stm32f1xx_hal_conf.h (revision )
|
||||
@@ -147,13 +147,6 @@
|
||||
#define USE_RTOS 0
|
||||
#define PREFETCH_ENABLE 1
|
||||
|
||||
-/* ########################## Assert Selection ############################## */
|
||||
-/**
|
||||
- * @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
- * HAL drivers code
|
||||
- */
|
||||
- #define USE_FULL_ASSERT 1U
|
||||
-
|
||||
/* ################## Ethernet peripheral configuration ##################### */
|
||||
|
||||
/* Section 1 : Ethernet peripheral configuration */
|
||||
@@ -341,21 +334,7 @@
|
||||
|
||||
|
||||
/* 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)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
-/* Exported functions ------------------------------------------------------- */
|
||||
- void assert_failed(uint8_t* file, uint32_t line);
|
||||
-#else
|
||||
- #define assert_param(expr) ((void)0U)
|
||||
-#endif /* USE_FULL_ASSERT */
|
||||
+#include "stm32_assert.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
Index: Inc/main.h
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Inc/main.h (date 1511207348000)
|
||||
+++ Inc/main.h (revision )
|
||||
@@ -58,26 +58,12 @@
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
-/**
|
||||
- * @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
- * HAL drivers code
|
||||
- */
|
||||
- #define USE_FULL_ASSERT 1U
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
#include "stm32_assert.h"
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
-#ifdef __cplusplus
|
||||
- extern "C" {
|
||||
-#endif
|
||||
-void _Error_Handler(char *, int);
|
||||
-
|
||||
-#define Error_Handler() _Error_Handler(__FILE__, __LINE__)
|
||||
-#ifdef __cplusplus
|
||||
-}
|
||||
-#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
Index: Src/main.c
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Src/main.c (date 1511207348000)
|
||||
+++ Src/main.c (revision )
|
||||
@@ -212,40 +212,7 @@
|
||||
/* USER CODE END Callback 1 */
|
||||
}
|
||||
|
||||
-/**
|
||||
- * @brief This function is executed in case of error occurrence.
|
||||
- * @param None
|
||||
- * @retval None
|
||||
- */
|
||||
-void _Error_Handler(char * file, int line)
|
||||
-{
|
||||
- /* USER CODE BEGIN Error_Handler_Debug */
|
||||
- /* User can add his own implementation to report the HAL error return state */
|
||||
- while(1)
|
||||
- {
|
||||
- }
|
||||
- /* USER CODE END Error_Handler_Debug */
|
||||
-}
|
||||
|
||||
-#ifdef USE_FULL_ASSERT
|
||||
-
|
||||
-/**
|
||||
- * @brief Reports the name of the source file and the source line number
|
||||
- * where the assert_param error has occurred.
|
||||
- * @param file: pointer to the source file name
|
||||
- * @param line: assert_param error line source number
|
||||
- * @retval None
|
||||
- */
|
||||
-void assert_failed(uint8_t* file, uint32_t line)
|
||||
-{
|
||||
- /* USER CODE BEGIN 6 */
|
||||
- /* User can add his own implementation to report the file name and line number,
|
||||
- ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
|
||||
- /* USER CODE END 6 */
|
||||
-
|
||||
-}
|
||||
-
|
||||
-#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
@@ -0,0 +1,60 @@
|
||||
Index: Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h (revision 58248b7c8c9be227130e4b1e5eed906708cf110b)
|
||||
+++ Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h (revision )
|
||||
@@ -118,8 +118,8 @@
|
||||
PCD_TypeDef *Instance; /*!< Register base address */
|
||||
PCD_InitTypeDef Init; /*!< PCD required parameters */
|
||||
__IO uint8_t USB_Address; /*!< USB Address: not used by USB OTG FS */
|
||||
- PCD_EPTypeDef IN_ep[16]; /*!< IN endpoint parameters */
|
||||
- PCD_EPTypeDef OUT_ep[16]; /*!< OUT endpoint parameters */
|
||||
+ PCD_EPTypeDef IN_ep[USBD_NUM_ENDPOINTS+1]; /*!< IN endpoint parameters */
|
||||
+ PCD_EPTypeDef OUT_ep[USBD_NUM_ENDPOINTS+1]; /*!< OUT endpoint parameters */
|
||||
HAL_LockTypeDef Lock; /*!< PCD peripheral status */
|
||||
__IO PCD_StateTypeDef State; /*!< PCD communication state */
|
||||
uint32_t Setup[12U]; /*!< Setup packet buffer */
|
||||
Index: Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c (revision 58248b7c8c9be227130e4b1e5eed906708cf110b)
|
||||
+++ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c (revision )
|
||||
@@ -181,7 +181,7 @@
|
||||
USB_SetCurrentMode(hpcd->Instance , USB_DEVICE_MODE);
|
||||
|
||||
/* Init endpoints structures */
|
||||
- for (index = 0U; index < 15U ; index++)
|
||||
+ for (index = 0U; index < USBD_NUM_ENDPOINTS ; index++)
|
||||
{
|
||||
/* Init ep structure */
|
||||
hpcd->IN_ep[index].is_in = 1U;
|
||||
@@ -194,7 +194,7 @@
|
||||
hpcd->IN_ep[index].xfer_len = 0U;
|
||||
}
|
||||
|
||||
- for (index = 0U; index < 15U ; index++)
|
||||
+ for (index = 0U; index < USBD_NUM_ENDPOINTS ; index++)
|
||||
{
|
||||
hpcd->OUT_ep[index].is_in = 0U;
|
||||
hpcd->OUT_ep[index].num = index;
|
||||
Index: Inc/stm32f1xx_hal_conf.h
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Inc/stm32f1xx_hal_conf.h (revision 58248b7c8c9be227130e4b1e5eed906708cf110b)
|
||||
+++ Inc/stm32f1xx_hal_conf.h (revision )
|
||||
@@ -44,6 +44,9 @@
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
+// XXX CUSTOM CONSTANTS
|
||||
+#define USBD_NUM_ENDPOINTS 3 // max 15
|
||||
+
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@@ -0,0 +1,39 @@
|
||||
Index: Src/stm32f1xx_hal_msp.c
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Src/stm32f1xx_hal_msp.c (revision f2861f336546d616161007943aa21fe1560c91b0)
|
||||
+++ Src/stm32f1xx_hal_msp.c (revision )
|
||||
@@ -49,7 +49,6 @@
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f1xx_hal.h"
|
||||
|
||||
-extern void _Error_Handler(char *, int);
|
||||
/* USER CODE BEGIN 0 */
|
||||
|
||||
/* USER CODE END 0 */
|
||||
Index: Inc/usb.h
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Inc/usb.h (revision f2861f336546d616161007943aa21fe1560c91b0)
|
||||
+++ Inc/usb.h (revision )
|
||||
@@ -56,6 +56,7 @@
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "main.h"
|
||||
+#include "stm32_assert.h"
|
||||
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
@@ -67,8 +68,6 @@
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
-extern void _Error_Handler(char *, int);
|
||||
-
|
||||
void MX_USB_PCD_Init(void);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
@@ -0,0 +1,31 @@
|
||||
Index: Inc/i2c.h
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Inc/i2c.h (date 1511220966000)
|
||||
+++ Inc/i2c.h (revision )
|
||||
@@ -67,7 +67,6 @@
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
-extern void _Error_Handler(char *, int);
|
||||
|
||||
void MX_I2C1_Init(void);
|
||||
|
||||
Index: Inc/spi.h
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Inc/spi.h (date 1511220966000)
|
||||
+++ Inc/spi.h (revision )
|
||||
@@ -67,8 +67,6 @@
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
-extern void _Error_Handler(char *, int);
|
||||
-
|
||||
void MX_SPI1_Init(void);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
@@ -0,0 +1,16 @@
|
||||
Index: Makefile
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- Makefile (date 1512425387000)
|
||||
+++ Makefile (revision )
|
||||
@@ -13,7 +13,7 @@
|
||||
######################################
|
||||
# target
|
||||
######################################
|
||||
-TARGET = gex_f103
|
||||
+TARGET = firmware
|
||||
|
||||
|
||||
######################################
|
||||
Reference in New Issue
Block a user