embedded_systems
Loading...
Searching...
No Matches
main.c File Reference

: Main program body More...

#include "main.h"
#include "lwip.h"
#include "tcp.h"
#include "TCP_HA.h"
#include "display.h"
#include <stdio.h>
#include <string.h>
#include "../../Drivers/BSP/STM32F7508-Discovery/stm32f7508_discovery.h"
#include "../../Drivers/BSP/STM32F7508-Discovery/stm32f7508_discovery_lcd.h"
#include "../../Drivers/BSP/STM32F7508-Discovery/stm32f7508_discovery_sdram.h"
#include "../../Drivers/BSP/STM32F7508-Discovery/stm32f7508_discovery_ts.h"
#include "../../Drivers/BSP/STM32F7508-Discovery/stm32f7508_discovery_qspi.h"
#include "configEntitysHA.h"

Go to the source code of this file.

Functions

void SystemClock_Config (void)
 System Clock Configuration.
 
static void MX_GPIO_Init (void)
 GPIO Initialization Function.
 
static void MX_LTDC_Init (void)
 LTDC Initialization Function.
 
static void MX_USART1_UART_Init (void)
 USART1 Initialization Function.
 
static void MX_DMA2D_Init (void)
 DMA2D Initialization Function.
 
static void MX_FMC_Init (void)
 
static void MX_QUADSPI_Init (void)
 QUADSPI Initialization Function.
 
static void vDebounce (TS_StateTypeDef *TS_State)
 Debounce van de touchScreen *.
 
int _write (int file, char *ptr, int len)
 
int main (void)
 The application entry point.
 
void Error_Handler (void)
 This function is executed in case of error occurrence.
 

Variables

DMA2D_HandleTypeDef hdma2d
 
LTDC_HandleTypeDef hltdc
 
QSPI_HandleTypeDef hqspi
 
UART_HandleTypeDef huart1
 
SDRAM_HandleTypeDef hsdram1
 
uint8_t globalReceive = 0
 Globale variabele voor communicatie tussen twee aparte functies.
 

Detailed Description

: Main program body

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.

Definition in file main.c.

Function Documentation

◆ _write()

int _write ( int file,
char * ptr,
int len )

Definition at line 85 of file main.c.

85 {
86 for(int i = 0; i < len; i++){
87 if(ptr[i]=='\n'){
88 HAL_UART_Transmit(&huart1, (uint8_t*)"\r", 1, HAL_MAX_DELAY);
89 }
90 HAL_UART_Transmit(&huart1, (uint8_t*)&ptr[i], 1, HAL_MAX_DELAY);
91 }
92 return len;
93 }
UART_HandleTypeDef huart1
Definition main.c:61

References huart1.

◆ Error_Handler()

void Error_Handler ( void )

This function is executed in case of error occurrence.

Return values
None

Definition at line 575 of file main.c.

576{
577 /* USER CODE BEGIN Error_Handler_Debug */
578 /* User can add his own implementation to report the HAL error return state */
579 __disable_irq();
580 while (1)
581 {
582 }
583 /* USER CODE END Error_Handler_Debug */
584}

◆ main()

int main ( void )

The application entry point.

Return values
int

Init van display + custom message in de UART

ButtonId opvragen en verwerken Op basis van het ID de juiste actie en entity koppelen

Definition at line 115 of file main.c.

