三亩地 三亩地SAN MU DI · CODE DIARY
ARTICLE DETAIL

日记详情

真实记录编程学习的某一天,欢迎挑你感兴趣的翻一翻。

域名注册后怎么做网站wordpress语言插件qx

域名注册后怎么做网站wordpress语言插件qx 域名注册后怎么做网站,wordpress语言插件qx,农业局网站建设实施方案,什么是响应式网页1、简介 HPM Pinmux Tool类似STM32CubeMX#xff0c;为了方便管脚分配#xff0c;选管脚#xff0c;勾选配置#xff0c;生成配置代码#xff0c;省去人工码代码。 下面介绍两种软件的打开方法#xff0c;分别是网页方式和VS Code方式#xff0c;不过殊途同归#xf…1、简介HPM Pinmux Tool类似STM32CubeMX为了方便管脚分配选管脚勾选配置生成配置代码省去人工码代码。下面介绍两种软件的打开方法分别是网页方式和VS Code方式不过殊途同归最终给出一个简单的GPIO配置实例。2、网页方式gitee网址软件开发资料-先楫半导体3、VS Code方式gitee4、应用实例以HPM5300EVK开发板为例增加对一个GPIO的控制4.1硬件引脚选择PB114.2管脚分配4.3代码预览/* * Copyright (c) 2026 HPMicro * * SPDX-License-Identifier: BSD-3-Clause * * * Automatically generated by HPM Pinmux Tool * * * Note: * PY and PZ IOs: if any SOC pin function needs to be routed to these IOs, * besides of IOC, PIOC/BIOC needs to be configured SOC_GPIO_X_xx, so that * expected SoC function can be enabled on these IOs. */ #include pinmux.h #include board.h #include hpm_gpio_drv.h #include hpm_gpiom_drv.h void init_pins(void) { HPM_IOC-PAD[IOC_PAD_PB11].FUNC_CTL IOC_PB11_FUNC_CTL_GPIO_B_11; gpiom_set_pin_controller(HPM_GPIOM, GPIOM_ASSIGN_GPIOB, 11, gpiom_soc_gpio0); gpiom_disable_pin_visibility(HPM_GPIOM, GPIOM_ASSIGN_GPIOB, 11, gpiom_core0_fast); gpio_set_pin_output(HPM_GPIO0, GPIO_OE_GPIOB, 11); gpio_write_pin(HPM_GPIO0, GPIO_DO_GPIOB, 11, 0); }4.4复制代码到应用程序在helloworld例程的基础上尽量少的改动代码复制主要代码并增加一句翻转函数/* * Copyright (c) 2021 HPMicro * * SPDX-License-Identifier: BSD-3-Clause * */ #include stdio.h #include board.h #include hpm_debug_console.h #include hpm_gpio_drv.h #include hpm_gpiom_drv.h #define LED_FLASH_PERIOD_IN_MS 300 void init_pins(void) { HPM_IOC-PAD[IOC_PAD_PB11].FUNC_CTL IOC_PB11_FUNC_CTL_GPIO_B_11; gpiom_set_pin_controller(HPM_GPIOM, GPIOM_ASSIGN_GPIOB, 11, gpiom_soc_gpio0); gpiom_disable_pin_visibility(HPM_GPIOM, GPIOM_ASSIGN_GPIOB, 11, gpiom_core0_fast); gpio_set_pin_output(HPM_GPIO0, GPIO_OE_GPIOB, 11); gpio_write_pin(HPM_GPIO0, GPIO_DO_GPIOB, 11, 0); } int main(void) { int u; board_init(); board_init_led_pins(); init_pins(); board_timer_create(LED_FLASH_PERIOD_IN_MS, board_led_toggle); printf(hello world\n); while(1) { u getchar(); if (u \r) { u \n; } printf(%c, u); gpio_toggle_pin(HPM_GPIO0, GPIO_DO_GPIOB, 11); } return 0; }4.5串口发送字符串口发送字符触发翻转4.6实测结果
← 返回列表