[1] | 1 | /* USER CODE BEGIN Header */
|
---|
| 2 | /**
|
---|
| 3 | ******************************************************************************
|
---|
| 4 | * @file : main.h
|
---|
| 5 | * @brief : Header for main.c file.
|
---|
| 6 | * This file contains the common defines of the application.
|
---|
| 7 | ******************************************************************************
|
---|
| 8 | * @attention
|
---|
| 9 | *
|
---|
| 10 | * <h2><center>© Copyright (c) 2021 STMicroelectronics.
|
---|
| 11 | * All rights reserved.</center></h2>
|
---|
| 12 | *
|
---|
| 13 | * This software component is licensed by ST under Ultimate Liberty license
|
---|
| 14 | * SLA0044, the "License"; You may not use this file except in compliance with
|
---|
| 15 | * the License. You may obtain a copy of the License at:
|
---|
| 16 | * www.st.com/SLA0044
|
---|
| 17 | *
|
---|
| 18 | ******************************************************************************
|
---|
| 19 | */
|
---|
| 20 | /* USER CODE END Header */
|
---|
| 21 |
|
---|
| 22 | /* Define to prevent recursive inclusion -------------------------------------*/
|
---|
| 23 | #ifndef __MAIN_H
|
---|
| 24 | #define __MAIN_H
|
---|
| 25 |
|
---|
| 26 | #ifdef __cplusplus
|
---|
| 27 | extern "C" {
|
---|
| 28 | #endif
|
---|
| 29 |
|
---|
| 30 | /* Includes ------------------------------------------------------------------*/
|
---|
| 31 | #include "stm32f4xx_hal.h"
|
---|
| 32 |
|
---|
| 33 | /* Private includes ----------------------------------------------------------*/
|
---|
| 34 | /* USER CODE BEGIN Includes */
|
---|
| 35 | #include "RingBuffer.h"
|
---|
| 36 | /* USER CODE END Includes */
|
---|
| 37 |
|
---|
| 38 | /* Exported types ------------------------------------------------------------*/
|
---|
| 39 | /* USER CODE BEGIN ET */
|
---|
| 40 |
|
---|
| 41 | /* USER CODE END ET */
|
---|
| 42 |
|
---|
| 43 | /* Exported constants --------------------------------------------------------*/
|
---|
| 44 | /* USER CODE BEGIN EC */
|
---|
| 45 |
|
---|
| 46 | typedef struct {
|
---|
| 47 | void *ptr;
|
---|
| 48 | uint16_t LenData;
|
---|
| 49 | }USB_Buffer_typeDef;
|
---|
| 50 |
|
---|
| 51 | struct board {
|
---|
| 52 | uint8_t type;
|
---|
| 53 | const char *Name;
|
---|
| 54 | };
|
---|
| 55 |
|
---|
| 56 | struct dirtree{
|
---|
| 57 | struct dirtree *next;
|
---|
| 58 | char *dirname;
|
---|
| 59 | char *fname;
|
---|
| 60 | };
|
---|
| 61 |
|
---|
| 62 | enum state_dir{
|
---|
| 63 | OPEN_DIR,
|
---|
| 64 | CLOSE_DIR
|
---|
| 65 | };
|
---|
| 66 |
|
---|
| 67 | struct dirpath{
|
---|
| 68 | enum state_dir statedir;
|
---|
| 69 | char *dirname;
|
---|
| 70 | char *fname;
|
---|
| 71 | };
|
---|
| 72 |
|
---|
| 73 | struct dirpath *f_get_path(char *path);
|
---|
| 74 | void f_dir_path_free(struct dirpath *dir);
|
---|
| 75 |
|
---|
| 76 | struct dirtree *f_finddir(char *path);
|
---|
| 77 | void f_dir_free(struct dirtree *dir);
|
---|
| 78 |
|
---|
| 79 | //void f_finddir(char *path, dirtree *treedir);
|
---|
| 80 |
|
---|
| 81 | /* USER CODE END EC */
|
---|
| 82 |
|
---|
| 83 | /* Exported macro ------------------------------------------------------------*/
|
---|
| 84 | /* USER CODE BEGIN EM */
|
---|
| 85 |
|
---|
| 86 | /* USER CODE END EM */
|
---|
| 87 |
|
---|
| 88 | /* Exported functions prototypes ---------------------------------------------*/
|
---|
| 89 | void Error_Handler(void);
|
---|
| 90 |
|
---|
| 91 | /* USER CODE BEGIN EFP */
|
---|
| 92 | void wdt_init(uint16_t tw);
|
---|
| 93 | void wdt_reset(void);
|
---|
| 94 | /* USER CODE END EFP */
|
---|
| 95 |
|
---|
| 96 | /* Private defines -----------------------------------------------------------*/
|
---|
| 97 | #define PHY_nRST_Pin GPIO_PIN_6
|
---|
| 98 | #define PHY_nRST_GPIO_Port GPIOA
|
---|
| 99 | #define PHY_INT_Pin GPIO_PIN_12
|
---|
| 100 | #define PHY_INT_GPIO_Port GPIOE
|
---|
| 101 | #define PHY_INT_EXTI_IRQn EXTI15_10_IRQn
|
---|
| 102 | #define TEMP_Pin GPIO_PIN_2
|
---|
| 103 | #define TEMP_GPIO_Port GPIOC
|
---|
| 104 | #define PHY_LEDy_Pin GPIO_PIN_0
|
---|
| 105 | #define PHY_LEDy_GPIO_Port GPIOA
|
---|
| 106 | #define RES_IP_Pin GPIO_PIN_10
|
---|
| 107 | #define RES_IP_GPIO_Port GPIOA
|
---|
| 108 | #define EXECUTION_GPIO_Port GPIOA
|
---|
| 109 | #define VERSION_GPIO_Port GPIOD
|
---|
| 110 | #define FL_RES_Pin GPIO_PIN_1
|
---|
| 111 | #define FL_RES_GPIO_Port GPIOD
|
---|
| 112 | #define SPI3_CS_Pin GPIO_PIN_0
|
---|
| 113 | #define SPI3_CS_GPIO_Port GPIOD
|
---|
| 114 | #define USART_TX_EN_Pin GPIO_PIN_7
|
---|
| 115 | #define USART_TX_EN_GPIO_Port GPIOD
|
---|
| 116 | /* USER CODE BEGIN Private defines */
|
---|
| 117 |
|
---|
| 118 | /* USER CODE END Private defines */
|
---|
| 119 |
|
---|
| 120 | #ifdef __cplusplus
|
---|
| 121 | }
|
---|
| 122 | #endif
|
---|
| 123 |
|
---|
| 124 | #endif /* __MAIN_H */
|
---|
| 125 |
|
---|
| 126 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
---|