打印

LCD的配置函数LCD_FSMC_Config(void)有点看不明白,求助啊

[复制链接]
402|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
菊江先生|  楼主 | 2018-6-7 11:24 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
[table][tr][td]
<div align="left">
/**

  * @brief  LCD  FSMC ģʽÅäÖÃ

  * @param  ÎÞ

  * @retval ÎÞ

  */

void LCD_FSMC_Config(void)

{

    FSMC_NORSRAMInitTypeDef  FSMC_NORSRAMInitStructure;

    FSMC_NORSRAMTimingInitTypeDef  p;

   

   

    p.FSMC_AddressSetupTime = 0x02;         //µØÖ·½¨Á¢Ê±¼ä

    p.FSMC_AddressHoldTime = 0x00;         //µØÖ·±£³Öʱ¼ä

    p.FSMC_DataSetupTime = 0x05;                 //Êý¾Ý½¨Á¢Ê±¼ä

    p.FSMC_BusTurnAroundDuration = 0x00;

    p.FSMC_CLKDivision = 0x00;

    p.FSMC_DataLatency = 0x00;

    p.FSMC_AccessMode = FSMC_AccessMode_B;         // Ò»°ãʹÓÃģʽBÀ´¿ØÖÆLCD


   

    FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2;

    FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable;

                FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_NOR;

    FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b;

    FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable;

    FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;

    FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;

    FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState;

    FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable;

    FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;

    FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable;

    FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;

    FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p;

    FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p;  

   

    FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);

   

    /* ʹÄÜ FSMC Bank1_SRAM Bank */

    FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM2, ENABLE);  

}

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

446

主题

447

帖子

0

粉丝