当前位置:网站首页>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();
}边栏推荐
- 降低pip到指定版本(通过PyCharm升级pip,在降低到原来版本)
- In the era of industrial Internet, there is no Internet in the traditional sense
- 字符串习题总结2
- Excel layout
- Balanced binary search tree
- How to refine permissions to buttons?
- 系统测试主要步骤
- 【无标题】
- Jianmu continuous integration platform v2.5.0 release
- Graduation design of phase 6 of the construction practice camp
猜你喜欢

Raspberry pie preliminary use

Yida technology signed a contract with seven wolves to help the digital transformation of "Chinese men's wear leader"

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

一个女孩子居然做了十年硬件。。。

try-with-resources 中的一个坑,注意避让

Guava中这些Map的骚操作,让我的代码量减少了50%

Interviewer: you said you are proficient in redis. Have you seen the persistent configuration?

That is to say, "live broadcast" is launched! One stop live broadcast service with full link upgrade

The collection of zero code enterprise application cases in various industries was officially released

Want to be a test leader, do you know these 6 skills?
随机推荐
What aspects should we start with in the feasibility analysis of dry goods?
代理模式详解
Flutter: Unsupported value: false/true
【无标题】
【OpenCV 例程200篇】209. HSV 颜色空间的彩色图像分割
Stl+ tree
leetcode_ 191_ 2021-10-15
try-with-resources 中的一个坑,注意避让
How to extract dates from web pages?
Raspberry pie preliminary use
MySQL gets fields and comments by indicating
Double linked list implementation
想当测试Leader,这6项技能你会吗?
Development trend and path of SaaS industry in China
02--- impossible phenomenon of longitudinal wave
壹沓科技签约七匹狼,助力「中国男装领导者」数字化转型
【无标题】
Reduce the pip to the specified version (upgrade the PIP through pycharm, and then reduce it to the original version)
Maximum flow problem
Several schemes of traffic exposure in kubernetes cluster