/* * Copyright : (C) 2023 Phytium Information Technology, Inc. * All Rights Reserved. * * This program is OPEN SOURCE software: you can redistribute it and/or modify it * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, * either version 1.0 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Phytium Public License for more details. * * * FilePath: main.c * Date: 2022-02-10 14:53:41 * LastEditTime: 2022-02-17 17:36:17 * Description:  This file is for pwm example main functions * * Modify History: * Ver   Who        Date         Changes * ----- ------     --------    -------------------------------------- * 1.0 zhangyan 2023/2/24 first release */ /***************************** Include Files *********************************/ #include "sdkconfig.h" #ifndef SDK_CONFIG_H__ #warning "Please include sdkconfig.h" #endif #ifdef CONFIG_USE_LETTER_SHELL #include "shell_port.h" #endif #include "pwm_dead_band_example.h" #include "pwm_dual_channel_example.h" #include "pwm_single_channel_example.h" /************************** Constant Definitions *****************************/ /**************************** Type Definitions *******************************/ /************************** Variable Definitions *****************************/ /***************** Macros (Inline Functions) Definitions *********************/ /************************** Function Prototypes ******************************/ /************************** Function *****************************************/ int main() { #ifdef CONFIG_USE_LETTER_SHELL /* if shell command is enabled, register example entry as shell command */ LSUserShellLoop(); #else /* if shell command is not enabled, run example one by one */ FPwmSingleChannelExample(); #ifdef CONFIG_FIREFLY_DEMO_BOARD FPwmDeadBandExample(); FPwmDualChannelExample(); #endif #endif return 0; }