亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? stm32l1xx_lcd.c

?? VS1003_MP3_SPI_SDHC_FAT32
?? C
?? 第 1 頁 / 共 2 頁
字號:
/**
  ******************************************************************************
  * @file    stm32l1xx_lcd.c
  * @author  MCD Application Team
  * @version V1.1.0
  * @date    24-January-2012
  * @brief   This file provides firmware functions to manage the following 
  *          functionalities of the LCD controller (LCD) peripheral:
  *           + Initialization and configuration
  *           + LCD RAM memory write
  *           + Interrupts and flags management
  *           
  *  @verbatim
  
 ===============================================================================
                            ##### LCD Clock #####
 ===============================================================================
    [..] LCDCLK is the same as RTCCLK. 
    [..] To configure the RTCCLK/LCDCLK, proceed as follows:
         (+) Enable the Power Controller (PWR) APB1 interface clock using the
             RCC_APB1PeriphClockCmd() function.
         (+) Enable access to RTC domain using the PWR_RTCAccessCmd() function.
         (+) Select the RTC clock source using the RCC_RTCCLKConfig() function.
  
    [..] The frequency generator allows you to achieve various LCD frame rates
         starting from an LCD input clock frequency (LCDCLK) which can vary 
         from 32 kHz up to 1 MHz.
  
                      ##### LCD and low power modes #####
 ===============================================================================
    [..] The LCD still active during STOP mode.
  
                      ##### How to use this driver #####
 ===============================================================================
    [..]
        (#) Enable LCD clock using 
            RCC_APB1PeriphClockCmd(RCC_APB1Periph_LCD, ENABLE) function.
        (#) Configure the LCD prescaler, divider, duty, bias and voltage source
            using LCD_Init() function.
        (#) Optionally you can enable/configure:
            (++) LCD High Drive using the LCD_HighDriveCmd() function.
            (++) LCD COM/SEG Mux using the LCD_MuxSegmentCmd() function.
            (++) LCD Pulse ON Duration using the LCD_PulseOnDurationConfig() function.
            (++) LCD Dead Time using the LCD_DeadTimeConfig() function  
            (++) The LCD Blink mode and frequency using the LCD_BlinkConfig() function.
            (++) The LCD Contrast using the LCD_ContrastConfig() function.
        (#) Call the LCD_WaitForSynchro() function to wait for LCD_FCR register
            synchronization.
        (#) Call the LCD_Cmd() to enable the LCD controller.
        (#) Wait until the LCD Controller status is enabled and the step-up
            converter is ready using the LCD_GetFlagStatus() and
            LCD_FLAG_ENS and LCD_FLAG_RDY flags.
        (#) Write to the LCD RAM memory using the LCD_Write() function.
        (#) Request an update display using the LCD_UpdateDisplayRequest()
            function.
        (#) Wait until the update display is finished by checking the UDD
            flag status using the LCD_GetFlagStatus(LCD_FLAG_UDD).
  
    @endverbatim
  
  ******************************************************************************
  * @attention
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * FOR MORE INFORMATION PLEASE READ CAREFULLY THE LICENSE AGREEMENT FILE
  * LOCATED IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.
  *
  * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
  ******************************************************************************
  */

/* Includes ------------------------------------------------------------------*/
#include "stm32l1xx_lcd.h"
#include "stm32l1xx_rcc.h"

/** @addtogroup STM32L1xx_StdPeriph_Driver
  * @{
  */

/** @defgroup LCD 
  * @brief LCD driver modules
  * @{
  */

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* ------------ LCD registers bit address in the alias region --------------- */
#define LCD_OFFSET                   (LCD_BASE - PERIPH_BASE)

/* --- CR Register ---*/

/* Alias word address of LCDEN bit */
#define CR_OFFSET                    (LCD_OFFSET + 0x00)
#define LCDEN_BitNumber              0x00
#define CR_LCDEN_BB                  (PERIPH_BB_BASE + (CR_OFFSET * 32) + (LCDEN_BitNumber * 4))

