pref: 增加自检闪灯动作
This commit is contained in:
@@ -69,10 +69,10 @@
|
|||||||
/* add user code end 0 */
|
/* add user code end 0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief main function.
|
* @brief main function.
|
||||||
* @param none
|
* @param none
|
||||||
* @retval none
|
* @retval none
|
||||||
*/
|
*/
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
/* add user code begin 1 */
|
/* add user code begin 1 */
|
||||||
@@ -136,12 +136,21 @@ int main(void)
|
|||||||
by_messy_init();
|
by_messy_init();
|
||||||
LOGD("frame init done");
|
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");
|
LOGI("init done");
|
||||||
|
|
||||||
/* add user code end 2 */
|
/* add user code end 2 */
|
||||||
|
|
||||||
while(1)
|
while (1) {
|
||||||
{
|
|
||||||
/* add user code begin 3 */
|
/* add user code begin 3 */
|
||||||
by_messy_loop();
|
by_messy_loop();
|
||||||
by_motion_loop();
|
by_motion_loop();
|
||||||
|
|||||||
Reference in New Issue
Block a user