pref: 增加自检闪灯动作

This commit is contained in:
bmy
2024-08-03 12:28:58 +08:00
parent f2caaae8c8
commit 5003e2df6f

View File

@@ -136,12 +136,21 @@ int main(void)
by_messy_init();
LOGD("frame init done");
/* self test */
gpio_bits_write(GPIOB, GPIO_PINS_6, FALSE); // 灯条
gpio_bits_write(GPIOB, GPIO_PINS_7, FALSE); // 蜂鸣器
for (uint8_t i = 0; i < 4; i++) {
gpio_bits_write(GPIOB, GPIO_PINS_6, !gpio_output_data_bit_read(GPIOB, GPIO_PINS_6)); // 灯条
gpio_bits_write(GPIOB, GPIO_PINS_7, !gpio_output_data_bit_read(GPIOB, GPIO_PINS_7)); // 蜂鸣器
DWT_Delay(100000);
}
LOGI("init done");
/* add user code end 2 */
while(1)
{
while (1) {
/* add user code begin 3 */
by_messy_loop();
by_motion_loop();