当前位置:网站首页>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();
}
边栏推荐
- A girl has been making hardware for ten years. 。。
- 直播软件app开发,左右自动滑动的轮播图广告
- 使用region折叠代码
- 权限想要细化到按钮,怎么做?
- leetcode-201_ 2021_ 10_ seventeen
- 虚拟人的产业发展现状
- YGG 近期游戏合作伙伴一览
- 短视频商城系统,scroll-view如何自适应页面剩余高度
- After Firefox drag and drop, Baidu search will always be opened by default. If it is a picture, the picture will be opened.
- Several schemes of traffic exposure in kubernetes cluster
猜你喜欢
I really want to send a bunch of flowers
60 个神级 VS Code 插件!!
How to grab the mobile phone bag for analysis? Fiddler artifact may help you!
是真干不过00后,给我卷的崩溃,想离职了...
I really can't do it. After 00, I collapsed and wanted to leave
Ideal L9, new trend of intelligent cockpit
Maximum flow problem
socket(1)
Rotate the square array of two-dimensional array clockwise by 90 °
KT6368A蓝牙双模透传芯片软件版本选型说明
随机推荐
leetcode:515. Find the maximum value in each tree row [brainless BFS]
Two implementation methods of stack
华大4A0GPIO设置
DAO 中常见的投票治理方式
无心剑汉英双语诗003. 《书海》
Xinlou: Huawei's seven-year building journey of sports health
MySQL gets fields and comments by indicating
嵌入式开发:技巧和窍门——干净地从引导加载程序跳转到应用程序代码
Detailed installation and use of performance test tool wrk
Réduire le PIP à la version spécifiée (mettre à jour le PIP avec pycharm avant de le réduire à la version originale)
[untitled]
leetcode_ one thousand three hundred and sixty-five
Summary of papers on traveling salesman problem (TSP)
LINQ query collection class introductory cases Wulin expert class
Implementation of heap sort and quick sort principle
Heartless sword Chinese English bilingual poem 003 The sea of books
ansible基本配置
I really can't do it. After 00, I collapsed and wanted to leave
The logic of "Ali health" has long changed
How does flutter use the online transcoding tool to convert JSON to model