48 lines
1.2 KiB
C
48 lines
1.2 KiB
C
/*
|
|
* ht1621.h
|
|
*
|
|
* Created on: 2021年10月12日
|
|
* Author: wuwenfeng
|
|
*/
|
|
|
|
#ifndef HT1621_H_
|
|
#define HT1621_H_
|
|
|
|
#include "main.h"
|
|
|
|
|
|
|
|
|
|
//基本命令
|
|
#define OSC_OFF 0x00 // 关闭震荡器
|
|
#define OSC_ON 0x01 // 开启震荡器
|
|
#define DISP_OFF 0x02 // 关LCD Bias
|
|
#define DISP_ON 0x03 // 开LCD Bias
|
|
#define COM_1_3__4 0x29 // 1/3bias 4com
|
|
#define COM_1_3__3 0x25 // 1/3bias 3com
|
|
#define COM_1_3__2 0x21 // 1/3bias 2com
|
|
#define COM_1_2__4 0x28 // 1/2bias 4com
|
|
#define COM_1_2__3 0x24 // 1/2bias 3com
|
|
#define COM_1_2__2 0x20 // 1/2bias 2com
|
|
|
|
//扩展命令,该功能未引出关闭可降低功耗
|
|
#define TIMER_DIS 0x04 // 不使 time base 輸出
|
|
#define WDT_DIS 0x05 // 不使 WDT 暫停旗標輸出
|
|
#define BUZZ_OFF 0x08 // 关闭蜂鸣器
|
|
#define RC32K 0X18 //
|
|
#define IRQ_DIS 0X80 // 不使 IRQ 輸出
|
|
|
|
|
|
/* Exported functions ------------------------------------------------------- */
|
|
|
|
void WriteClockHT1621(void);
|
|
|
|
void WriteCommandHT1621(unsigned char FunctonCode);
|
|
void WritenDataHT1621(unsigned char Addr,unsigned char *Databuf,unsigned char Cnt);
|
|
|
|
|
|
void HT1621_Init(void);
|
|
|
|
|
|
#endif /* HT1621_H_ */
|