#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void my_setup_1() { schInit(); logInit(); showInit(); } void my_errorHandler() { show(LED_RED, ON); } void my_setup_2() { show(LED_RED, OFF); show(LED_GREEN, BLINK); logMsg("Application starting"); eepromInit(); wizInit(); mqttCommInit(); cmdHandlerInit(); frontendInit(); frontendSetThreshold(240); mbusCommInit(); } void my_loop() { show(DEBUG_1, TOGGLE); schExec(); #ifndef LOGGER_OUTPUT_BY_INTERRUPT logExec(); #endif //LOGGER_OUTPUT_BY_INTERRUPT } void SYSTICK_Callback() { schUpdate(); } void HAL_GPIO_EXTI_Callback(uint16_t pin) { if (pin == Loop_Status_Pin) { loopStatusCallback(); } } void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc) { if (hadc == &frontendAdc) { frontendAdcCallback(hadc); } } void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) { if (huart == &mbusUart) { mbusCommTxCpltCallback(huart); } #ifdef LOGGER_OUTPUT_BY_INTERRUPT else if (huart == &debugUart) { debugTxCpltCallback(huart); } #endif //LOGGER_OUTPUT_BY_INTERRUPT } void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { if (huart == &mbusUart) { mbusCommRxCpltCallback(huart); } } void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi) { if (hspi == &eepromSpi) { eepromSpiTxCpltCallback(hspi); } }