TA的每日心情 | 难过 2019-11-20 15:02 |
|---|
签到天数: 1 天 [LV.1]初来乍到
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
我在keil中添加了代码,配置引脚之后拉高引脚。没有反应,用的内部时钟。代码如下:' d+ `( K# T3 j9 a- U3 o
" v7 d( n: x4 U/ h, z/ Z5 Q- void LCD_GPIO_Init(void)
- {
- LL_GPIO_InitTypeDef GPIO_InitStruct = {0};
- LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOA);
- LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOB);
- LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOC);
- LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOH);
- GPIO_InitStruct.Pin = data_DB;
- GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
- GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
- GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_MEDIUM;
- LL_GPIO_Init(GPIOA, &GPIO_InitStruct);
- GPIO_InitStruct.Pin = RET|EN_LED;
- GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
- GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
- GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_MEDIUM;
- LL_GPIO_Init(GPIOB, &GPIO_InitStruct);
- GPIO_InitStruct.Pin = RS|RW|E;
- GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
- GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
- GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_MEDIUM;
- LL_GPIO_Init(GPIOC, &GPIO_InitStruct);
- GPIO_InitStruct.Pin = CS1|CS2;
- GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
- GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
- GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_MEDIUM;
- LL_GPIO_Init(GPIOH, &GPIO_InitStruct);
- LL_GPIO_SetOutputPin(GPIOB,EN_LED);//EN_LED= 1
- }
7 V# |( y5 d0 j: A
" O; C9 a$ r( @9 b |
|