1voidsetup(){// Initialize the delay function for timekeeping delayInit(); // Initialize USART for serial communication usart1Init(); // Initialize timers for PWM and other timing-related functions timer2Init(); timer3Init(); // Initialize DMA for memory transfers dmaInit(); // Initialize ADC for analog reading (e.g., battery level) adcInit(); // Initialize NRF24L01 for wireless communicationif (nrf24l01Init() == NRF_OK) { nrf24l01SetModeTX(); // Set NRF to transmit mode } else { // Handle NRF24L01 initialization error beepError(); } // OLED display initialization and show start-up screen oledInit(); oledShowLogo(); // Perform throttle self-check and configure NRF24L01 power mode throttleSelfCheck(); // Set up low-power mode if necessary lowPowerModeConfig(); }