/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
*
© Copyright (c) 2021 STMicroelectronics.
* All rights reserved.
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "RingBuffer.h"
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
typedef struct {
void *ptr;
uint16_t LenData;
}USB_Buffer_typeDef;
struct board {
uint8_t type;
const char *Name;
};
struct dirtree{
struct dirtree *next;
char *dirname;
char *fname;
};
enum state_dir{
OPEN_DIR,
CLOSE_DIR
};
struct dirpath{
enum state_dir statedir;
char *dirname;
char *fname;
};
struct dirpath *f_get_path(char *path);
void f_dir_path_free(struct dirpath *dir);
struct dirtree *f_finddir(char *path);
void f_dir_free(struct dirtree *dir);
//void f_finddir(char *path, dirtree *treedir);
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
void wdt_init(uint16_t tw);
void wdt_reset(void);
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define PHY_nRST_Pin GPIO_PIN_6
#define PHY_nRST_GPIO_Port GPIOA
#define PHY_INT_Pin GPIO_PIN_12
#define PHY_INT_GPIO_Port GPIOE
#define PHY_INT_EXTI_IRQn EXTI15_10_IRQn
#define TEMP_Pin GPIO_PIN_2
#define TEMP_GPIO_Port GPIOC
#define PHY_LEDy_Pin GPIO_PIN_0
#define PHY_LEDy_GPIO_Port GPIOA
#define RES_IP_Pin GPIO_PIN_10
#define RES_IP_GPIO_Port GPIOA
#define EXECUTION_GPIO_Port GPIOA
#define VERSION_GPIO_Port GPIOD
#define FL_RES_Pin GPIO_PIN_1
#define FL_RES_GPIO_Port GPIOD
#define SPI3_CS_Pin GPIO_PIN_0
#define SPI3_CS_GPIO_Port GPIOD
#define USART_TX_EN_Pin GPIO_PIN_7
#define USART_TX_EN_GPIO_Port GPIOD
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/