Files
QD4C-firmware/app/main.c

74 lines
2.6 KiB
C
Raw Normal View History

2023-12-11 21:45:06 +08:00
/*********************************************************************************************************************
* CH32V307VCT6 Opensourec Library CH32V307VCT6 SDK
* Copyright (c) 2022 SEEKFREE
*
* CH32V307VCT6
*
* CH32V307VCT6
* GPLGNU General Public License GNU
* GPL 3 GPL3.0/
*
*
*
* GPL
*
* GPL
* <https://www.gnu.org/licenses/>
*
*
* 使 GPL3.0
* libraries/doc GPL3_permission_statement.txt
* libraries LICENSE
* 使
********************************************************************************************************************/
#include "gl_headfile.h"
#include "by_rt_button.h"
#include "by_fan_control.h"
#include "./page/page.h"
2024-01-07 16:58:53 +08:00
#include "jj_blueteeth.h"
#include "jj_param.h"
#include "./page/page_ui_widget.h"
2024-01-08 22:08:43 +08:00
#include "by_buzzer.h"
2024-01-16 20:03:21 +08:00
#include "jj_motion.h"
#include "by_imu.h"
int main(void)
2023-12-11 21:45:06 +08:00
{
2024-02-07 10:24:11 +08:00
int16_t i = 0;
clock_init(SYSTEM_CLOCK_120M);
system_delay_init();
debug_init();
2024-02-07 10:24:11 +08:00
ips200_init(IPS200_TYPE_SPI);
2024-02-07 10:24:11 +08:00
by_rb_init();
by_buzzer_init();
by_pwm_init();
2024-02-07 10:24:11 +08:00
Page_Init();
2024-01-16 20:03:21 +08:00
2024-02-07 10:24:11 +08:00
while (1) {
2024-01-16 20:03:21 +08:00
2024-02-07 10:24:11 +08:00
// switch (by_get_rb_status()) {
// case 3:
// i++;
// break;
// case 4:
// i--;
// break;
// default:
// break;
// }
2024-02-07 10:24:11 +08:00
// by_pwm_update_duty(500 + i * 50, 500 + i * 50);
// by_pwm_power_duty(500 + i * 50, 500 + i * 50, 500 + i * 50, 500 + i * 50);
// // ips200_show_uint(0, 0, 1000, 4);
// ips200_draw_rect(0, 0, 50, 50, RGB565_YELLOW);
// system_delay_ms(100);
// ips200_draw_rect(0, 0, 50, 50, RGB565_BLACK);
// system_delay_ms(10);
queue_pop_read();
Page_Run();
2023-12-11 21:45:06 +08:00
}
}