/* Alias word address of MUX_SEG bit */
#define MUX_SEG_BitNumber            0x07
#define CR_MUX_SEG_BB                (PERIPH_BB_BASE + (CR_OFFSET * 32) + (MUX_SEG_BitNumber * 4))


/* --- FCR Register ---*/

/* Alias word address of HD bit */
#define FCR_OFFSET                   (LCD_OFFSET + 0x04)
#define HD_BitNumber                 0x00
#define FCR_HD_BB                    (PERIPH_BB_BASE + (FCR_OFFSET * 32) + (HD_BitNumber * 4))

/* --- SR Register ---*/

/* Alias word address of UDR bit */
#define SR_OFFSET                    (LCD_OFFSET + 0x08)
#define UDR_BitNumber                0x02
#define SR_UDR_BB                    (PERIPH_BB_BASE + (SR_OFFSET * 32) + (UDR_BitNumber * 4))

#define FCR_MASK                     ((uint32_t)0xFC03FFFF)  /* LCD FCR Mask */
#define CR_MASK                      ((uint32_t)0xFFFFFF81)  /* LCD CR Mask */
#define PON_MASK                     ((uint32_t)0xFFFFFF8F)  /* LCD PON Mask */
#define DEAD_MASK                    ((uint32_t)0xFFFFFC7F)  /* LCD DEAD Mask */
#define BLINK_MASK                   ((uint32_t)0xFFFC1FFF)  /* LCD BLINK Mask */
#define CONTRAST_MASK                ((uint32_t)0xFFFFE3FF)  /* LCD CONTRAST Mask */

/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/

/** @defgroup LCD_Private_Functions
  * @{
  */

/** @defgroup LCD_Group1 Initialization and Configuration functions
 *  @brief   Initialization and Configuration functions 
 *
@verbatim
 ===============================================================================
            ##### Initialization and Configuration functions #####
 ===============================================================================

@endverbatim
  * @{
  */

/**
  * @brief  Deinitializes the LCD peripheral registers to their default reset
  *         values.
  * @param  None
  * @retval None
  */
void LCD_DeInit(void)
{
  /* Enable LCD reset state */
  RCC_APB1PeriphResetCmd(RCC_APB1Periph_LCD, ENABLE);
  /* Release LCD from reset state */
  RCC_APB1PeriphResetCmd(RCC_APB1Periph_LCD, DISABLE);
}

/**
  * @brief  Initializes the LCD peripheral according to the specified parameters
  *         in the LCD_InitStruct.
  * @note   This function can be used only when the LCD is disabled.
  * @param  LCD_InitStruct: pointer to a LCD_InitTypeDef structure that contains
  *         the configuration information for the specified LCD peripheral.
  * @retval None
  */
void LCD_Init(LCD_InitTypeDef* LCD_InitStruct)
{
  /* Check function parameters */
  assert_param(IS_LCD_PRESCALER(LCD_InitStruct->LCD_Prescaler));
  assert_param(IS_LCD_DIVIDER(LCD_InitStruct->LCD_Divider));
  assert_param(IS_LCD_DUTY(LCD_InitStruct->LCD_Duty));
  assert_param(IS_LCD_BIAS(LCD_InitStruct->LCD_Bias));
  assert_param(IS_LCD_VOLTAGE_SOURCE(LCD_InitStruct->LCD_VoltageSource));

  LCD->FCR &= (uint32_t)FCR_MASK;
  LCD->FCR |= (uint32_t)(LCD_InitStruct->LCD_Prescaler | LCD_InitStruct->LCD_Divider);

  LCD_WaitForSynchro();

  LCD->CR &= (uint32_t)CR_MASK;
  LCD->CR |= (uint32_t)(LCD_InitStruct->LCD_Duty | LCD_InitStruct->LCD_Bias | \
                        LCD_InitStruct->LCD_VoltageSource);

}

