Yunhorn_STS_OO/Inc/tim.h

94 lines
2.0 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
******************************************************************************
* File Name : TIM.h
* Description : This file provides code for the configuration
* of the TIM instances.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __tim_H
#define __tim_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* USER CODE BEGIN Includes */
#include "string.h"
/* USER CODE END Includes */
/* USER CODE BEGIN Private defines */
#define Green 0
#define Red 1
#define Blue 2
#define Light_Level 200
/*
颜色说明
0
绿1
2
3
4
5
6
7
红蓝闪烁8
*/
//#define OFF 0
//#define green 1
//#define red 2
//#define blue 3
//#define yellow 4
//#define purple 5
//#define cyan 6
//#define white 7
//#define emerge 8
#define Zero 12
#define ONE 24
#define LED_COUNT 8
/* USER CODE END Private defines */
void MX_TIM2_Init(void);
void MX_TIM3_Init(void);
/* USER CODE BEGIN Prototypes */
void TIM2_DMA_Config(void);
void WS2812_Light_One_By_One(uint8_t corlor,uint8_t light_level);
void WS2812_Light_Custom(uint8_t red,uint8_t green , uint8_t blue);
void WS2812_Light_All( uint8_t color);
/* USER CODE END Prototypes */
#ifdef __cplusplus
}
#endif
#endif /*__ tim_H */
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/