当前位置:网站首页>Huada 4a0gpio settings
Huada 4a0gpio settings
2022-06-24 22:15:00 【Paper tape】
typedef struct
{
uint16_t u16PinState; /*!< Set pin state to High or Low, @ref GPIO_PinState_Sel for details */
uint16_t u16PinDir; /*!< Pin mode setting, @ref GPIO_PinDirection_Sel for details */
uint16_t u16PinOType; /*!< Output type setting, @ref GPIO_PinOutType_Sel for details */
uint16_t u16PinDrv; /*!< Pin drive capacity setting, @ref GPIO_PinDrv_Sel for details */
uint16_t u16Latch; /*!< Pin latch setting, @ref GPIO_PinLatch_Sel for details */
uint16_t u16PullUp; /*!< Internal pull-up resistor setting, @ref GPIO_PinPU_Sel for details */
uint16_t u16Invert; /*!< Pin input/output invert setting, @ref GPIO_PinInvert_Sel */
uint16_t u16PinIType; /*!< Input type setting, @ref GPIO_PinInType_Sel */
uint16_t u16ExInt; /*!< External interrupt pin setting, @ref GPIO_PinExInt_Sel for details */
uint16_t u16PinAttr; /*!< Digital or analog attribute setting, @ref GPIO_PinMode_Sel for details */
} stc_gpio_init_t;pstcGpioInit->u16PinState = PIN_STATE_RESET;// Set the pin status to high and low level pstcGpioInit->u16PinDir = PIN_DIR_IN;// Set input or output pstcGpioInit->u16PinOType = PIN_OTYPE_CMOS;// Set yes NMOS still PMOS Output pstcGpioInit->u16PinDrv = PIN_DRV_LOW;// Set push-pull output mode , High and low medium speed output pstcGpioInit->u16Latch = PIN_LATCH_OFF;// Latch enable // Latch disable pstcGpioInit->u16PullUp = PIN_PU_OFF;/ Internal pull-up enable adjustment pstcGpioInit->u16Invert = PIN_INVERT_OFF;// Input and output . Reverse enable pstcGpioInit->u16PinIType = PIN_ITYPE_SMT;// The input methods are divided into SMT Input CMOS The input of pstcGpioInit->u16ExInt = PIN_EXINT_OFF;// External interrupt pstcGpioInit->u16PinAttr = PIN_ATTR_DIGITAL;// Digital and analog properties
About 4A0 A general step in the application of :
stc_gpio_init_t stcGpioInit;// Make a statement gpio Configuration of struct.
/* Register write enable for some required peripherals. */
Peripheral_WE();
/* LED initialize */
(void)GPIO_StructInit(&stcGpioInit);// About gpio Setting of each attribute .
(void)GPIO_Init(LED_GREEN_PORT, LED_GREEN_PIN, &stcGpioInit);// Setting of a certain pin , After an initialization .
/* Register write protected for some required peripherals. */
Peripheral_WP();
/* "Turn off" LED before set to output */
GPIO_ResetPins(LED_GREEN_PORT, LED_GREEN_PIN);// Set separate high and low level output inputs
/* Output enable */
GPIO_OE(LED_GREEN_PORT, LED_GREEN_PIN, Enable);// Set high and low level output
for (;;)
{
/* LED */
GPIO_SetPins(LED_GREEN_PORT, LED_GREEN_PIN);//
DDL_DelayMS(2000UL);// Time delay
GPIO_ResetPins(LED_GREEN_PORT, LED_GREEN_PIN);//
DDL_DelayMS(2000UL);// Time delay
/* De-init port if necessary */
//GPIO_DeInit();
}边栏推荐
- 揭秘B站,程序员穿女装敲代码,效率更高是真的吗?
- Development trend and path of SaaS industry in China
- socket(2)
- 嵌入式开发:技巧和窍门——干净地从引导加载程序跳转到应用程序代码
- 直播软件app开发,左右自动滑动的轮播图广告
- How to grab the mobile phone bag for analysis? Fiddler artifact may help you!
- 火狐拖放后,总会默认打开百度搜索,如果是图片,则会打开图片。
- Datakit agent realizes unified data aggregation in LAN
- 系统测试主要步骤
- Balanced binary search tree
猜你喜欢

华大04a工作模式/低功耗模式

Binary search tree template

Want to be a test leader, do you know these 6 skills?

SAP interface debug setting external breakpoints

Detailed installation and use of performance test tool wrk

60 divine vs Code plug-ins!!

降低pip到指定版本(通過PyCharm昇級pip,在降低到原來版本)

first-order-model实现照片动起来(附工具代码) | 机器学习

专科出身,2年进苏宁,5年跳阿里,论我是怎么快速晋升的?

ansible基本配置
随机推荐
Reduce the pip to the specified version (upgrade the PIP through pycharm, and then reduce it to the original version)
What aspects should we start with in the feasibility analysis of dry goods?
波卡生态发展不设限的奥义——多维解读平行链
Resolving the conflict problem of the flutter Library
Excel布局
学习笔记23--多传感器信息融合基础理论(上)
socket done
权限想要细化到按钮,怎么做?
Flutter-使用 typedef的注意事项
First order model realizes photo moving (with tool code) | machine learning
In the first year of L2, arbitrum nitro was upgraded to bring more compatible and efficient development experience
60 个神级 VS Code 插件!!
如何抓手机的包进行分析,Fiddler神器或许能帮到您!
try-with-resources 中的一个坑,注意避让
火狐拖放后,总会默认打开百度搜索,如果是图片,则会打开图片。
leetcode:55. 跳跃游戏【经典贪心】
01--- conditions for interference of two trains of waves at the meeting place
How to refine permissions to buttons?
Excel layout
【无标题】