/**
  * @brief  Fills each LCD_InitStruct member with its default value.
  * @param  LCD_InitStruct: pointer to a LCD_InitTypeDef structure which will
  *         be initialized.
  * @retval None
  */
void LCD_StructInit(LCD_InitTypeDef* LCD_InitStruct)
{
/*--------------- Reset LCD init structure parameters values -----------------*/
  LCD_InitStruct->LCD_Prescaler = LCD_Prescaler_1; /*!< Initialize the LCD_Prescaler member */
  
  LCD_InitStruct->LCD_Divider = LCD_Divider_16; /*!< Initialize the LCD_Divider member */
  
  LCD_InitStruct->LCD_Duty = LCD_Duty_Static; /*!< Initialize the LCD_Duty member */
  
  LCD_InitStruct->LCD_Bias = LCD_Bias_1_4; /*!< Initialize the LCD_Bias member */
  
  LCD_InitStruct->LCD_VoltageSource = LCD_VoltageSource_Internal; /*!< Initialize the LCD_VoltageSource member */
}

/**
  * @brief  Enables or disables the LCD Controller.
  * @param  NewState: new state of the LCD peripheral.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void LCD_Cmd(FunctionalState NewState)
{
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  *(__IO uint32_t *) CR_LCDEN_BB = (uint32_t)NewState;
}

/**
  * @brief  Waits until the LCD FCR register is synchronized in the LCDCLK domain.
  *   This function must be called after any write operation to LCD_FCR register.
  * @param  None
  * @retval None
  */
void LCD_WaitForSynchro(void)
{
  /* Loop until FCRSF flag is set */
  while ((LCD->SR & LCD_FLAG_FCRSF) == (uint32_t)RESET)
  {
  }
}

/**
  * @brief  Enables or disables the low resistance divider. Displays with high
  *         internal resistance may need a longer drive time to achieve
  *         satisfactory contrast. This function is useful in this case if some
  *         additional power consumption can be tolerated.
  * @note   When this mode is enabled, the PulseOn Duration (PON) have to be 
  *         programmed to 1/CK_PS (LCD_PulseOnDuration_1).
  * @param  NewState: new state of the low resistance divider.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void LCD_HighDriveCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  *(__IO uint32_t *) FCR_HD_BB = (uint32_t)NewState;
}

/**
  * @brief  Enables or disables the Mux Segment.
  * @note   This function can be used only when the LCD is disabled.
  * @param  NewState: new state of the Mux Segment.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void LCD_MuxSegmentCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  *(__IO uint32_t *) CR_MUX_SEG_BB = (uint32_t)NewState;
}

/**
  * @brief  Configures the LCD pulses on duration.
  * @param  LCD_PulseOnDuration: specifies the LCD pulse on duration in terms of
  *         CK_PS (prescaled LCD clock period) pulses.
  *   This parameter can be one of the following values:
  *     @arg LCD_PulseOnDuration_0: 0 pulse
  *     @arg LCD_PulseOnDuration_1: Pulse ON duration = 1/CK_PS
  *     @arg LCD_PulseOnDuration_2: Pulse ON duration = 2/CK_PS
  *     @arg LCD_PulseOnDuration_3: Pulse ON duration = 3/CK_PS
  *     @arg LCD_PulseOnDuration_4: Pulse ON duration = 4/CK_PS
  *     @arg LCD_PulseOnDuration_5: Pulse ON duration = 5/CK_PS
  *     @arg LCD_PulseOnDuration_6: Pulse ON duration = 6/CK_PS
  *     @arg LCD_PulseOnDuration_7: Pulse ON duration = 7/CK_PS
  * @retval None
  */
void LCD_PulseOnDurationConfig(uint32_t LCD_PulseOnDuration)
{
  /* Check the parameters */
  assert_param(IS_LCD_PULSE_ON_DURATION(LCD_PulseOnDuration));

  LCD->FCR &= (uint32_t)PON_MASK;
  LCD->FCR |= (uint32_t)(LCD_PulseOnDuration);
}