116{
117
118 /* USER CODE BEGIN 1 */
119 TS_StateTypeDef TS_State;
120 /* USER CODE END 1 */
121
122 /* MCU Configuration--------------------------------------------------------*/
123
124 /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
125 HAL_Init();
126
127 /* USER CODE BEGIN Init */
128
129 /* USER CODE END Init */
130
131 /* Configure the system clock */
133
134 /* USER CODE BEGIN SysInit */
135
136 /* USER CODE END SysInit */
137
138 /* Initialize all configured peripherals */
139 MX_GPIO_Init();
140 MX_LTDC_Init();
143 MX_FMC_Init();
144 MX_LWIP_Init();
146 /* USER CODE BEGIN 2 */
147
148 vDisplayInit();
149
150 vHaWaitOnLink(ERR_OK);
152 vDisplayMessage("Setting up main screen");
153 HAL_Delay(1000); //om het tof te maken :)
155
156 printf(" __ __ ____ ___\n");
157 printf("| \\/ | | _ \\__ \\\n");
158 printf("| \\ / |_ __| |_) | ) |\n");
159 printf("| |\\/| | |__| _ < / /\n");
160 printf("| | | | | | |_) / /_\n");
161 printf("|_| |_|_| |____/____|\n");
162 printf("\n");
163
164
165 printf("Init complete: Ready to roll!\n");
166
167 uint16_t usButtonId = 0;
168 /* USER CODE END 2 */
169
170 /* Infinite loop */
171 /* USER CODE BEGIN WHILE */
172 while (1)
173 {
174 /* USER CODE END WHILE */
175
176 /* USER CODE BEGIN 3 */
177
178
179 MX_LWIP_Process();
181
185
186 usButtonId = usDisplayTouch(&TS_State);
187 if(usButtonId != 0){
188 printf("Button: %d \n",usButtonId);
189
190 switch (usButtonId){
191 case 1:
192 errHaSend(entity1,defaultAction,1);
193 break;
194 case 2:
195 errHaSend(entity2,defaultAction,2);
196 break;
197 case 3:
198 errHaSend(entity3,defaultAction,3);
199 break;
200 case 4:
201 errHaSend(entity4,defaultAction,4);
202 break;
203 case 5:
204 errHaSend(entity5,defaultAction,5);
205 break;
206 case 6:
207 errHaSend(entity6,defaultAction,6);
208 break;
209 default:
210 printf("Error button doesn't exist");
211 break;
212 }
213 vDebounce(&TS_State);
214 usButtonId = 0;
215 }
216
217 }
218 /* USER CODE END 3 */
219}
err_t errHaSend(char entity[], char action[], uint16_t usButton)
Stuur boodschap naar server.
Definition TCP_HA.c:389
void vHaWaitOnLink(err_t err)
Wacht op link.
Definition TCP_HA.c:347
void vDisplaycCheckScreensaver(void)
Schakelt het display uit na ingestelde tijd ( SCREENSAVER_DELAY)
Definition display.c:76
uint16_t usDisplayTouch(TS_StateTypeDef *TS_State)
Verwerkt de touch actie van de user.
Definition display.c:240
void vDisplaySetUpButtonStates(void)
Vraagt de status op van iedere knop.
Definition display.c:203
void vDisplayMessage(char message[])
Display message op het scherm.
Definition display.c:162
void vDisplayInit(void)
Init display.
Definition display.c:108
void vDisplayMainScreen(void)
Display het hoofd scherm met de UI.
Definition display.c:147
static void MX_LTDC_Init(void)
LTDC Initialization Function.
Definition main.c:319
static void vDebounce(TS_StateTypeDef *)
Debounce van de touchScreen *.
Definition main.c:101
static void MX_QUADSPI_Init(void)
QUADSPI Initialization Function.
Definition main.c:401
static void MX_USART1_UART_Init(void)
USART1 Initialization Function.
Definition main.c:436
void SystemClock_Config(void)
System Clock Configuration.
Definition main.c:225
static void MX_DMA2D_Init(void)
DMA2D Initialization Function.
Definition main.c:282
static void MX_FMC_Init(void)
Definition main.c:467
static void MX_GPIO_Init(void)
GPIO Initialization Function.
Definition main.c:518

References errHaSend(), MX_DMA2D_Init(), MX_FMC_Init(), MX_GPIO_Init(), MX_LTDC_Init(), MX_QUADSPI_Init(), MX_USART1_UART_Init(), SystemClock_Config(), usDisplayTouch(), vDebounce(), vDisplaycCheckScreensaver(), vDisplayInit(), vDisplayMainScreen(), vDisplayMessage(), vDisplaySetUpButtonStates(), and vHaWaitOnLink().

◆ MX_DMA2D_Init()

static void MX_DMA2D_Init ( void )
static

DMA2D Initialization Function.

Parameters
None
Return values
None

Definition at line 282 of file main.c.

283{
284
285 /* USER CODE BEGIN DMA2D_Init 0 */
286
287 /* USER CODE END DMA2D_Init 0 */
288
289 /* USER CODE BEGIN DMA2D_Init 1 */
290
291 /* USER CODE END DMA2D_Init 1 */
292 hdma2d.Instance = DMA2D;
293 hdma2d.Init.Mode = DMA2D_M2M;
294 hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB8888;
295 hdma2d.Init.OutputOffset = 0;
296 hdma2d.LayerCfg[1].InputOffset = 0;
297 hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_ARGB8888;
298 hdma2d.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
299 hdma2d.LayerCfg[1].InputAlpha = 0;
300 if (HAL_DMA2D_Init(&hdma2d) != HAL_OK)
301 {
303 }
304 if (HAL_DMA2D_ConfigLayer(&hdma2d, 1) != HAL_OK)
305 {
307 }
308 /* USER CODE BEGIN DMA2D_Init 2 */
309
310 /* USER CODE END DMA2D_Init 2 */
311
312}
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition main.c:575
DMA2D_HandleTypeDef hdma2d
Definition main.c:55

