当前位置:网站首页>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();
}边栏推荐
- Several schemes of traffic exposure in kubernetes cluster
- After Firefox drag and drop, Baidu search will always be opened by default. If it is a picture, the picture will be opened.
- leetcode:55. 跳跃游戏【经典贪心】
- Reduce the pip to the specified version (upgrade the PIP through CMP and reduce it to the original version)
- leetcode1863_ 2021-10-14
- Raspberry pie preliminary use
- 【无标题】
- First order model realizes photo moving (with tool code) | machine learning
- KT6368A蓝牙芯片的主从机之前透传功能说明,2.4G跳频自动连接
- Flutter 如何使用在线转码工具将 JSON 转为 Model
猜你喜欢

Heartless sword Chinese English bilingual poem 003 The sea of books

虚拟人的产业发展现状

字符串习题总结2

A pit in try with resources

L2 元年,Arbitrum Nitro 升级带来更兼容高效的开发体验

You are using pip version 21.1.2; however, version 22.1.2 is available

理想L9,智能座舱新潮流

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

如何比较两个或多个分布:从可视化到统计检验的方法总结

socket(1)
随机推荐
Principle and application of queue implementation
Notes on writing questions (18) -- binary tree: common ancestor problem
TCP RTT measurement tips
Short video mall system, how does scroll view adapt to the remaining height of the page
Resolving the conflict problem of the flutter Library
You are using pip version 21.1.2; however, version 22.1.2 is available
[untitled]
What aspects should we start with in the feasibility analysis of dry goods?
系统测试主要步骤
【无标题】
Implementation of heap sort and quick sort principle
如何提取网页中的日期?
揭秘B站,程序员穿女装敲代码,效率更高是真的吗?
TCP RTT测量妙计
socket done
leetcode:55. 跳跃游戏【经典贪心】
CV2 package guide times could not find a version that satisfies the requirement CV2 (from versions: none)
Excel布局
进程的通信方式
linq查询集合类入门 案例武林高手类