small polish on main.c

This commit is contained in:
Rémi Heredero 2023-12-16 17:37:18 +01:00
parent 103c7c0c2c
commit b2b08bf71b

View File

@ -136,6 +136,7 @@ int main(void)
HAL_GPIO_WritePin(CS_NOKIA_GPIO_Port, CS_NOKIA_Pin, GPIO_PIN_SET);
NokiaGotoXY(0,0);
HAL_GPIO_WritePin(CS_NOKIA_GPIO_Port, CS_NOKIA_Pin, GPIO_PIN_RESET);
#ifdef INTERRUPT
HAL_SPI_Transmit_IT(&hspi2, gNokiaBuffer, gNokiaBufferSize);
#endif
@ -143,7 +144,7 @@ int main(void)
#ifdef DMA
HAL_SPI_Transmit_DMA(&hspi2, gNokiaBuffer, gNokiaBufferSize);
#endif
ScreenSaver();
}
newTick=HAL_GetTick();
@ -154,26 +155,6 @@ int main(void)
fps=0;
}
//Task 2
/*while(HAL_DMA_GetState(&hdma_spi2_tx)!=HAL_DMA_STATE_READY){
}
HAL_GPIO_WritePin(CS_NOKIA_GPIO_Port, CS_NOKIA_Pin, GPIO_PIN_SET);
NokiaGotoXY(0,0);
HAL_GPIO_WritePin(CS_NOKIA_GPIO_Port, CS_NOKIA_Pin, GPIO_PIN_RESET);
HAL_SPI_Transmit_DMA(&hspi2, gNokiaBuffer, gNokiaBufferSize);
fps++;
newTick=HAL_GetTick();
if(newTick-oldTick>1000){
oldTick=newTick;
printf("FPS: %d\r\n",fps);
fps=0;
}*/
ScreenSaver();
// NokiaUpdate();