References Error_Handler(), and hdma2d.

◆ MX_FMC_Init()

static void MX_FMC_Init ( void )
static

Perform the SDRAM1 memory initialization sequence

Definition at line 467 of file main.c.

468{
469
470 /* USER CODE BEGIN FMC_Init 0 */
471
472 /* USER CODE END FMC_Init 0 */
473
474 FMC_SDRAM_TimingTypeDef SdramTiming = {0};
475
476 /* USER CODE BEGIN FMC_Init 1 */
477
478 /* USER CODE END FMC_Init 1 */
479
481
482 hsdram1.Instance = FMC_SDRAM_DEVICE;
483 /* hsdram1.Init */
484 hsdram1.Init.SDBank = FMC_SDRAM_BANK1;
485 hsdram1.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8;
486 hsdram1.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12;
487 hsdram1.Init.MemoryDataWidth = FMC_SDRAM_MEM_BUS_WIDTH_16;
488 hsdram1.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;
489 hsdram1.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_1;
490 hsdram1.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;
491 hsdram1.Init.SDClockPeriod = FMC_SDRAM_CLOCK_DISABLE;
492 hsdram1.Init.ReadBurst = FMC_SDRAM_RBURST_DISABLE;
493 hsdram1.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0;
494 /* SdramTiming */
495 SdramTiming.LoadToActiveDelay = 16;
496 SdramTiming.ExitSelfRefreshDelay = 16;
497 SdramTiming.SelfRefreshTime = 16;
498 SdramTiming.RowCycleDelay = 16;
499 SdramTiming.WriteRecoveryTime = 16;
500 SdramTiming.RPDelay = 16;
501 SdramTiming.RCDDelay = 16;
502
503 if (HAL_SDRAM_Init(&hsdram1, &SdramTiming) != HAL_OK)
504 {
505 Error_Handler( );
506 }
507
508 /* USER CODE BEGIN FMC_Init 2 */
509
510 /* USER CODE END FMC_Init 2 */
511}
SDRAM_HandleTypeDef hsdram1
Definition main.c:63

References Error_Handler(), and hsdram1.

◆ MX_GPIO_Init()

static void MX_GPIO_Init ( void )
static

GPIO Initialization Function.

Parameters
None
Return values
None

Definition at line 518 of file main.c.

519{
520 GPIO_InitTypeDef GPIO_InitStruct = {0};
521/* USER CODE BEGIN MX_GPIO_Init_1 */
522/* USER CODE END MX_GPIO_Init_1 */
523
524 /* GPIO Ports Clock Enable */
525 __HAL_RCC_GPIOE_CLK_ENABLE();
526 __HAL_RCC_GPIOG_CLK_ENABLE();
527 __HAL_RCC_GPIOB_CLK_ENABLE();
528 __HAL_RCC_GPIOJ_CLK_ENABLE();
529 __HAL_RCC_GPIOD_CLK_ENABLE();
530 __HAL_RCC_GPIOK_CLK_ENABLE();
531 __HAL_RCC_GPIOF_CLK_ENABLE();
532 __HAL_RCC_GPIOI_CLK_ENABLE();
533 __HAL_RCC_GPIOC_CLK_ENABLE();
534 __HAL_RCC_GPIOA_CLK_ENABLE();
535 __HAL_RCC_GPIOH_CLK_ENABLE();
536
537 /*Configure GPIO pin Output Level */
538 HAL_GPIO_WritePin(LCD_BL_CTRL_GPIO_Port, LCD_BL_CTRL_Pin, GPIO_PIN_RESET);
539
540 /*Configure GPIO pin Output Level */
541 HAL_GPIO_WritePin(GPIOI, LED_Pin|LCD_DISP_Pin, GPIO_PIN_RESET);
542
543 /*Configure GPIO pin : LCD_BL_CTRL_Pin */
544 GPIO_InitStruct.Pin = LCD_BL_CTRL_Pin;
545 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
546 GPIO_InitStruct.Pull = GPIO_NOPULL;
547 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
548 HAL_GPIO_Init(LCD_BL_CTRL_GPIO_Port, &GPIO_InitStruct);
549
550 /*Configure GPIO pins : LED_Pin LCD_DISP_Pin */
551 GPIO_InitStruct.Pin = LED_Pin|LCD_DISP_Pin;
552 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
553 GPIO_InitStruct.Pull = GPIO_NOPULL;
554 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
555 HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
556
557 /*Configure GPIO pin : BUTTON_Pin */
558 GPIO_InitStruct.Pin = BUTTON_Pin;
559 GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
560 GPIO_InitStruct.Pull = GPIO_NOPULL;
561 HAL_GPIO_Init(BUTTON_GPIO_Port, &GPIO_InitStruct);
562
563/* USER CODE BEGIN MX_GPIO_Init_2 */
564/* USER CODE END MX_GPIO_Init_2 */
565}

