feat: 基本完成通信帧主机写操作接口

This commit is contained in:
bmy
2024-02-24 18:32:52 +08:00
parent 399ebeea1a
commit 85ccbea2f8
9 changed files with 117 additions and 44 deletions

View File

@@ -52,7 +52,7 @@ int main(void)
clock_init(SYSTEM_CLOCK_144M);
system_delay_init();
debug_init();
// mt9v03x_init();
mt9v03x_init();
ips200_init(IPS200_TYPE_SPI);
by_led_init();
@@ -72,7 +72,7 @@ int main(void)
/** 测试完成后移除 **/
// by_tiny_frame_parse_handle_register(test);
by_tiny_frame_parse_start_listern();
// by_tiny_frame_parse_start_listen();
by_tf_pack_frame_t frame_now;
@@ -82,6 +82,7 @@ int main(void)
frame_now.slave_id = 0x0D;
/** 测试完成后移除 **/
by_tiny_frame_write(0x0D, 0x4059, 0x19260817);
while (1) {
Page_Run();
by_buzzer_run();
@@ -93,22 +94,22 @@ int main(void)
by_tiny_frame_parse_timer_handle();
/** 测试完成后移除 **/
// if (mt9v03x_finish_flag) {
// // 该操作消耗大概 1970 个 tick折合约 110us
// memcpy(mt9v03x_image_copy[0], mt9v03x_image[0], (sizeof(mt9v03x_image_copy) / sizeof(uint8_t)));
// // adaptiveThreshold((uint8_t*)mt9v03x_image_copy, (uint8_t*)mt9v03x_image_copy, 188, 120, 7, 17);
// // ips200_show_gray_image(0, 0, mt9v03x_image_copy[0], MT9V03X_W, MT9V03X_H, MT9V03X_W, MT9V03X_H, 0);
// mt9v03x_finish_flag = 0;
// by_led_info_blink();
// state_type = COMMON_STATE;
// img_processing();
// get_corners();
// aim_distance = COMMON_AIM;
// tracking();
// ElementJudge();
// ElementRun();
// MidLineTrack();
// }
if (mt9v03x_finish_flag) {
// 该操作消耗大概 1970 个 tick折合约 110us
memcpy(mt9v03x_image_copy[0], mt9v03x_image[0], (sizeof(mt9v03x_image_copy) / sizeof(uint8_t)));
// adaptiveThreshold((uint8_t*)mt9v03x_image_copy, (uint8_t*)mt9v03x_image_copy, 188, 120, 7, 17);
// ips200_show_gray_image(0, 0, mt9v03x_image_copy[0], MT9V03X_W, MT9V03X_H, MT9V03X_W, MT9V03X_H, 0);
mt9v03x_finish_flag = 0;
by_led_info_blink();
state_type = COMMON_STATE;
img_processing();
get_corners();
aim_distance = COMMON_AIM;
tracking();
ElementJudge();
ElementRun();
MidLineTrack();
}
}
}