Page 171 - MDP2022-2
P. 171
uint8_t LED_Data[MAX_LED][4];
uint8_t LED_Data2[MAX_LED2][4];
uint8_t LED_Mod[MAX_LED][4]; // for brightness
uint8_t LED_Mod2[MAX_LED2][4]; // for brightness
uint16_t pwmData[(24 * MAX_LED) + 50];
uint16_t pwmData2[(24 * MAX_LED2) + 50];
volatile int datasentflag;
volatile HAL_StatusTypeDef res;
uint16_t melody[10] = { 30303, 28571, 24390, 22727, 20408, 18181, 16129, 15384, 13698, 121
95 };
Wifi_t Wifi;
int lingt_state, curtain_state, heating_pad, door_state, music_state;
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_DMA_Init(void);
static void MX_USART1_UART_Init(void);
static void MX_TIM1_Init(void);
static void MX_I2C2_Init(void);
static void MX_TIM3_Init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
void Set_LED(int LEDnum, int Red, int Green, int Blue) {
LED_Data[LEDnum][0] = LEDnum;
LED_Data[LEDnum][1] = Green;
LED_Data[LEDnum][2] = Red;
LED_Data[LEDnum][3] = Blue;
}
void Set_LED2(int LEDnum, int Red, int Green, int Blue) {
LED_Data2[LEDnum][0] = LEDnum;
LED_Data2[LEDnum][1] = Green;
LED_Data2[LEDnum][2] = Red;