◆ MX_LTDC_Init()

static void MX_LTDC_Init ( void )
static

LTDC Initialization Function.

Parameters
None
Return values
None

Definition at line 319 of file main.c.

320{
321
322 /* USER CODE BEGIN LTDC_Init 0 */
323
324 /* USER CODE END LTDC_Init 0 */
325
326 LTDC_LayerCfgTypeDef pLayerCfg = {0};
327 LTDC_LayerCfgTypeDef pLayerCfg1 = {0};
328
329 /* USER CODE BEGIN LTDC_Init 1 */
330
331 /* USER CODE END LTDC_Init 1 */
332 hltdc.Instance = LTDC;
333 hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
334 hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
335 hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AL;
336 hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
337 hltdc.Init.HorizontalSync = 40;
338 hltdc.Init.VerticalSync = 9;
339 hltdc.Init.AccumulatedHBP = 53;
340 hltdc.Init.AccumulatedVBP = 11;
341 hltdc.Init.AccumulatedActiveW = 533;
342 hltdc.Init.AccumulatedActiveH = 283;
343 hltdc.Init.TotalWidth = 565;
344 hltdc.Init.TotalHeigh = 285;
345 hltdc.Init.Backcolor.Blue = 0;
346 hltdc.Init.Backcolor.Green = 255;
347 hltdc.Init.Backcolor.Red = 0;
348 if (HAL_LTDC_Init(&hltdc) != HAL_OK)
349 {
351 }
352 pLayerCfg.WindowX0 = 0;
353 pLayerCfg.WindowX1 = 480;
354 pLayerCfg.WindowY0 = 0;
355 pLayerCfg.WindowY1 = 272;
356 pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888;
357 pLayerCfg.Alpha = 255;
358 pLayerCfg.Alpha0 = 0;
359 pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA;
360 pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA;
361 pLayerCfg.FBStartAdress = 0;
362 pLayerCfg.ImageWidth = 480;
363 pLayerCfg.ImageHeight = 272;
364 pLayerCfg.Backcolor.Blue = 0;
365 pLayerCfg.Backcolor.Green = 0;
366 pLayerCfg.Backcolor.Red = 0;
367 if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0) != HAL_OK)
368 {
370 }
371 pLayerCfg1.WindowX0 = 0;
372 pLayerCfg1.WindowX1 = 480;
373 pLayerCfg1.WindowY0 = 0;
374 pLayerCfg1.WindowY1 = 272;
375 pLayerCfg1.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888;
376 pLayerCfg1.Alpha = 255;
377 pLayerCfg1.Alpha0 = 0;
378 pLayerCfg1.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA;
379 pLayerCfg1.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA;
380 pLayerCfg1.FBStartAdress = 0;
381 pLayerCfg1.ImageWidth = 480;
382 pLayerCfg1.ImageHeight = 272;
383 pLayerCfg1.Backcolor.Blue = 0;
384 pLayerCfg1.Backcolor.Green = 0;
385 pLayerCfg1.Backcolor.Red = 0;
386 if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg1, 1) != HAL_OK)
387 {
389 }
390 /* USER CODE BEGIN LTDC_Init 2 */
391
392 /* USER CODE END LTDC_Init 2 */
393
394}
LTDC_HandleTypeDef hltdc
Definition main.c:57

References Error_Handler(), and hltdc.

◆ MX_QUADSPI_Init()

static void MX_QUADSPI_Init ( void )
static

QUADSPI Initialization Function.

Parameters
None
Return values
None

Definition at line 401 of file main.c.

