/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : uType.h
  * @brief          : Header for remote.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2024 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __UTYPE_H
#define __UTYPE_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32l4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include <string.h> //memset
#include <stdio.h>	//printf
#include <stdbool.h> // bool
/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
#define MAX_FRAME_SIZE 300  // 485接收回调一帧字节
#define BUFFER_SIZE485 300 // 485串口接收缓冲区大小
#define CAPTURE_DEPTH 10		 // PWM读取角度周期个数
/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */


/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
typedef  struct _Uart485Rx_msg
{
	uint8_t data[300];
	
}Uart485Rx_msg;

typedef enum {
    releasemode ,   // 发布模式
    IAPbootloader,  // 升级模式
		Debugmode  			// 调试模式
} sysmode ;
extern sysmode Systemmode;

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/


/* USER CODE BEGIN EFP */


/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/

/* USER CODE BEGIN Private defines */
#define DEBUG_PRINT   1  // 1=enable debug print, 0=disable

#if DEBUG_PRINT
#define DEBUG_PRINTF(...)    printf(__VA_ARGS__)
#else
#define DEBUG_PRINTF(...)
#endif

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __UTYPE_H */
 
