You've already forked M5Module-Fan-Internal-FW
mirror of
https://github.com/m5stack/M5Module-Fan-Internal-FW.git
synced 2026-05-20 11:36:51 -07:00
95 lines
2.6 KiB
C
95 lines
2.6 KiB
C
/* 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) 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 __MAIN_H
|
|
#define __MAIN_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
#include "stm32f0xx_hal.h"
|
|
|
|
#include "stm32f0xx_ll_i2c.h"
|
|
#include "stm32f0xx_ll_iwdg.h"
|
|
#include "stm32f0xx_ll_crs.h"
|
|
#include "stm32f0xx_ll_rcc.h"
|
|
#include "stm32f0xx_ll_bus.h"
|
|
#include "stm32f0xx_ll_system.h"
|
|
#include "stm32f0xx_ll_exti.h"
|
|
#include "stm32f0xx_ll_cortex.h"
|
|
#include "stm32f0xx_ll_utils.h"
|
|
#include "stm32f0xx_ll_pwr.h"
|
|
#include "stm32f0xx_ll_dma.h"
|
|
#include "stm32f0xx_ll_tim.h"
|
|
#include "stm32f0xx_ll_gpio.h"
|
|
|
|
/* Private includes ----------------------------------------------------------*/
|
|
/* USER CODE BEGIN Includes */
|
|
extern __IO uint8_t i2c_addr_reg;
|
|
void Slave_Complete_Callback(uint8_t *rx_data, uint16_t len);
|
|
/* USER CODE END Includes */
|
|
|
|
/* Exported types ------------------------------------------------------------*/
|
|
/* USER CODE BEGIN ET */
|
|
|
|
/* USER CODE END ET */
|
|
|
|
/* Exported constants --------------------------------------------------------*/
|
|
/* USER CODE BEGIN EC */
|
|
|
|
/* 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 */
|
|
|
|
/* USER CODE END EFP */
|
|
|
|
/* Private defines -----------------------------------------------------------*/
|
|
|
|
/* USER CODE BEGIN Private defines */
|
|
typedef enum{
|
|
FAN_OFF = 0x00,
|
|
FAN_ON = 0x01
|
|
}fan_work_t; // 风扇工作状态
|
|
|
|
typedef enum{
|
|
PWM_1KHZ = 0x00,
|
|
PWM_12KHZ = 0x01,
|
|
PWM_24KHZ = 0x02,
|
|
PWM_48KHZ = 0x03
|
|
}pwm_frequency_t; // PWM频率
|
|
/* USER CODE END Private defines */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MAIN_H */
|