/**
  * @brief  Configures the LCD dead time.
  * @param  LCD_DeadTime: specifies the LCD dead time.
  *   This parameter can be one of the following values:
  *     @arg LCD_DeadTime_0: No dead Time
  *     @arg LCD_DeadTime_1: One Phase between different couple of Frame
  *     @arg LCD_DeadTime_2: Two Phase between different couple of Frame
  *     @arg LCD_DeadTime_3: Three Phase between different couple of Frame
  *     @arg LCD_DeadTime_4: Four Phase between different couple of Frame
  *     @arg LCD_DeadTime_5: Five Phase between different couple of Frame
  *     @arg LCD_DeadTime_6: Six Phase between different couple of Frame 
  *     @arg LCD_DeadTime_7: Seven Phase between different couple of Frame
  * @retval None
  */
void LCD_DeadTimeConfig(uint32_t LCD_DeadTime)
{
  /* Check the parameters */
  assert_param(IS_LCD_DEAD_TIME(LCD_DeadTime));

  LCD->FCR &= (uint32_t)DEAD_MASK;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
最新中文字幕一区二区三区 | 免费成人av在线| 亚洲黄网站在线观看| 色综合色狠狠综合色| 粉嫩高潮美女一区二区三区| 久久99精品国产麻豆婷婷| 亚洲成av人片一区二区梦乃| 亚洲色图欧美在线| 欧美国产97人人爽人人喊| 国产亚洲人成网站| 国产精品久久久久久久久久免费看| 精品毛片乱码1区2区3区| 精品电影一区二区| 3d成人动漫网站| 欧美va亚洲va| 国产日产欧美一区二区三区| 精品国产免费人成在线观看| 久久久久国产精品厨房| 日韩精品一区国产麻豆| 久久午夜色播影院免费高清| 欧美国产欧美亚州国产日韩mv天天看完整 | 婷婷开心激情综合| 秋霞影院一区二区| 激情综合网av| 成人小视频免费在线观看| 大胆亚洲人体视频| 国产精品456| 国产麻豆精品视频| 成人白浆超碰人人人人| 色哟哟国产精品| 欧美一区二区视频观看视频| 久久久精品国产免大香伊| 国产精品久久久久久亚洲毛片 | 国产日产欧美一区二区三区| 亚洲日本在线视频观看| 日日夜夜免费精品视频| 韩国av一区二区三区| 94色蜜桃网一区二区三区| 欧美性感一区二区三区| 日韩欧美专区在线| 中文字幕成人av| 日韩国产精品久久久| 国产偷国产偷亚洲高清人白洁 | 国产99久久久国产精品潘金| 精品国产乱码久久久久久1区2区 | 91在线国产观看| 911精品国产一区二区在线| 久久九九久精品国产免费直播| 亚洲色图欧洲色图婷婷| 久久99精品久久久久久动态图| av午夜一区麻豆| 欧美老肥妇做.爰bbww| 欧美激情在线看| 日韩国产欧美在线视频| 色综合久久99| 日本一区二区三区免费乱视频| 亚洲丶国产丶欧美一区二区三区| 国产成人免费视频网站 | 亚洲欧美一区二区三区极速播放| 美女视频黄频大全不卡视频在线播放| 成人自拍视频在线| 日韩精品一区国产麻豆| 日精品一区二区| 91久久精品国产91性色tv| 欧美国产成人精品| 国产盗摄一区二区| 欧美zozo另类异族| 免费观看一级特黄欧美大片| 欧美亚洲一区三区| 日本一区二区三级电影在线观看 | 美脚の诱脚舐め脚责91| 99国产精品久| 国产精品欧美精品| 国产成人精品三级| 欧美va亚洲va在线观看蝴蝶网| 日韩精品福利网| 欧美精品 日韩| 一区二区三区日韩欧美| 色综合久久久久综合体桃花网| 亚洲欧洲三级电影| 色综合天天综合网国产成人综合天| 欧美色图激情小说| 亚洲国产成人va在线观看天堂| 97久久精品人人做人人爽50路| 成人欧美一区二区三区视频网页| 99国产精品久久久久| 国产欧美日韩三级| 91在线视频免费观看| 亚洲欧美二区三区| 欧美日韩一区视频| 午夜影院久久久| 337p亚洲精品色噜噜狠狠| 亚洲欧美日韩在线| 色婷婷国产精品久久包臀| 亚欧色一区w666天堂| 91精品麻豆日日躁夜夜躁| 国产精品福利一区二区三区| 久久69国产一区二区蜜臀| 9i在线看片成人免费| 国产精品欧美综合在线| 99精品视频一区二区| 欧美一区二区三区小说| 国产精品乱码一区二区三区软件| gogogo免费视频观看亚洲一| 久久精品免费在线观看| 成人av影视在线观看| 国产色产综合色产在线视频| 91成人国产精品| 中文字幕一区二区不卡| 欧美日韩中文国产| 香蕉乱码成人久久天堂爱免费| 欧美综合天天夜夜久久| 亚洲视频免费观看| 欧美一级夜夜爽| 精品综合免费视频观看| 亚洲免费大片在线观看| 欧美日韩一级黄| 国产高清亚洲一区| 中文字幕亚洲不卡| 精品sm捆绑视频| 懂色一区二区三区免费观看| 国产日韩欧美一区二区三区乱码| 成人免费一区二区三区视频| 91视频精品在这里| 日韩精品五月天| 亚洲黄色小视频| 欧美肥大bbwbbw高潮| 97久久超碰精品国产| 亚洲一区二区三区四区五区黄| 欧美性生活大片视频| 国产真实乱子伦精品视频| 亚洲日本乱码在线观看| 欧美人与禽zozo性伦| 经典三级视频一区| 亚洲第一在线综合网站| 精品国产网站在线观看| 99re这里都是精品| 欧美xxx久久| 色综合久久久久综合99| 免费成人在线网站| 一区二区三区中文字幕| 欧美一级在线视频| 91精品欧美综合在线观看最新| 欧美极品美女视频| 久久久91精品国产一区二区精品| 精彩视频一区二区| 亚洲v中文字幕| 欧美经典一区二区| www国产精品av| 欧洲亚洲国产日韩| 国产宾馆实践打屁股91| 亚洲高清免费一级二级三级| 2022国产精品视频| 日韩国产精品久久久| 日韩电影免费一区| 中文字幕中文在线不卡住| 91麻豆精品国产无毒不卡在线观看 | 99re8在线精品视频免费播放| 欧美激情一区二区三区在线| 日本一区免费视频| 中文字幕第一区综合| 久久久久9999亚洲精品| 91久久人澡人人添人人爽欧美| 成人激情文学综合网| 91在线porny国产在线看| 国产乱人伦偷精品视频不卡| 久久99热狠狠色一区二区| 亚洲国产欧美日韩另类综合| 丝袜美腿亚洲色图| 亚洲精品成人在线| 一区二区免费看| 国产精品麻豆欧美日韩ww| 亚洲男人的天堂在线aⅴ视频| 欧美国产精品一区二区| 亚洲男人天堂av网| 亚洲乱码日产精品bd| 久久精品国产久精国产爱| 亚洲国产cao| 看国产成人h片视频| 日产国产高清一区二区三区| 狠狠色狠狠色综合| 久久99久久久久| 91色九色蝌蚪| 日韩极品在线观看| 国产成人av电影免费在线观看| 天天综合天天综合色| 美女精品一区二区| 亚洲男女毛片无遮挡| 午夜私人影院久久久久| 国产精品伊人色| 成人av资源在线观看| 91精品国产色综合久久不卡电影| 欧美精选在线播放| 国产精品久久久久久久裸模| 亚洲国产精品麻豆| 亚洲成a人片在线观看中文| 国产高清精品久久久久| 国产91精品在线观看| 欧美色图一区二区三区| 91精品国产综合久久久蜜臀图片|