402{
403
404 /* USER CODE BEGIN QUADSPI_Init 0 */
405
406 /* USER CODE END QUADSPI_Init 0 */
407
408 /* USER CODE BEGIN QUADSPI_Init 1 */
409
410 /* USER CODE END QUADSPI_Init 1 */
411 /* QUADSPI parameter configuration*/
412 hqspi.Instance = QUADSPI;
413 hqspi.Init.ClockPrescaler = 255;
414 hqspi.Init.FifoThreshold = 1;
415 hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_NONE;
416 hqspi.Init.FlashSize = 1;
417 hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_1_CYCLE;
418 hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0;
419 hqspi.Init.FlashID = QSPI_FLASH_ID_1;
420 hqspi.Init.DualFlash = QSPI_DUALFLASH_DISABLE;
421 if (HAL_QSPI_Init(&hqspi) != HAL_OK)
422 {
424 }
425 /* USER CODE BEGIN QUADSPI_Init 2 */
426
427 /* USER CODE END QUADSPI_Init 2 */
428
429}
QSPI_HandleTypeDef hqspi
Definition main.c:59

References Error_Handler(), and hqspi.

◆ MX_USART1_UART_Init()

static void MX_USART1_UART_Init ( void )
static

USART1 Initialization Function.

Parameters
None
Return values
None

Definition at line 436 of file main.c.

437{
438
439 /* USER CODE BEGIN USART1_Init 0 */
440
441 /* USER CODE END USART1_Init 0 */
442
443 /* USER CODE BEGIN USART1_Init 1 */
444
445 /* USER CODE END USART1_Init 1 */
446 huart1.Instance = USART1;
447 huart1.Init.BaudRate = 115200;
448 huart1.Init.WordLength = UART_WORDLENGTH_8B;
449 huart1.Init.StopBits = UART_STOPBITS_1;
450 huart1.Init.Parity = UART_PARITY_NONE;
451 huart1.Init.Mode = UART_MODE_TX_RX;
452 huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
453 huart1.Init.OverSampling = UART_OVERSAMPLING_16;
454 huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
455 huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
456 if (HAL_UART_Init(&huart1) != HAL_OK)
457 {
459 }
460 /* USER CODE BEGIN USART1_Init 2 */
461
462 /* USER CODE END USART1_Init 2 */
463
464}

References Error_Handler(), and huart1.

◆ SystemClock_Config()

void SystemClock_Config ( void )

System Clock Configuration.

Return values
None

Configure LSE Drive Capability

Configure the main internal regulator output voltage

Initializes the RCC Oscillators according to the specified parameters in the RCC_OscInitTypeDef structure.

Activate the Over-Drive mode

Initializes the CPU, AHB and APB buses clocks

Definition at line 225 of file main.c.

226{
227 RCC_OscInitTypeDef RCC_OscInitStruct = {0};
228 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
229
231
232 HAL_PWR_EnableBkUpAccess();
233
235
236 __HAL_RCC_PWR_CLK_ENABLE();
237 __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
238
241
242 RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
243 RCC_OscInitStruct.HSEState = RCC_HSE_ON;
244 RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
245 RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
246 RCC_OscInitStruct.PLL.PLLM = 25;
247 RCC_OscInitStruct.PLL.PLLN = 400;
248 RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
249 RCC_OscInitStruct.PLL.PLLQ = 2;
250 if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
251 {
253 }
254
256
257 if (HAL_PWREx_EnableOverDrive() != HAL_OK)
258 {
260 }
261
263
264 RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
265 |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
266 RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
267 RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
268 RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
269 RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
270
271 if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_6) != HAL_OK)
272 {
274 }
275}

References Error_Handler().

◆ vDebounce()

static void vDebounce ( TS_StateTypeDef * TS_State)
static

Debounce van de touchScreen *.

Parameters
TS_Statetouchscreen Struct

Definition at line 101 of file main.c.

101 {
102 while(TS_State->touchDetected >= 1){
103 MX_LWIP_Process();
105 BSP_TS_GetState(TS_State); //TS_State is hier lokaal mag dit?????
106 }
107}

References vDisplaycCheckScreensaver().

Variable Documentation

◆ globalReceive

uint8_t globalReceive = 0

Globale variabele voor communicatie tussen twee aparte functies.

Definition at line 67 of file main.c.

◆ hdma2d

DMA2D_HandleTypeDef hdma2d

Definition at line 55 of file main.c.

◆ hltdc

LTDC_HandleTypeDef hltdc

Definition at line 57 of file main.c.

◆ hqspi

QSPI_HandleTypeDef hqspi

Definition at line 59 of file main.c.

◆ hsdram1

SDRAM_HandleTypeDef hsdram1

Definition at line 63 of file main.c.

◆ huart1

UART_HandleTypeDef huart1

Definition at line 61 of file main.c.