BLE_DCF_TYQ_CH592F/StdPeriphDriver/CH58x_lcd.c

34 lines
1.4 KiB
C
Raw Normal View History

2024-12-02 16:26:55 +08:00
/********************************** (C) COPYRIGHT *******************************
2025-02-21 14:38:41 +08:00
* File Name : CH58x_lcd.c
2024-12-02 16:26:55 +08:00
* Author : WCH
* Version : V1.0
* Date : 2018/12/15
2025-02-21 14:38:41 +08:00
* Description : source file(ch585/ch584)
2024-12-02 16:26:55 +08:00
*********************************************************************************
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
* Attention: This software (modified or not) and binary are used for
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
*******************************************************************************/
2025-02-21 14:38:41 +08:00
#include "CH58x_common.h"
#include "CH58x_lcd.h"
2024-12-02 16:26:55 +08:00
/*******************************************************************************
* Function Name : LCD_DefInit
* Description : LCD<EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Input : duty ռ<EFBFBD>ձ<EFBFBD>
* bias ƫѹ<EFBFBD><EFBFBD>
* Return : None
*******************************************************************************/
void LCD_Init(LCDDutyTypeDef duty, LCDBiasTypeDef bias)
{
2025-02-21 14:38:41 +08:00
R32_PIN_IN_DIS |= 0x0000238F; // <20>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
R32_PIN_IN_DIS |= RB_PBLx_IN_DIS; // <20>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
R16_PIN_CONFIG |= RB_PBHx_IN_DIS; // <20><><EFBFBD><EFBFBD>LCDʱ<44><CAB1><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>debug
R32_LCD_SEG_EN = 0x0FFFFFFF;
R8_LCD_CMD = RB_LCD_SYS_EN | RB_LCD_ON |
2024-12-02 16:26:55 +08:00
(LCD_CLK_128 << 5) |
(duty << 3) |
(bias << 2);
}