NULL
This commit is contained in:
318
user/Device/BLE.c
Executable file
318
user/Device/BLE.c
Executable file
@@ -0,0 +1,318 @@
|
||||
/****************************************************************************
|
||||
** BLE.c
|
||||
**
|
||||
** Copyright (c) Siargo Ltd. 2020
|
||||
** All Rights Reserved.
|
||||
**
|
||||
** BY DMY
|
||||
**
|
||||
** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨѶģ<D1B6><C4A3>
|
||||
**
|
||||
**
|
||||
** <20><>ʷ<EFBFBD>ļ<EFBFBD>
|
||||
** 2026-03-09 V1000
|
||||
*****************************************************************************/
|
||||
|
||||
/* Includes ----------------------------------------------------------------*/
|
||||
#include "../main/SystemInclude.h"
|
||||
/* -------------------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--------------------------------------*/
|
||||
extern DMA_HandleTypeDef DMA_Handle_UartRx , DMA_Handle_UartTx ;
|
||||
|
||||
static u8 BLE_resp = BLE_WAIT;
|
||||
|
||||
uint8_t Series[12]={0,1,2,3,4,5,6,7,8,9,10,11};
|
||||
uint8_t BLE_count;
|
||||
uint8_t BLE_flag;
|
||||
|
||||
u8 BLE_at_response_check(u8 *resp, u8 check_resp)
|
||||
{// <20>ȴ<EFBFBD><C8B4><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD>鷵<EFBFBD>ص<EFBFBD><D8B5><EFBFBD>Ϣ
|
||||
u8 count = 0;
|
||||
while(*resp != check_resp)
|
||||
{
|
||||
delay_ms(10);
|
||||
count++;
|
||||
if(count == 100) //<2F>ȴ<EFBFBD>1s<31><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼû<C8BB>и<EFBFBD><D0B8>£<EFBFBD><C2A3><EFBFBD><EFBFBD><EFBFBD>ʾģ<CABE><C4A3>û<EFBFBD>з<EFBFBD><D0B7>أ<EFBFBD><D8A3><EFBFBD><EFBFBD>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD>
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 BLE_at_cmd_write(char *pbuf)
|
||||
{
|
||||
BLE_resp = BLE_WAIT;
|
||||
BLE_SendData((u8*)pbuf, strlen(pbuf));
|
||||
return BLE_at_response_check(&BLE_resp, BLE_OK);
|
||||
}
|
||||
|
||||
u8 BLE_at_rec_process(char *inbuf, u8 data_len)// <20><><EFBFBD><EFBFBD>ģ<EFBFBD>鴫<EFBFBD><E9B4AB>MCU<43><55><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д
|
||||
{
|
||||
int i = 0;
|
||||
u8 resp;
|
||||
if (strstr(inbuf,"ERROR\r"))
|
||||
{
|
||||
resp = BLE_ERROR;
|
||||
} else if(strstr(inbuf,"OK\r")) {
|
||||
resp = BLE_OK;
|
||||
} else {
|
||||
resp = BLE_OTHER;
|
||||
}
|
||||
return resp;
|
||||
}
|
||||
|
||||
void BLE_lp_exit(void)
|
||||
{
|
||||
LHL_GPIO_WritePin(BLE_CTS_GPIO, BLE_CTS_PIN, GPIO_PIN_SET);
|
||||
delay_ms(1);
|
||||
LHL_GPIO_WritePin(BLE_CTS_GPIO, BLE_CTS_PIN, GPIO_PIN_RESET);
|
||||
delay_ms(1);
|
||||
}
|
||||
void BLE_lp_enter(void)
|
||||
{
|
||||
BLE_at_cmd_write("AT+SLEEP=0,1\r\n");
|
||||
|
||||
}
|
||||
void BLE_metering_packet_send(void)
|
||||
{
|
||||
char tx_buf[256];
|
||||
BLE_lp_exit();
|
||||
BLE_at_cmd_write(tx_buf);
|
||||
BLE_at_cmd_write("AT+ADS=1,0,1000\r\n");
|
||||
}
|
||||
void BLE_identification_packet_send(void)
|
||||
{
|
||||
char tx_buf[256];
|
||||
BLE_lp_exit();
|
||||
|
||||
BLE_at_cmd_write(tx_buf);
|
||||
BLE_at_cmd_write("AT+ADS=1,0,100\r\n");
|
||||
}
|
||||
void BLE_beacon_check(void)
|
||||
{
|
||||
BLE_count++;
|
||||
if(BLE_count == 236)
|
||||
BLE_flag = BLE_FLAG_ID;// <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD> ID <20><>
|
||||
else if(BLE_count == 240){
|
||||
BLE_count = 0;;// <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
BLE_flag = BLE_FLAG_METER;// <20><><EFBFBD>Ƿ<EFBFBD><C7B7>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD>
|
||||
}
|
||||
else
|
||||
;
|
||||
}
|
||||
void BLE_beacon_done(void)
|
||||
{
|
||||
if(BLE_flag == BLE_FLAG_METER){
|
||||
BLE_metering_packet_send();
|
||||
BLE_flag = 0;
|
||||
}
|
||||
else if(BLE_flag == BLE_FLAG_ID){
|
||||
BLE_identification_packet_send();
|
||||
BLE_flag = 0;
|
||||
}
|
||||
else
|
||||
;
|
||||
}
|
||||
/**
|
||||
* @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ձ<EFBFBD>־
|
||||
*/
|
||||
static inline void ClearRxFlag(void)
|
||||
{
|
||||
comState.state.ReceivedData = 0;
|
||||
}
|
||||
|
||||
/******<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*************************************************************************************************************/
|
||||
void BLE_init(void)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
// CTS <20><><EFBFBD><EFBFBD>ģʽ (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>)
|
||||
GPIO_InitStruct.Pin = BLE_CTS_PIN;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Current = GPIO_CURRENT_2mA;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.SchmittTrigger = ENABLE;
|
||||
GPIO_InitStruct.Alternate = GPIOx_AF_GPIO; // // AFΪ<46><CEAA>ͨIO
|
||||
LHL_GPIO_Init(BLE_CTS_GPIO, &GPIO_InitStruct);
|
||||
|
||||
// RST
|
||||
GPIO_InitStruct.Pin = BLE_RST_PIN;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Current = GPIO_CURRENT_2mA;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.SchmittTrigger = ENABLE;
|
||||
GPIO_InitStruct.Alternate = GPIOx_AF_GPIO; // // AFΪ<46><CEAA>ͨIO
|
||||
LHL_GPIO_Init(BLE_RST_GPIO, &GPIO_InitStruct);
|
||||
|
||||
//3. Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>߸<EFBFBD>λ<EFBFBD><CEBB>
|
||||
LHL_GPIO_WritePin(BLE_CTS_GPIO, BLE_CTS_PIN, GPIO_PIN_RESET);
|
||||
LHL_GPIO_WritePin(BLE_RST_GPIO, BLE_RST_PIN, GPIO_PIN_SET);
|
||||
delay_ms(1000);
|
||||
|
||||
char tx_buf[256];
|
||||
BLE_at_cmd_write("+++"); // <20><><EFBFBD><EFBFBD> AT ָ<><D6B8>ģʽ
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>SIARGO + <20><><EFBFBD>к<EFBFBD> (Hex<65><78>ʽ)
|
||||
sprintf(tx_buf, "AT+NAME=1,53494152%x%x%x%x%x%x%x%x%x%x\r\n", Series[1], Series[2], Series[3],
|
||||
Series[4], Series[5], Series[6], Series[7], Series[8], Series[9], Series[10] );
|
||||
BLE_at_cmd_write(tx_buf);
|
||||
// <20><><EFBFBD><EFBFBD> AT+EXIT <20>˳<EFBFBD> AT ģʽ<C4A3><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>ģʽ
|
||||
// <20>˺<EFBFBD><CBBA><EFBFBD>ģ<EFBFBD>齫<EFBFBD><E9BDAB><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD> AT ָ<><EFBFBD><EEA3AC><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽ<EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><CDB8><EFBFBD><EFBFBD> MCU
|
||||
BLE_at_cmd_write("AT+EXIT\r\n");
|
||||
|
||||
}
|
||||
void BLE_HardwareReset(void)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD>λ
|
||||
LHL_GPIO_WritePin(BLE_RST_GPIO, BLE_RST_PIN, GPIO_PIN_RESET);
|
||||
delay_ms(BLE_RESET_HOLD_TIME);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
|
||||
LHL_GPIO_WritePin(BLE_RST_GPIO, BLE_RST_PIN, GPIO_PIN_SET);
|
||||
delay_ms(BLE_RESET_WAIT_TIME);
|
||||
}
|
||||
|
||||
void BLE_SendData(uint8_t *pData, uint16_t len)
|
||||
{
|
||||
if (pData == NULL || len == 0) return;
|
||||
// ֹ֮ͣǰ<D6AE><C7B0><EFBFBD><EFBFBD>
|
||||
// LHL_DMA_Stop(&DMA_Handle_UartTx);
|
||||
// // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// memcpy(comState.TxdData, pData, len);
|
||||
MBBuf.TxdLen = len;
|
||||
MBBuf.TxPointer =pData ;
|
||||
StartDMAForTxdMainUartData();
|
||||
}
|
||||
|
||||
|
||||
void BLEModBusReturnDevice(void)
|
||||
{
|
||||
MBBuf.RxPointer[0] = 0x01; // <20>ӻ<EFBFBD><D3BB><EFBFBD>ַ
|
||||
MBBuf.RxPointer[1] = 0x2B; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28>Զ<EFBFBD><D4B6><EFBFBD>)
|
||||
MBBuf.RxPointer[2] = 0x0E; // <20><><EFBFBD><EFBFBD>
|
||||
MBBuf.RxPointer[3] = 0x01;
|
||||
MBBuf.RxPointer[4] = 0x01;
|
||||
MBBuf.RxPointer[5] = 0xFF;
|
||||
MBBuf.RxPointer[6] = 0x05;
|
||||
MBBuf.RxPointer[7] = 0x03;
|
||||
MBBuf.RxPointer[8] = 0x00;
|
||||
MBBuf.RxPointer[9] = 0x0D;
|
||||
// Ӳ<><D3B2><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD> "SIARGO-MF5700"
|
||||
MBBuf.RxPointer[10] = 0x53;//S
|
||||
MBBuf.RxPointer[11] = 0x49; //I
|
||||
MBBuf.RxPointer[12] = 0x41;//A
|
||||
MBBuf.RxPointer[13] = 0x52;//R
|
||||
MBBuf.RxPointer[14] = 0x47;//G
|
||||
MBBuf.RxPointer[15] = 0x4F;//O
|
||||
MBBuf.RxPointer[16] = 0x2D;//-
|
||||
MBBuf.RxPointer[10] = 0x56; // V
|
||||
MBBuf.RxPointer[11] = 0x4D; // M
|
||||
MBBuf.RxPointer[12] = 0x31; // 1
|
||||
MBBuf.RxPointer[13] = 0x30; // 0
|
||||
MBBuf.RxPointer[14] = 0x30; // 0
|
||||
MBBuf.RxPointer[15] = 0x30; // 0
|
||||
MBBuf.RxPointer[23] = 0x02;//XULEIHAO (<28><><EFBFBD>ͺ<EFBFBD>?)
|
||||
MBBuf.RxPointer[24] = 0x0C; // <20><><EFBFBD>кų<D0BA><C5B3><EFBFBD>
|
||||
MBBuf.RxPointer[25] = Series[0]; // <20><><EFBFBD><EFBFBD>10λ<30><CEBB><EFBFBD>к<EFBFBD>
|
||||
MBBuf.RxPointer[26] = Series[1];
|
||||
MBBuf.RxPointer[27] = Series[2];
|
||||
MBBuf.RxPointer[28] = Series[3];
|
||||
MBBuf.RxPointer[29] = Series[4];
|
||||
MBBuf.RxPointer[30] = Series[5];
|
||||
MBBuf.RxPointer[31] = Series[6];
|
||||
MBBuf.RxPointer[32] = Series[7];
|
||||
MBBuf.RxPointer[33] = Series[8];
|
||||
MBBuf.RxPointer[34] = Series[9];
|
||||
MBBuf.RxPointer[35] = Series[10];
|
||||
MBBuf.RxPointer[36] = Series[11];
|
||||
MBBuf.RxPointer[37] = 0x02;
|
||||
MBBuf.RxPointer[38] = 0x04;
|
||||
// MBBuf.RxPointer[39] = MAJ_VERSION; // <20>̼<EFBFBD><CCBC>汾
|
||||
// MBBuf.RxPointer[40] = SUB_VERSION;
|
||||
// MBBuf.RxPointer[41] = REV_VERSION;
|
||||
// MBBuf.RxPointer[42] = BUD_VERSION;
|
||||
MBBuf.RxPointer[39] = 0x0a; // <20>̼<EFBFBD><CCBC>汾
|
||||
MBBuf.RxPointer[40] = 0x0b;
|
||||
MBBuf.RxPointer[41] = 0x0c;
|
||||
MBBuf.RxPointer[42] = 0x0d;
|
||||
MBBuf.RxPointer[43] = 0x03;
|
||||
MBBuf.RxPointer[44] = 0x01;
|
||||
MBBuf.RxPointer[45] = 0x00;
|
||||
MBBuf.RxPointer[46] = 0x04;
|
||||
MBBuf.RxPointer[47] = 0x01;
|
||||
MBBuf.RxPointer[48] = 0x00;
|
||||
|
||||
MBBuf.TxdLen =49;
|
||||
}
|
||||
|
||||
void BLEModBusReturnData(void)
|
||||
{
|
||||
|
||||
u8 tx_Length;
|
||||
|
||||
tx_Length = 0;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x01;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x42;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x0c;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x3A;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x3C;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x3E;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x37;
|
||||
//MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
// MBBuf.RxPointer[tx_Length++] = 0x48;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x50;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x51;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x90;
|
||||
|
||||
MBBuf.RxPointer[2] = tx_Length - 3;
|
||||
MBBuf.TxdLen=tx_Length;
|
||||
|
||||
}
|
||||
|
||||
void BLEModBusReturnparameter(void)
|
||||
{
|
||||
u8 tx_Length;
|
||||
|
||||
tx_Length = 0;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x01;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x43;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x12;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x83;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x85;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x8B;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x96;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x98;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x9A;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x9C;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0xF2;
|
||||
MBBuf.RxPointer[tx_Length++] = 0x00;
|
||||
MBBuf.RxPointer[tx_Length++] = 0xF0;
|
||||
MBBuf.RxPointer[2] = tx_Length - 3;
|
||||
MBBuf.TxdLen=tx_Length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @note <20>˺<EFBFBD><CBBA><EFBFBD>ֻ<EFBFBD><D6BB>Ӳ<EFBFBD><D3B2><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ʼ<EFBFBD><CABC>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
void BLE_Application_Init(void)
|
||||
{
|
||||
/* ==================== <20><> 1 <20><><EFBFBD><EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC> ==================== */
|
||||
// 1.1 <20><><EFBFBD>õײ<C3B5><D7B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC> GPIO (CTS/RTS/RST)
|
||||
BLE_init();
|
||||
//Ӳ<><D3B2><EFBFBD><EFBFBD>λ
|
||||
// LHL_GPIO_WritePin(BLE_RST_GPIO, BLE_RST_PIN, GPIO_PIN_RESET);
|
||||
}
|
||||
|
||||
|
||||
43
user/Device/BLE.h
Executable file
43
user/Device/BLE.h
Executable file
@@ -0,0 +1,43 @@
|
||||
#ifndef __BLE_H
|
||||
#define __BLE_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stdlib.h"
|
||||
#include "stdint.h"
|
||||
#include <stdbool.h>
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ------------------------------------------------------------------*/
|
||||
#define u8 uint8_t
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> --------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/* ------------------- ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -------------------*/
|
||||
#define BLE_RESET_HOLD_TIME 100U
|
||||
#define BLE_RESET_WAIT_TIME 700U // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>500ms
|
||||
#define BLE_CMD_TIMEOUT 200U // ָ<>ʱʱ<CAB1><CAB1>
|
||||
#define BLE_MIN_GAP 20U // <20><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>ָ<EFBFBD><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD>ʱ<EFBFBD>䣬<EFBFBD><E4A3AC>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
||||
#define BLE_HEARTBEAT_TIME 1000U
|
||||
|
||||
#define BLE_OK 0
|
||||
#define BLE_ERROR 1
|
||||
#define BLE_OTHER 2
|
||||
#define BLE_WAIT 3
|
||||
|
||||
|
||||
#define BLE_FLAG_ID 0
|
||||
#define BLE_FLAG_METER 1
|
||||
/* ------------------- <20><><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD> -------------------*/
|
||||
|
||||
|
||||
/* ------------------- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -------------------*/
|
||||
void BLE_Init(void);
|
||||
void BLE_HardwareReset(void);
|
||||
bool BLE_IsCTS_Low(void);
|
||||
static const void* mem_search(const void *haystack, size_t hay_len, const void *needle, size_t needle_len);
|
||||
static bool CheckResponseKeyword(const char *keyword);
|
||||
void BLE_SendData(uint8_t *pData, uint16_t len);
|
||||
void BLE_Application_Init(void);
|
||||
void BLE_Application_Poll(void);
|
||||
void BLEModBusReturnDevice(void);
|
||||
void BLEModBusReturnData(void);
|
||||
void BLEModBusReturnparameter(void);
|
||||
#endif
|
||||
238
user/Device/CAT24C512.c
Executable file
238
user/Device/CAT24C512.c
Executable file
@@ -0,0 +1,238 @@
|
||||
#include "../main/SystemInclude.h"
|
||||
//==============================================================================
|
||||
|
||||
u32 isReadParameterOK;
|
||||
/******************************************************************************/
|
||||
void EEPROMInit(void)
|
||||
{
|
||||
EEPROM_WP_OUTPUT();
|
||||
DisableWriteEEPROM();
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void WaitWriteOver(u8 eepromAdr)
|
||||
{
|
||||
u32 I;
|
||||
u32 staus;
|
||||
|
||||
for(I=0; I<8; I++)
|
||||
{
|
||||
delay_ms(1);
|
||||
SI2C_Start();
|
||||
staus = SI2C_Write(0xa0 | eepromAdr);
|
||||
SI2C_Stop();
|
||||
if(staus == 0) return;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void WriteByteToEEPROM(u16 address, u8 wrtData, u8 eepromAdr)
|
||||
{
|
||||
EnableWriteEEPROM();
|
||||
|
||||
SI2C_Start();
|
||||
SI2C_Write(0xa0 | eepromAdr);
|
||||
SI2C_Write(address>>8);
|
||||
SI2C_Write(address);
|
||||
|
||||
SI2C_Write(wrtData);
|
||||
SI2C_Stop();
|
||||
|
||||
WaitWriteOver(eepromAdr);
|
||||
|
||||
DisableWriteEEPROM();
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
u8 ReadByteFromEEPROM(u16 address, u8 eepromAdr)
|
||||
{
|
||||
u8 data;
|
||||
|
||||
//SI2C_Mem_Read(0xa0 | eepromAdr, address, SI2C_MEMADD_SIZE_16BIT, &data, 1);
|
||||
|
||||
SI2C_Start();
|
||||
SI2C_Write(0xa0 | eepromAdr);
|
||||
SI2C_Write(address>>8);
|
||||
SI2C_Write(address);
|
||||
|
||||
SI2C_Start();
|
||||
SI2C_Write(0xa1 | eepromAdr);
|
||||
data = SI2C_Read();
|
||||
SI2C_Stop();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void ResetWriteAddr(u16 address, u8 eepromAdr)
|
||||
{
|
||||
SI2C_Stop();
|
||||
WaitWriteOver(eepromAdr);
|
||||
|
||||
SI2C_Start();
|
||||
SI2C_Write(0xa0 | eepromAdr);
|
||||
SI2C_Write(address>>8);
|
||||
SI2C_Write((u8)address);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void WriteMultiByteToEEPROM(u16 address, u8 *wrtData, u16 dataLenth, u8 eepromAdr)
|
||||
{
|
||||
u16 temp, I;
|
||||
|
||||
EnableWriteEEPROM();
|
||||
|
||||
SI2C_Start();
|
||||
SI2C_Write(0xa0 | eepromAdr);
|
||||
SI2C_Write(address>>8);
|
||||
SI2C_Write((u8)address);
|
||||
for(I=0; I<dataLenth; I++)
|
||||
{
|
||||
SI2C_Write(*wrtData);
|
||||
wrtData++;
|
||||
address++;
|
||||
temp = address;
|
||||
temp &= 0x00ff;
|
||||
if(temp == 0x0000) ResetWriteAddr(address, eepromAdr);
|
||||
else if(temp == 0x0040) ResetWriteAddr(address, eepromAdr);
|
||||
else if(temp == 0x0080) ResetWriteAddr(address, eepromAdr);
|
||||
else if(temp == 0x00C0) ResetWriteAddr(address, eepromAdr);
|
||||
}
|
||||
|
||||
SI2C_Stop();
|
||||
WaitWriteOver(eepromAdr);
|
||||
|
||||
DisableWriteEEPROM();
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void ReadMultiByteFromEEPROM(u16 address, u8 *wrtData, u16 dataLenth, u8 eepromAdr)
|
||||
{
|
||||
//SI2C_Mem_Read(0xa0 | eepromAdr, address, SI2C_MEMADD_SIZE_16BIT, wrtData, dataLenth);
|
||||
|
||||
u16 I;
|
||||
|
||||
//EnableWriteEEPROM();
|
||||
|
||||
SI2C_Start();
|
||||
SI2C_Write(0xa0 | eepromAdr);
|
||||
SI2C_Write(address>>8);
|
||||
SI2C_Write((u8)address);
|
||||
|
||||
SI2C_Start();
|
||||
SI2C_Write(0xa1 | eepromAdr);
|
||||
*wrtData = SI2C_Read();
|
||||
for(I=1; I<dataLenth; I++)
|
||||
{
|
||||
SI2C_Ack();
|
||||
wrtData++;
|
||||
*wrtData = SI2C_Read();
|
||||
}
|
||||
SI2C_Stop();
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void ClearMultiByteToEEPROM(u16 address, u8 dataLenth, u8 eepromAdr)
|
||||
{
|
||||
// u8 I;
|
||||
// u16 temp;
|
||||
//
|
||||
EnableWriteEEPROM();
|
||||
//
|
||||
// SI2C_Start();
|
||||
// SI2C_Write(0xa0 | eepromAdr);
|
||||
// SI2C_Write(address>>8);
|
||||
// SI2C_Write((u8)address);
|
||||
// for(I=0; I<dataLenth; I++)
|
||||
// {
|
||||
// SI2C_Write(0xff);
|
||||
// address++;
|
||||
// temp = address;
|
||||
// temp &= 0x00ff;
|
||||
// if(temp == 0x0000) ResetWriteAddr(address, eepromAdr);
|
||||
// else if(temp == 0x0040) ResetWriteAddr(address, eepromAdr);
|
||||
// else if(temp == 0x0080) ResetWriteAddr(address, eepromAdr);
|
||||
// else if(temp == 0x00C0) ResetWriteAddr(address, eepromAdr);
|
||||
// }
|
||||
//
|
||||
// SI2C_Stop();
|
||||
// WaitWriteOver(eepromAdr);
|
||||
DisableWriteEEPROM();
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
u16 ReadShortParameterFromEEPROM(u16 parameterAdr, u16 parameterDefault)
|
||||
{
|
||||
// for meter factor
|
||||
tempL.Word[0] = 0;
|
||||
ReadMultiByteFromEEPROM(parameterAdr, tempL.Byte, 3, PARA_EEPROM);
|
||||
|
||||
if(tempL.Byte[2] != CRC8(tempL.Byte, 2))
|
||||
{
|
||||
tempL.Word[0] = (u32)parameterDefault;
|
||||
isReadParameterOK = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempL.Byte[2] = 0;
|
||||
isReadParameterOK = 1;
|
||||
}
|
||||
|
||||
return tempL.Word[0];
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
u32 ReadLongParameterFromEEPROM(u16 parameterAdr, u32 parameterDefault)
|
||||
{
|
||||
// for meter factor
|
||||
tempDev.DWord[0] = 0;
|
||||
ReadMultiByteFromEEPROM(parameterAdr, tempDev.Byte, 5, PARA_EEPROM);
|
||||
|
||||
if(tempDev.Byte[4] != CRC8(tempDev.Byte, 4))
|
||||
{
|
||||
tempDev.DWord[0] = (u32)parameterDefault;
|
||||
isReadParameterOK = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
isReadParameterOK = 1;
|
||||
}
|
||||
|
||||
return tempDev.DWord[0];
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
u16 WriteShortParameterToEEPROM(u16 WRAddr)
|
||||
{
|
||||
tempL.Byte[2] = CRC8(tempL.Byte, 2);
|
||||
WriteMultiByteToEEPROM(WRAddr, tempL.Byte, 3, PARA_EEPROM);
|
||||
ReadMultiByteFromEEPROM(WRAddr, tempL.Byte, 3, PARA_EEPROM);
|
||||
|
||||
tempL.Byte[2] = 0;
|
||||
return tempL.Word[0];
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
//u32 WriteLongParameterToEEPROM(u16 WRAddr, u16 WRLen)
|
||||
//{
|
||||
// u16 I;
|
||||
|
||||
// I = WRLen - 1;
|
||||
// tempDev.Byte[I] = CRC8(tempDev.Byte, I);
|
||||
// WriteMultiByteToEEPROM(WRAddr, tempDev.Byte, WRLen, PARA_EEPROM);
|
||||
// tempDev.DWord[0] = 0;
|
||||
// ReadMultiByteFromEEPROM(WRAddr, tempDev.Byte, WRLen, PARA_EEPROM);
|
||||
// tempDev.Byte[I] = 0;
|
||||
// return tempDev.DWord[0];
|
||||
//}
|
||||
|
||||
u32 WriteLongParameterToEEPROM(u16 WRAddr)
|
||||
{
|
||||
tempDev.Byte[4] = CRC8(tempDev.Byte, 4);
|
||||
WriteMultiByteToEEPROM(WRAddr, tempDev.Byte, 5, PARA_EEPROM);
|
||||
tempDev.DWord[0] = 0;
|
||||
ReadMultiByteFromEEPROM(WRAddr, tempDev.Byte, 5, PARA_EEPROM);
|
||||
tempDev.Byte[4] = 0;
|
||||
return tempDev.DWord[0];
|
||||
}
|
||||
50
user/Device/CAT24c512.h
Executable file
50
user/Device/CAT24c512.h
Executable file
@@ -0,0 +1,50 @@
|
||||
#ifndef __CAT24C512_H_
|
||||
#define __CAT24C512_H_
|
||||
#include "../MCU/lhl_gpio.h"
|
||||
#ifndef EEPROM_SIZE
|
||||
#define EEPROM_SIZE 65536
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MAX1 = 0x00,
|
||||
MAX2,
|
||||
MAX3
|
||||
}GPIO1_TypeDef;
|
||||
|
||||
#define WAIT_WRITE_OVER 5
|
||||
#define I2C_TIME_OUT 10
|
||||
|
||||
/******************************************************************************/
|
||||
#define EEPROM_WP_OUTPUT() EnableOutput(EEPROM_WP_GPIO, EEPROM_WP_PINPOS)
|
||||
#define SET_EEPROM_WP() SET_PIN(EEPROM_WP_GPIO, EEPROM_WP_PIN)
|
||||
#define CLR_EEPROM_WP() CLR_PIN(EEPROM_WP_GPIO, EEPROM_WP_PIN)
|
||||
#define DisableWriteEEPROM() SET_EEPROM_WP()
|
||||
#define EnableWriteEEPROM() CLR_EEPROM_WP()
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
extern u32 isReadParameterOK;
|
||||
//******************************************************************************
|
||||
void EEPROMInit(void);
|
||||
void WaitWriteOver(u8 eepromAdr);
|
||||
void WriteByteToEEPROM(u16 address, u8 wrtData, u8 eepromAdr);
|
||||
u8 ReadByteFromEEPROM(u16 address, u8 eepromAdr);
|
||||
void ResetWriteAddr(u16 address, u8 eepromAdr);
|
||||
void WriteMultiByteToEEPROM(u16 address, u8 *wrtData, u16 dataLenth, u8 eepromAdr);
|
||||
void ReadMultiByteFromEEPROM(u16 address, u8 *wrtData, u16 dataLenth, u8 eepromAdr);
|
||||
void ClearMultiByteToEEPROM(u16 address, u8 dataLenth, u8 eepromAdr);
|
||||
|
||||
|
||||
u16 ReadShortParameterFromEEPROM(u16 parameterAdr, u16 parameterDefault);
|
||||
u32 ReadLongParameterFromEEPROM(u16 parameterAdr, u32 parameterDefault);
|
||||
u16 WriteShortParameterToEEPROM(u16 WRAddr);
|
||||
u32 WriteLongParameterToEEPROM(u16 WRAddr);
|
||||
|
||||
|
||||
#if(!REC_ACC_USE_FRAM)
|
||||
//void WriteMultiByteToFRAM(u16 address, u8 *wrtData, u8 dataLenth);
|
||||
//void ReadMultiByteFromFRAM(u16 address, u8 *wrtData, u8 dataLenth);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
41
user/Device/CAT5171.c
Executable file
41
user/Device/CAT5171.c
Executable file
@@ -0,0 +1,41 @@
|
||||
#include "../main/SystemInclude.h"
|
||||
|
||||
//##############################################################################
|
||||
#if(ENABLE_USE_CAT5171)
|
||||
//##############################################################################
|
||||
//==============================================================================
|
||||
void DigitalPotOutput(u16 PotCHN, u16 PotData) //
|
||||
{
|
||||
SI2C_Start();
|
||||
SI2C_Write(WR | CAT5171_ADDR | PotCHN );
|
||||
SI2C_Write(0);
|
||||
SI2C_Write(PotData);
|
||||
SI2C_Stop();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
u8 ReadDigitalPotWiper(u16 PotCHN)
|
||||
{
|
||||
u8 PotData;
|
||||
|
||||
SI2C_Start();
|
||||
SI2C_Write(RD | CAT5171_ADDR | PotCHN);
|
||||
PotData = SI2C_Read();
|
||||
SI2C_Stop();
|
||||
|
||||
return PotData;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void DigitalPotLowPower(u16 PotCHN)
|
||||
{
|
||||
// u8 Pot[2];
|
||||
//
|
||||
// Pot[0] = SHOT_DOWN;
|
||||
// Pot[1] = 0;
|
||||
// I2C_Master_Transmit(CAT5171_ADDR | PotCHN, &Pot[0], I2C_MEMADD_SIZE_16BIT);
|
||||
}
|
||||
|
||||
//##############################################################################
|
||||
#endif
|
||||
//##############################################################################
|
||||
28
user/Device/CAT5171.h
Executable file
28
user/Device/CAT5171.h
Executable file
@@ -0,0 +1,28 @@
|
||||
//##############################################################################
|
||||
#if(ENABLE_USE_CAT5171)
|
||||
//##############################################################################
|
||||
|
||||
#ifndef __CAT5171_H__
|
||||
#define __CAT5171_H__
|
||||
|
||||
#define CAT5171_ADDR 0x58
|
||||
|
||||
#define POT_MAX 255
|
||||
#define POT_MID 128
|
||||
|
||||
//#define CTYPE_POT 0
|
||||
//#define ATYPE_POT BIT1
|
||||
|
||||
//#define RS BIT6
|
||||
//#define SHOT_DOWN BIT5
|
||||
|
||||
|
||||
void DigitalPotOutput(u16 PotCHN, u16 PotData);
|
||||
u8 ReadDigitalPotWiper(u16 PotCHN);
|
||||
void DigitalPotLowPower(u16 PotCHN);
|
||||
#endif
|
||||
|
||||
//##############################################################################
|
||||
#endif
|
||||
//##############################################################################
|
||||
|
||||
68
user/Device/HAFBLF0750C4AX5.c
Executable file
68
user/Device/HAFBLF0750C4AX5.c
Executable file
@@ -0,0 +1,68 @@
|
||||
#include "../main/SystemInclude.h"
|
||||
|
||||
// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
u16 AirflowSensor_Read(void)
|
||||
{
|
||||
u8 raw_data[2] = {0};
|
||||
|
||||
SI2C_Start();
|
||||
|
||||
// <20><><EFBFBD>Ͷ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EEA3A8>ַ + <20><>ģʽ<C4A3><CABD>
|
||||
SI2C_Write((HAF_ADR << 1) | 0x01);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ2<C8A1>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD>ݸ<EFBFBD>ʽ<EFBFBD><CABD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8λ, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8λ]
|
||||
raw_data[0] = SI2C_Read();
|
||||
SI2C_Ack(); // <20><><EFBFBD><EFBFBD>ACK<43><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ
|
||||
raw_data[1] = SI2C_Read();
|
||||
SI2C_NoAck();// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֽڷ<D6BD><DAB7><EFBFBD>NACK
|
||||
SI2C_Stop();
|
||||
|
||||
// <20>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>16λ<36><CEBB>
|
||||
u16 flow_raw =((raw_data[0] << 8) | raw_data[1]) ;
|
||||
|
||||
return flow_raw ;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ȡƽ<C8A1><C6BD>ֵ
|
||||
u16 AirflowSensor_ReadAverage(u8 count)
|
||||
{
|
||||
u8 valid_count = 0;
|
||||
u32 total_flow = 0;
|
||||
if (count <= 0) return 0;
|
||||
for (uint8_t i = 0; i < count; i++)
|
||||
{
|
||||
total_flow += AirflowSensor_Read();
|
||||
valid_count++;
|
||||
delay_ms(10);
|
||||
}
|
||||
if (valid_count > 0) {
|
||||
total_flow= total_flow / valid_count;
|
||||
}
|
||||
return total_flow;
|
||||
}
|
||||
// ת<><D7AA><EFBFBD><EFBFBD>SCCM
|
||||
#define MaximumFlow 750 //SCCM
|
||||
float Get_AirflowSensor_SCCM(void)
|
||||
{
|
||||
u16 total_flow = 0;
|
||||
float slpm_flow;
|
||||
total_flow = AirflowSensor_ReadAverage(10);//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>10<31>ε<EFBFBD>ƽ<EFBFBD><C6BD>ֵ
|
||||
|
||||
if(total_flow > 8192)slpm_flow = (total_flow-8192)*MaximumFlow;
|
||||
else slpm_flow = (total_flow+8192)*MaximumFlow;
|
||||
|
||||
slpm_flow = slpm_flow/ 8192;
|
||||
return slpm_flow;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
13
user/Device/HAFBLF0750C4AX5.h
Executable file
13
user/Device/HAFBLF0750C4AX5.h
Executable file
@@ -0,0 +1,13 @@
|
||||
#ifndef __HAFBLF0750C4AX5_H__
|
||||
#define __HAFBLF0750C4AX5_H__
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>I2C<32><43>ַ
|
||||
#define HAF_ADR 0x49
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
u8 AirflowSensor_Init(void);
|
||||
u16 AirflowSensor_Read(void);
|
||||
u16 AirflowSensor_ReadAverage( u8 count);
|
||||
float Get_AirflowSensor_SCCM(void);
|
||||
#endif
|
||||
|
||||
|
||||
158
user/Device/MB85RS16.c
Executable file
158
user/Device/MB85RS16.c
Executable file
@@ -0,0 +1,158 @@
|
||||
#include "../main/SystemInclude.h"
|
||||
|
||||
/* File start *****************************************************************/
|
||||
#if ENABLE_USE_MB85RS16
|
||||
/******************************************************************************/
|
||||
|
||||
/******************************************************************************/
|
||||
void FRAMInit(void)
|
||||
{
|
||||
FRAM_WP_OUTPUT();
|
||||
FRAM_CS_OUTPUT();
|
||||
DisableFRAM();
|
||||
DisableFRAMWrite();
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void ProtectFRAM(void)
|
||||
{
|
||||
EnableFRAMWrite();
|
||||
EnableFRAM();
|
||||
|
||||
SPIWriteData(FRAM_WREN);
|
||||
SPIWriteData(FRAM_WRSR);
|
||||
SPIWriteData(FULL_ARRAY_PROTECTION);
|
||||
SPIWriteData(FRAM_WRDI);
|
||||
|
||||
DisableFRAM();
|
||||
DisableFRAMWrite();
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void UnProtectFRAM(void)
|
||||
{
|
||||
EnableFRAMWrite();
|
||||
EnableFRAM();
|
||||
|
||||
SPIWriteData(FRAM_WREN);
|
||||
SPIWriteData(FRAM_WRSR);
|
||||
SPIWriteData(NO_PROTECTION);
|
||||
SPIWriteData(FRAM_WREN);
|
||||
|
||||
DisableFRAM();
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void WriteByteToFRAM(u16 address, u8 data)
|
||||
{
|
||||
EnableSPI(SPI_MODE3);
|
||||
|
||||
UnProtectFRAM();
|
||||
|
||||
EnableFRAM();
|
||||
SPIWriteData(FRAM_WRITE);
|
||||
SPIWriteData(address>>8);
|
||||
SPIWriteData(address);
|
||||
SPIWriteData(data);
|
||||
DisableFRAM();
|
||||
|
||||
ProtectFRAM();
|
||||
DisableSPI();
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
u8 ReadByteFromFRAM(u16 address)
|
||||
{
|
||||
u8 data;
|
||||
|
||||
EnableSPI(SPI_MODE3);
|
||||
|
||||
EnableFRAM();
|
||||
SPIWriteData(FRAM_READ);
|
||||
SPIWriteData(address>>8);
|
||||
SPIWriteData(address);
|
||||
data = SPIReadData();
|
||||
DisableFRAM();
|
||||
|
||||
DisableSPI();
|
||||
|
||||
return data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void WriteMultiByteToFRAM(u16 address, u8 *pointer, u8 length)
|
||||
{
|
||||
u8 I;
|
||||
|
||||
EnableSPI(SPI_MODE3);
|
||||
delay_ms(1);
|
||||
|
||||
UnProtectFRAM();
|
||||
|
||||
EnableFRAM();
|
||||
SPIWriteData(FRAM_WRITE);
|
||||
SPIWriteData(address>>8);
|
||||
SPIWriteData(address);
|
||||
for(I=0; I<length; I++)
|
||||
{
|
||||
SPIWriteData(*pointer);
|
||||
pointer++;
|
||||
}
|
||||
|
||||
DisableFRAM();
|
||||
|
||||
ProtectFRAM();
|
||||
DisableSPI();
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void ReadMultiByteFromFRAM(u16 address, u8 *pointer, u8 length)
|
||||
{
|
||||
u16 I;
|
||||
|
||||
EnableSPI(SPI_MODE3);
|
||||
delay_ms(1);
|
||||
|
||||
EnableFRAM();
|
||||
SPIWriteData(FRAM_READ);
|
||||
SPIWriteData(address>>8);
|
||||
SPIWriteData(address);
|
||||
for(I=0; I<length; I++) *(pointer+I) = SPIReadData();
|
||||
DisableFRAM();
|
||||
|
||||
DisableSPI();
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
u8 ReadFRAMDeviceID(void)
|
||||
{
|
||||
u8 temp[8];
|
||||
|
||||
//DisableSPI();
|
||||
DisableFRAM();
|
||||
EnableSPI(SPI_MODE3);
|
||||
delay_10us(100);
|
||||
EnableFRAM();
|
||||
|
||||
SPIWriteData(FRAM_RDID);
|
||||
delay_10us(10);
|
||||
temp[0] = SPIReadData();
|
||||
temp[1] = SPIReadData();
|
||||
temp[2] = SPIReadData();
|
||||
temp[3] = SPIReadData();
|
||||
temp[4] = SPIReadData();
|
||||
temp[5] = SPIReadData();
|
||||
temp[6] = SPIReadData();
|
||||
temp[7] = SPIReadData();
|
||||
DisableFRAM();
|
||||
// DisableSPI();
|
||||
|
||||
if(temp[0] != 0x04) return 1;
|
||||
if(temp[1] != 0x7f) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* File end *****************************************************************/
|
||||
#endif
|
||||
/****************************************************************************/
|
||||
60
user/Device/MB85RS16.h
Executable file
60
user/Device/MB85RS16.h
Executable file
@@ -0,0 +1,60 @@
|
||||
#ifndef __MB85RS16_h__
|
||||
#define __MB85RS16_h__
|
||||
|
||||
/* File start ***************************************************************/
|
||||
#if ENABLE_USE_MB85RS16
|
||||
/****************************************************************************/
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#define BYTE_MAX 2048
|
||||
//---------------------------------------------------------------------------
|
||||
//register
|
||||
#define FRAM_WREN 0x06 // 0000 0110B Set Write Enable Latch
|
||||
#define FRAM_WRDI 0x04 // 0000 0100B Reset Write Enable Latch
|
||||
#define FRAM_RDSR 0x05 // 0000 0101B Read Status Register
|
||||
#define FRAM_WRSR 0x01 // 0000 0001B Write Status Register
|
||||
#define FRAM_READ 0x03 // 0000 0011B Read Memory Code
|
||||
#define FRAM_WRITE 0x02 // 0000 0010B Write Memory Code
|
||||
#define FRAM_RDID 0x9f // 1001 1111B Read Device ID
|
||||
|
||||
//Status Register
|
||||
#define WPEN 0x80
|
||||
#define BP1 0x08
|
||||
#define BP0 0x04
|
||||
#define WEL 0x02
|
||||
|
||||
#define NO_PROTECTION 0
|
||||
#define QUARTER_ARRAY_PROTECTION BP0
|
||||
#define HALF_ARRAY_PROTECTION BP1
|
||||
#define FULL_ARRAY_PROTECTION (BP1 + BP0)
|
||||
|
||||
/******************************************************************************/
|
||||
#define FRAM_WP_OUTPUT() EnableOutput(FRAM_WP_GPIO, FRAM_WP_PINPOS)
|
||||
#define SET_FRAM_WP() SET_PIN(FRAM_WP_GPIO, FRAM_WP_PIN)
|
||||
#define CLR_FRAM_WP() CLR_PIN(FRAM_WP_GPIO, FRAM_WP_PIN)
|
||||
#define EnableFRAMWrite() CLR_FRAM_WP()
|
||||
#define DisableFRAMWrite() SET_FRAM_WP()
|
||||
|
||||
#define FRAM_CS_OUTPUT() EnableOutput(FRAM_CS_GPIO, FRAM_CS_PINPOS)
|
||||
#define SET_FRAM_CS() SET_PIN(FRAM_CS_GPIO, FRAM_CS_PIN)
|
||||
#define CLR_FRAM_CS() CLR_PIN(FRAM_CS_GPIO, FRAM_CS_PIN)
|
||||
#define EnableFRAM() CLR_FRAM_WP()
|
||||
#define DisableFRAM() SET_FRAM_WP()
|
||||
|
||||
/******************************************************************************/
|
||||
void FRAMInit(void);
|
||||
void ProtectFRAM(void);
|
||||
void UnProtectFRAM(void);
|
||||
void WriteByteToFRAM(u16 address, u8 data);
|
||||
u8 ReadByteFromFRAM(u16 address);
|
||||
void WriteMultiByteToFRAM(u16 address, u8 *pointer, u8 length);
|
||||
void ReadMultiByteFromFRAM(u16 address, u8 *pointer, u8 length);
|
||||
u8 ReadFRAMDeviceID(void);
|
||||
|
||||
/* File end *****************************************************************/
|
||||
#endif
|
||||
/****************************************************************************/
|
||||
|
||||
/* .h end *******************************************************************/
|
||||
#endif
|
||||
/****************************************************************************/
|
||||
110
user/Device/MCP9808.c
Executable file
110
user/Device/MCP9808.c
Executable file
@@ -0,0 +1,110 @@
|
||||
#include "../main/SystemInclude.h"
|
||||
|
||||
/* File start *****************************************************************/
|
||||
#if ENABLE_USE_MCP9808
|
||||
/******************************************************************************/
|
||||
|
||||
/******************************************************************************/
|
||||
void WriteWordRegister(u8 regBuf, u16 regData)
|
||||
{
|
||||
SI2C_Start(); // send START command
|
||||
SI2C_Write(MCP_ADR); // WRITE Command (see Section 4.1.4 <20><>Address Byte<74><65>)
|
||||
// also, make sure bit 0 is cleared <20><>0<EFBFBD><30>
|
||||
SI2C_Write(regBuf); // Write CONFIG Register
|
||||
SI2C_Write(regData>>8); // Write data
|
||||
SI2C_Write(regData); // Write data
|
||||
SI2C_Stop(); // send STOP command
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
u16 ReadWordRegister(u8 regBuf)
|
||||
{
|
||||
TypeWord tempInt;
|
||||
|
||||
SI2C_Start(); // send START command
|
||||
SI2C_Write(MCP_ADR); // WRITE Command (see Section 4.1.4 <20><>Address Byte<74><65>)
|
||||
// also, make sure bit 0 is cleared <20><>0<EFBFBD><30>
|
||||
SI2C_Write(regBuf); // Write CONFIG Register
|
||||
|
||||
SI2C_Start(); // send Repeat START command
|
||||
SI2C_Write(MCP_ADR | 0x01); // READ Command
|
||||
// also, make sure bit 0 is set <20><>1<EFBFBD><31>
|
||||
tempInt.Byte[1] = SI2C_Read(); // READ 8 bits
|
||||
SI2C_Ack();
|
||||
tempInt.Byte[0] = SI2C_Read(); // READ 8 bits
|
||||
SI2C_NoAck();
|
||||
SI2C_Stop(); // send STOP command
|
||||
|
||||
return tempInt.Word;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void WriteByteRegister(u8 regBuf, u8 regData)
|
||||
{
|
||||
SI2C_Start(); // send START command
|
||||
SI2C_Write(MCP_ADR); // WRITE Command (see Section 4.1.4 <20><>Address Byte<74><65>)
|
||||
// also, make sure bit 0 is cleared <20><>0<EFBFBD><30>
|
||||
SI2C_Write(regBuf); // Write CONFIG Register
|
||||
SI2C_Write(regData); // Write data
|
||||
SI2C_Stop(); // send STOP command
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
u16 ReadByteRegister(u8 regBuf)
|
||||
{
|
||||
u8 temp;
|
||||
|
||||
SI2C_Start(); // send START command
|
||||
SI2C_Write(MCP_ADR); // WRITE Command (see Section 4.1.4 <20><>Address Byte<74><65>)
|
||||
// also, make sure bit 0 is cleared <20><>0<EFBFBD><30>
|
||||
SI2C_Write(regBuf); // Write CONFIG Register
|
||||
|
||||
SI2C_Start(); // send Repeat START command
|
||||
SI2C_Write(MCP_ADR | 0x01); // READ Command
|
||||
// also, make sure bit 0 is set <20><>1<EFBFBD><31>
|
||||
temp = SI2C_Read(); // READ 8 bits
|
||||
SI2C_NoAck();
|
||||
SI2C_Stop(); // send STOP command
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void TestTemperatureInit(u8 regValue)
|
||||
{
|
||||
WriteWordRegister(CONFIG, CONVERSION);
|
||||
//WriteByteRegister(RREG, RESULT_0_125_BIT);
|
||||
WriteByteRegister(RREG, regValue);
|
||||
HWState.EnableTempInit = 0;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
s16 TestTemperature(void)
|
||||
{
|
||||
u32 tempLongInt;
|
||||
s16 tempTA;
|
||||
|
||||
tempTA = (u32)ReadWordRegister(TA);
|
||||
tempTA &= 0x1fff;
|
||||
tempLongInt = (u32)(tempTA & 0xFFF);
|
||||
if(tempTA >= 0x1000) tempLongInt = 0xFFF - tempLongInt;
|
||||
tempLongInt = (tempLongInt * 6400) >> 10; // 0.0625*1024*100 /1024
|
||||
|
||||
if(tempTA >= 0x1000){
|
||||
tempTA *= -1;
|
||||
}
|
||||
else tempTA = (u16)tempLongInt; // Temperature*100
|
||||
if(voltageDetected[TPCB] >= 0x1000) tempTA *= -1;
|
||||
|
||||
return tempTA;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void TemperatureLowPower(void)
|
||||
{
|
||||
WriteWordRegister(CONFIG, SHUT_DOWN);
|
||||
}
|
||||
|
||||
/* File end *****************************************************************/
|
||||
#endif
|
||||
/****************************************************************************/
|
||||
44
user/Device/MCP9808.h
Executable file
44
user/Device/MCP9808.h
Executable file
@@ -0,0 +1,44 @@
|
||||
#ifndef __MCP9808_h__
|
||||
#define __MCP9808_h__
|
||||
|
||||
//##############################################################################
|
||||
#if(ENABLE_USE_MCP9808)
|
||||
//##############################################################################
|
||||
|
||||
#define MCP_ADR 0x3e
|
||||
|
||||
//REGISTER POINTER
|
||||
#define RFU 0x00 // RFU, Reserved for Future Use (Read-Only register)
|
||||
#define CONFIG 0x01 // Configuration register (CONFIG)
|
||||
#define TUPPER 0x02 // Alert Temperature Upper Boundary Trip register (TUPPER)
|
||||
#define TLOWER 0x03 // Alert Temperature Lower Boundary Trip register (TLOWER)
|
||||
#define TCRIT 0x04 // Critical Temperature Trip register (TCRIT)
|
||||
#define TA 0x05 // Temperature register (TA)
|
||||
#define MID 0x06 // Manufacturer ID register
|
||||
#define DID 0x07 // Device ID/Revision register
|
||||
#define RREG 0x08 // Resolution register
|
||||
|
||||
// for Configuration register (CONFIG)
|
||||
#define CONVERSION 0 // Continuous conversion (power-up default)
|
||||
#define SHUT_DOWN BIT8 // Shutdown (Low-Power mode)
|
||||
|
||||
// for Resolution register
|
||||
#define RESULT_0_5_BIT 0x00
|
||||
#define RESULT_0_25_BIT 0x01
|
||||
#define RESULT_0_125_BIT 0x02
|
||||
#define RESULT_0_0625_BIT 0x03
|
||||
|
||||
void WriteWordRegister(u8 regBuf, u16 regData);
|
||||
u16 ReadWordRegister(u8 regBuf);
|
||||
void WriteByteRegister(u8 regBuf, u8 regData);
|
||||
u16 ReadByteRegister(u8 regBuf);
|
||||
void TestTemperatureInit(u8 regValue);
|
||||
s16 TestTemperature(void);
|
||||
void TemperatureLowPower(void);
|
||||
|
||||
//##############################################################################
|
||||
#endif
|
||||
//##############################################################################
|
||||
#endif
|
||||
|
||||
|
||||
70
user/Device/TPL0501.c
Executable file
70
user/Device/TPL0501.c
Executable file
@@ -0,0 +1,70 @@
|
||||
#include "../main/SystemInclude.h"
|
||||
|
||||
//##############################################################################
|
||||
#ifndef ENABLE_USE_TPL0501
|
||||
#pragma message("[undefined] ENABLE_USE_TPL0501")
|
||||
#elif(ENABLE_USE_TPL0501)
|
||||
//##############################################################################
|
||||
//==============================================================================
|
||||
//==============================================================================
|
||||
void DigitalPotOutput(unsigned int PotCHN, unsigned int PotData)
|
||||
{
|
||||
unsigned int selBit, I;
|
||||
|
||||
POT_DIR |= POTA_CS_PIN + POTC_CS_PIN;
|
||||
POT_OUT |= POTA_CS_PIN + POTC_CS_PIN;
|
||||
|
||||
SDA2_OUT();
|
||||
SCL2_OUT();
|
||||
CLR_SCL2();
|
||||
|
||||
if(PotCHN == CTYPE_POT) selBit = POTC_CS_PIN;
|
||||
else selBit = POTA_CS_PIN;
|
||||
|
||||
POT_OUT &= ~selBit;
|
||||
for(I=0; I<8; I++)
|
||||
{
|
||||
if((PotData & 0x80) == 0x80) SET_SDA2();
|
||||
else CLR_SDA2();
|
||||
|
||||
SET_SCL2();
|
||||
_NOP();
|
||||
_NOP();
|
||||
PotData <<= 1;
|
||||
CLR_SCL2();
|
||||
_NOP();
|
||||
_NOP();
|
||||
_NOP();
|
||||
}
|
||||
|
||||
POT_OUT |= selBit;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void DigitalPotLowPower(void)
|
||||
{
|
||||
// SCL2_OUT();
|
||||
// SDA2_OUT();
|
||||
//
|
||||
// CLR_SCL2();
|
||||
// CLR_SDA2();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
unsigned char DigitalPotRead(unsigned int PotCHN)
|
||||
{
|
||||
unsigned char readData;
|
||||
|
||||
// I2C2_Init();
|
||||
//
|
||||
// I2C2_Start();
|
||||
// I2C2_Write(I2C2_RD | CAT5171_ADDR | PotCHN);
|
||||
// readData = I2C2_Read();
|
||||
// I2C2_Stop();
|
||||
|
||||
return readData;
|
||||
}
|
||||
|
||||
//##############################################################################
|
||||
#endif
|
||||
//##############################################################################
|
||||
22
user/Device/TPL0501.h
Executable file
22
user/Device/TPL0501.h
Executable file
@@ -0,0 +1,22 @@
|
||||
#ifndef __TPL0501_H__
|
||||
#define __TPL0501_H__
|
||||
|
||||
//##############################################################################
|
||||
#if(ENABLE_USE_TPL0501)
|
||||
//##############################################################################
|
||||
|
||||
#define CTYPE_POT 0
|
||||
#define ATYPE_POT BIT1
|
||||
|
||||
#define POT_MAX 255
|
||||
#define POT_DEFAULT 128
|
||||
|
||||
void DigitalPotOutput(unsigned int PotCHN, unsigned int PotData);
|
||||
void DigitalPotLowPower(void);
|
||||
unsigned char DigitalPotRead(unsigned int PotCHN);
|
||||
#endif
|
||||
|
||||
//##############################################################################
|
||||
#endif
|
||||
//##############################################################################
|
||||
|
||||
177
user/Device/key_power.c
Executable file
177
user/Device/key_power.c
Executable file
@@ -0,0 +1,177 @@
|
||||
#include "../main/SystemInclude.h"
|
||||
|
||||
// ȫ<>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ʣ<EFBFBD>
|
||||
Device_StateTypeDef g_device_state = DEVICE_STATE_OFF; // <20><>ʼ״̬<D7B4><CCAC><EFBFBD>ػ<EFBFBD>
|
||||
uint32_t g_key_press_time = 0; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>ʱ<EFBFBD>䣨<EFBFBD><E4A3A8>λ<EFBFBD><CEBB>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>
|
||||
uint8_t g_key_last_state = 0; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>״̬<D7B4><CCAC>0=δ<><CEB4><EFBFBD>£<EFBFBD>1=<3D><><EFBFBD>£<EFBFBD>
|
||||
|
||||
extern bool g_SystemStartupComplete;
|
||||
|
||||
// <20><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>־λ
|
||||
volatile uint8_t key_press_flag = 0;
|
||||
|
||||
// 1 = <20><>ʱ<EFBFBD><CAB1>ʱ<EFBFBD>䵽<EFBFBD><E4B5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ػ<EFBFBD><D8BB><EFBFBD>0 = <20>ػ<DEB9><D8BB><EFBFBD><EFBFBD><EFBFBD>
|
||||
volatile uint8_t g_auto_shutdown_flag = 0;
|
||||
|
||||
// <20><><EFBFBD>ų<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>PA0<41><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룩<EFBFBD><EBA3A9>PA1<41><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void Key_Power_Init(void)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
|
||||
// PA0<41><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루<EFBFBD><EBA3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⣩
|
||||
GPIO_InitStruct.Pin = KEY1_PIN;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Current = GPIO_CURRENT_2mA;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
|
||||
GPIO_InitStruct.SchmittTrigger = ENABLE;
|
||||
GPIO_InitStruct.Alternate = GPIOx_AF_GPIO; // // AFΪ<46><CEAA>ͨIO
|
||||
LHL_GPIO_Init(KEY1_PORT, &GPIO_InitStruct);
|
||||
|
||||
// PA1<41><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD>ƣ<EFBFBD>
|
||||
GPIO_InitStruct.Pin = POWER_CTRL_PIN;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Current = GPIO_CURRENT_2mA;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.SchmittTrigger = ENABLE;
|
||||
GPIO_InitStruct.Alternate = GPIOx_AF_GPIO; // // AFΪ<46><CEAA>ͨIO
|
||||
LHL_GPIO_Init(POWER_CTRL_PORT, &GPIO_InitStruct);
|
||||
|
||||
// <20><>ʼ״̬<D7B4><CCAC><EFBFBD>ػ<EFBFBD><D8BB><EFBFBD>PA1<41><31><EFBFBD>ͣ<EFBFBD><CDA3>ر<EFBFBD><D8B1>ⲿ<EFBFBD><E2B2BF>Դ<EFBFBD><D4B4>
|
||||
LHL_GPIO_WritePin(POWER_CTRL_PORT, POWER_CTRL_PIN, GPIO_PIN_RESET);
|
||||
g_device_state = DEVICE_STATE_OFF;
|
||||
|
||||
// <20><>λ<EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
GPIO_InitStruct.Pin = UnitKEY_PIN;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Current = GPIO_CURRENT_2mA;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.SchmittTrigger = ENABLE;
|
||||
GPIO_InitStruct.Alternate = GPIOx_AF_GPIO; // // AFΪ<46><CEAA>ͨIO
|
||||
LHL_GPIO_Init(UnitKEY_PORT, &GPIO_InitStruct);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
static void Device_Start(void) {
|
||||
LHL_GPIO_WritePin(POWER_CTRL_PORT, POWER_CTRL_PIN,GPIO_PIN_SET); // PA1<41><31><EFBFBD>ߡ<EFBFBD><DFA1>ⲿ<EFBFBD><E2B2BF>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD>
|
||||
delay_ms(100); // <20>ȴ<EFBFBD><C8B4><EFBFBD>Դ<EFBFBD>ȶ<EFBFBD>
|
||||
g_device_state = DEVICE_STATE_ON;
|
||||
g_key_press_time = 0; // <20><><EFBFBD>ð<EFBFBD><C3B0><EFBFBD><EFBFBD><EFBFBD>ʱ
|
||||
|
||||
g_auto_shutdown_flag = 0;
|
||||
}
|
||||
|
||||
// <20>豸<EFBFBD>ػ<EFBFBD><D8BB><EFBFBD><EFBFBD><EFBFBD>
|
||||
static void Device_Shutdown(void) {
|
||||
LHL_GPIO_WritePin(POWER_CTRL_PORT, POWER_CTRL_PIN,GPIO_PIN_RESET); // PA1<41><31><EFBFBD>͡<EFBFBD><CDA1>ⲿ<EFBFBD><E2B2BF>Դ<EFBFBD>ر<EFBFBD>
|
||||
delay_ms(100); // <20>ȴ<EFBFBD><C8B4><EFBFBD>Դ<EFBFBD><D4B4>ȫ<EFBFBD>ر<EFBFBD>
|
||||
g_device_state = DEVICE_STATE_OFF;
|
||||
g_key_press_time = 0;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>־λ<D6BE><CEBB><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>
|
||||
static bool g_key_long_pressed_flag = false;
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
static uint16_t g_key_debounce_count = 0;
|
||||
|
||||
void Key_Scan_Task(void) {
|
||||
// 1. <20><>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>״̬
|
||||
uint8_t key_current_state = LHL_GPIO_ReadPin(KEY1_PORT, KEY1_PIN);
|
||||
|
||||
// 2. <20><EFBFBD><F2B5A5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>״̬<D7B4><CCAC><EFBFBD>ϴ<EFBFBD>һ<EFBFBD><D2BB>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (key_current_state == g_key_last_state) {
|
||||
if (g_key_debounce_count < 65535) g_key_debounce_count++;
|
||||
} else {
|
||||
g_key_debounce_count = 0;
|
||||
g_key_last_state = key_current_state; // <20><><EFBFBD><EFBFBD>״̬<D7B4>Ա<EFBFBD><D4B1><EFBFBD>һ<EFBFBD>αȽ<CEB1>
|
||||
}
|
||||
|
||||
// 3. ֻ<><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ﵽ<EFBFBD><EFB5BD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>5<EFBFBD>Σ<EFBFBD><CEA3><EFBFBD>50ms<6D><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ״̬<D7B4><CCAC>Ч
|
||||
if (g_key_debounce_count < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD>״̬<D7B4><CCAC><EFBFBD>Ҽ<EFBFBD><D2BC><EFBFBD>Զ<EFBFBD><D4B6>ػ<EFBFBD><D8BB><EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD> 1
|
||||
if (g_device_state == DEVICE_STATE_ON) {
|
||||
if (g_auto_shutdown_flag == 1) {
|
||||
Device_Shutdown(); // ִ<>йػ<D0B9>
|
||||
g_auto_shutdown_flag = 0; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־λ<D6BE><CEBB><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9>ѭ<EFBFBD><D1AD><EFBFBD>ػ<EFBFBD>
|
||||
// ע<>⣺<EFBFBD><E2A3BA><EFBFBD>ﲻ<EFBFBD><EFB2BB>Ҫ break<61><6B><EFBFBD><EFBFBD>Ϊ<EFBFBD>ػ<EFBFBD><D8BB><EFBFBD>״̬<D7B4><CCAC>Ϊ OFF<46><46><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> switch <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4> ON <20>ķ<EFBFBD>֧
|
||||
}
|
||||
}
|
||||
// 4. ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
switch (g_device_state) {
|
||||
case DEVICE_STATE_OFF:
|
||||
if (key_current_state == 1) {
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (!g_key_long_pressed_flag) {
|
||||
g_key_press_time++;
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD> (40 * 10ms = 400ms)
|
||||
if (g_key_press_time >= (KEY_PRESS_TIME_LONG / KEY_SCAN_INTERVAL)) {
|
||||
Device_Start(); // ִ<>п<EFBFBD><D0BF><EFBFBD>
|
||||
g_key_long_pressed_flag = true; // <20><><EFBFBD>dz<EFBFBD><C7B3><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD>ظ<EFBFBD>ִ<EFBFBD><D6B4>
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ɿ<EFBFBD>
|
||||
g_key_press_time = 0;
|
||||
g_key_long_pressed_flag = false; // <20><><EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD>־
|
||||
}
|
||||
break;
|
||||
|
||||
case DEVICE_STATE_ON:
|
||||
if (key_current_state == 1) {
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (!g_key_long_pressed_flag) {
|
||||
g_key_press_time++;
|
||||
if (g_key_press_time >= (KEY_PRESS_TIME_LONG / KEY_SCAN_INTERVAL)) {
|
||||
Device_Shutdown(); // ִ<>йػ<D0B9>
|
||||
g_key_long_pressed_flag = true; // <20><><EFBFBD>dz<EFBFBD><C7B3><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD>
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ɿ<EFBFBD>
|
||||
g_key_press_time = 0;
|
||||
g_key_long_pressed_flag = false; // <20><><EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD>־
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// <20><>ȡ<EFBFBD><C8A1>ǰ<EFBFBD>豸״̬
|
||||
Device_StateTypeDef Get_Device_State(void) {
|
||||
return g_device_state;
|
||||
}
|
||||
|
||||
void Unit_key(void)
|
||||
{
|
||||
static uint8_t key_state = 0; // 0: <20>ͷ<EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 1: <20><>ȷ<EFBFBD>ϰ<EFBFBD><CFB0><EFBFBD>
|
||||
static uint16_t key_count = 0;
|
||||
uint8_t key_level = LHL_GPIO_ReadPin(UnitKEY_PORT,UnitKEY_PIN);
|
||||
switch (key_state)
|
||||
{
|
||||
case 0:
|
||||
if (key_level == 0) {
|
||||
key_count++;
|
||||
if (key_count >= 3) {
|
||||
key_state = 1;
|
||||
key_press_flag = 1;// <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD>а<EFBFBD><D0B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
key_count=0;
|
||||
}
|
||||
} else {
|
||||
key_count = 0; // ֻҪû<D2AA><C3BB><EFBFBD>£<EFBFBD><C2A3><EFBFBD>һֱ<D2BB><D6B1><EFBFBD><EFBFBD>
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (key_level == 1) {// <20><><EFBFBD><EFBFBD>ɿ<EFBFBD>
|
||||
key_state = 0;
|
||||
key_count = 0;// <20><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BC><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
24
user/Device/key_power.h
Executable file
24
user/Device/key_power.h
Executable file
@@ -0,0 +1,24 @@
|
||||
#ifndef __KEY_POWER_H
|
||||
#define __KEY_POWER_H
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define KEY_PRESS_TIME_SHORT 50 // <20>̰<EFBFBD><CCB0><EFBFBD>ֵ<EFBFBD><D6B5>50ms<6D><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define KEY_PRESS_TIME_LONG 500 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>2000ms<6D><73><EFBFBD>ػ<EFBFBD><D8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define KEY_SCAN_INTERVAL 10 // <20><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>10ms
|
||||
|
||||
// <20>豸״̬ö<CCAC><C3B6>
|
||||
typedef enum {
|
||||
DEVICE_STATE_OFF = 0, // <20>ػ<EFBFBD><D8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߣ<EFBFBD>
|
||||
DEVICE_STATE_ON, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// DEVICE_STATE_SHUTDOWN // <20>ػ<EFBFBD><D8BB>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC>
|
||||
} Device_StateTypeDef;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void Key_Power_Init(void); // <20><><EFBFBD>ų<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>PA0<41><30><EFBFBD>롢PA1<41><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void Key_Scan_Task(void); // <20><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>趨ʱ<E8B6A8><CAB1><EFBFBD>ã<EFBFBD>
|
||||
Device_StateTypeDef Get_Device_State(void); // <20><>ȡ<EFBFBD><C8A1>ǰ<EFBFBD>豸״̬
|
||||
void Unit_key(void); //<2F><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⺯<EFBFBD><E2BAAF><EFBFBD><EFBFBD><EFBFBD>ڶ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
#endif
|
||||
|
||||
685
user/Device/oled.c
Executable file
685
user/Device/oled.c
Executable file
@@ -0,0 +1,685 @@
|
||||
#include "../main/SystemInclude.h"
|
||||
|
||||
|
||||
|
||||
#include "../Device/oledfont.h"
|
||||
// --- 1. <20>Դ涨<D4B4><E6B6A8> ---
|
||||
// ǰ̨<C7B0><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>µ<EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
u8 OLED_GRAM[144][8];
|
||||
// <20><>̨<EFBFBD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ洢<DAB4><E6B4A2>ǰ<EFBFBD><C7B0>Ļ<EFBFBD><C4BB>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>ڶԱȲ<D4B1><C8B2><EFBFBD>
|
||||
u8 OLED_GRAM_Back[144][8];
|
||||
|
||||
//<2F><><EFBFBD>Ժ<EFBFBD><D4BA><EFBFBD>
|
||||
void OLED_ColorTurn(u8 i)
|
||||
{
|
||||
if(i==0)
|
||||
{
|
||||
OLED_WR_Byte(0xA6,OLED_CMD);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
}
|
||||
if(i==1)
|
||||
{
|
||||
OLED_WR_Byte(0xA7,OLED_CMD);//<2F><>ɫ<EFBFBD><C9AB>ʾ
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><>Ļ<EFBFBD><C4BB>ת180<38><30>
|
||||
void OLED_DisplayTurn(u8 i)
|
||||
{
|
||||
if(i==0)
|
||||
{
|
||||
OLED_WR_Byte(0xC8,OLED_CMD);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
OLED_WR_Byte(0xA1,OLED_CMD);
|
||||
}
|
||||
if(i==1)
|
||||
{
|
||||
OLED_WR_Byte(0xC0,OLED_CMD);//<2F><>ת<EFBFBD><D7AA>ʾ
|
||||
OLED_WR_Byte(0xA0,OLED_CMD);
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><>ʱ
|
||||
void IIC_delay(void)
|
||||
{
|
||||
u8 t=3;
|
||||
while(t--);
|
||||
}
|
||||
|
||||
//<2F><>ʼ<EFBFBD>ź<EFBFBD>
|
||||
void I2C_Start(void)
|
||||
{
|
||||
OLED_SDA_Set();
|
||||
OLED_SCL_Set();
|
||||
IIC_delay();
|
||||
OLED_SDA_Clr();
|
||||
IIC_delay();
|
||||
OLED_SCL_Clr();
|
||||
IIC_delay();
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD>
|
||||
void I2C_Stop(void)
|
||||
{
|
||||
OLED_SDA_Clr();
|
||||
OLED_SCL_Set();
|
||||
IIC_delay();
|
||||
OLED_SDA_Set();
|
||||
}
|
||||
|
||||
//<2F>ȴ<EFBFBD><C8B4>ź<EFBFBD><C5BA><EFBFBD>Ӧ
|
||||
void I2C_WaitAck(void) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>źŵĵ<C5B5>ƽ
|
||||
{
|
||||
OLED_SDA_Set();
|
||||
IIC_delay();
|
||||
OLED_SCL_Set();
|
||||
IIC_delay();
|
||||
OLED_SCL_Clr();
|
||||
IIC_delay();
|
||||
}
|
||||
|
||||
//д<><D0B4>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD>
|
||||
void Send_Byte(u8 dat)
|
||||
{
|
||||
u8 i;
|
||||
for(i=0;i<8;i++)
|
||||
{
|
||||
if(dat&0x80)//<2F><>dat<61><74>8λ<38><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>д<EFBFBD><D0B4>
|
||||
{
|
||||
OLED_SDA_Set();
|
||||
}
|
||||
else
|
||||
{
|
||||
OLED_SDA_Clr();
|
||||
}
|
||||
IIC_delay();
|
||||
OLED_SCL_Set();
|
||||
IIC_delay();
|
||||
OLED_SCL_Clr();//<2F><>ʱ<EFBFBD><CAB1><EFBFBD>ź<EFBFBD><C5BA><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>͵<EFBFBD>ƽ
|
||||
dat<<=1;
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD>
|
||||
//mode:<3A><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ 0,<2C><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>;1,<2C><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>;
|
||||
void OLED_WR_Byte(u8 dat,u8 mode)
|
||||
{
|
||||
I2C_Start();
|
||||
Send_Byte(0x78);//д<><D0B4><EFBFBD>豸<EFBFBD><E8B1B8>ַ
|
||||
I2C_WaitAck();
|
||||
if(mode){Send_Byte(0x40);}
|
||||
else{Send_Byte(0x00);}
|
||||
I2C_WaitAck();
|
||||
Send_Byte(dat);
|
||||
I2C_WaitAck();
|
||||
I2C_Stop();
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>OLED<45><44>ʾ
|
||||
void OLED_DisPlay_On(void)
|
||||
{
|
||||
OLED_WR_Byte(0x8D,OLED_CMD);//<2F><><EFBFBD>ɱ<EFBFBD>ʹ<EFBFBD><CAB9>
|
||||
OLED_WR_Byte(0x14,OLED_CMD);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ<EFBFBD>
|
||||
OLED_WR_Byte(0xAF,OLED_CMD);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļ
|
||||
}
|
||||
|
||||
//<2F>ر<EFBFBD>OLED<45><44>ʾ
|
||||
void OLED_DisPlay_Off(void)
|
||||
{
|
||||
OLED_WR_Byte(0x8D,OLED_CMD);//<2F><><EFBFBD>ɱ<EFBFBD>ʹ<EFBFBD><CAB9>
|
||||
OLED_WR_Byte(0x10,OLED_CMD);//<2F>رյ<D8B1><D5B5>ɱ<EFBFBD>
|
||||
OLED_WR_Byte(0xAE,OLED_CMD);//<2F>ر<EFBFBD><D8B1><EFBFBD>Ļ
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>
|
||||
* @note <20>Ա<EFBFBD> OLED_GRAM <20><> OLED_GRAM_Back<63><6B><EFBFBD><EFBFBD>ˢ<EFBFBD>±仯<C2B1><E4BBAF><EFBFBD>ֽ<EFBFBD>
|
||||
*/
|
||||
void OLED_Refresh_Diff(void)
|
||||
{
|
||||
u8 i, n;
|
||||
|
||||
for(i=0; i<8; i++)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>ַ
|
||||
OLED_WR_Byte(0xb0+i, OLED_CMD);
|
||||
OLED_WR_Byte(0x02, OLED_CMD); // Low Col Start Addr
|
||||
OLED_WR_Byte(0x10, OLED_CMD); // High Col Start Addr
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
I2C_Start();
|
||||
Send_Byte(0x78);
|
||||
I2C_WaitAck();
|
||||
Send_Byte(0x40);
|
||||
I2C_WaitAck();
|
||||
|
||||
for(n=0; n<128; n++)
|
||||
{
|
||||
// <20>Ա<EFBFBD>ǰ<EFBFBD><C7B0>̨<EFBFBD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if(OLED_GRAM[n][i] != OLED_GRAM_Back[n][i])
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݱ仯<DDB1><E4BBAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>Ӳ<EFBFBD><D3B2>
|
||||
Send_Byte(OLED_GRAM[n][i]);
|
||||
// <20><><EFBFBD>º<EFBFBD>̨<EFBFBD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC>
|
||||
OLED_GRAM_Back[n][i] = OLED_GRAM[n][i];
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
I2C_Stop();
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ֵIJ<D6B5><C4B2><EFBFBD>ˢ<EFBFBD>¡<EFBFBD><C2A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5>Ż<EFBFBD>
|
||||
void OLED_Refresh_Line_Diff(u8 line) // line 0-7
|
||||
{
|
||||
u8 n;
|
||||
u8 x_start = 0;
|
||||
u8 is_diff = 0;
|
||||
|
||||
// 1. <20><>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>û<EFBFBD>б仯
|
||||
for(n=0; n<128; n++)
|
||||
{
|
||||
if(OLED_GRAM[n][line] != OLED_GRAM_Back[n][line])
|
||||
{
|
||||
is_diff = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>û<EFBFBD>䣬ֱ<E4A3AC>ӷ<EFBFBD><D3B7>أ<EFBFBD>ʡȥ<CAA1><C8A5><EFBFBD><EFBFBD>I2C<32><43><EFBFBD><EFBFBD>
|
||||
if(!is_diff) return;
|
||||
|
||||
// 2. <20><><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>ַ
|
||||
OLED_WR_Byte(0xb0 + line, OLED_CMD);
|
||||
OLED_WR_Byte(0x02, OLED_CMD);
|
||||
OLED_WR_Byte(0x10, OLED_CMD);
|
||||
|
||||
I2C_Start();
|
||||
Send_Byte(0x78);
|
||||
I2C_WaitAck();
|
||||
Send_Byte(0x40);
|
||||
I2C_WaitAck();
|
||||
|
||||
// 3. <20><><EFBFBD>ֽڶԱȲ<D4B1><C8B2><EFBFBD><EFBFBD><EFBFBD>
|
||||
for(n=0; n<128; n++)
|
||||
{
|
||||
if(OLED_GRAM[n][line] != OLED_GRAM_Back[n][line])
|
||||
{
|
||||
Send_Byte(OLED_GRAM[n][line]);
|
||||
// ͬ<><CDAC><EFBFBD><EFBFBD>̨
|
||||
OLED_GRAM_Back[n][line] = OLED_GRAM[n][line];
|
||||
}
|
||||
else
|
||||
{
|
||||
// <20><>ע<EFBFBD>⡿<EFBFBD><E2A1BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>I2C<32><43><EFBFBD><EFBFBD>ģʽ<C4A3>£<EFBFBD><C2A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽڣ<D6BD><DAA3>ӻ<EFBFBD><D3BB><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD>º<EFBFBD><C2BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
||||
// <20><><EFBFBD>뷢<EFBFBD>͵<EFBFBD>ǰ<EFBFBD><C7B0>Ļ<EFBFBD>ϵ<EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD> Back <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>"ռλ"<22><>
|
||||
Send_Byte(OLED_GRAM_Back[n][line]);
|
||||
}
|
||||
I2C_WaitAck();
|
||||
}
|
||||
I2C_Stop();
|
||||
}
|
||||
|
||||
|
||||
// <20><><EFBFBD>ݾɽӿڵ<D3BF>ȫ<EFBFBD><C8AB>ˢ<EFBFBD><CBA2>
|
||||
void OLED_Refresh(void)
|
||||
{
|
||||
u8 i,n;
|
||||
for(i=0;i<8;i++)
|
||||
{
|
||||
OLED_WR_Byte(0xb0+i,OLED_CMD);
|
||||
OLED_WR_Byte(0x02,OLED_CMD);
|
||||
OLED_WR_Byte(0x10,OLED_CMD);
|
||||
I2C_Start();
|
||||
Send_Byte(0x78);
|
||||
I2C_WaitAck();
|
||||
Send_Byte(0x40);
|
||||
I2C_WaitAck();
|
||||
for(n=0;n<128;n++)
|
||||
{
|
||||
Send_Byte(OLED_GRAM[n][i]);
|
||||
I2C_WaitAck();
|
||||
}
|
||||
I2C_Stop();
|
||||
}
|
||||
// ȫ<><C8AB>ˢ<EFBFBD>º<EFBFBD><C2BA><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD>̨
|
||||
memcpy(OLED_GRAM_Back, OLED_GRAM, sizeof(OLED_GRAM));
|
||||
}
|
||||
|
||||
// <20>ɰ<EFBFBD>ˢ<EFBFBD><CBA2><EFBFBD>нӿڣ<D3BF><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>
|
||||
void OLED_Refresh_Line(u8 line)
|
||||
{
|
||||
u8 n;
|
||||
OLED_WR_Byte(0xb0 + line, OLED_CMD);
|
||||
OLED_WR_Byte(0x02, OLED_CMD);
|
||||
OLED_WR_Byte(0x10, OLED_CMD);
|
||||
|
||||
I2C_Start();
|
||||
Send_Byte(0x78);
|
||||
I2C_WaitAck();
|
||||
Send_Byte(0x40);
|
||||
I2C_WaitAck();
|
||||
|
||||
for(n=0; n<128; n++)
|
||||
{
|
||||
Send_Byte(OLED_GRAM[n][line]);
|
||||
I2C_WaitAck();
|
||||
}
|
||||
I2C_Stop();
|
||||
// ͬ<><CDAC><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>̨
|
||||
memcpy(OLED_GRAM_Back[0] + line*128, OLED_GRAM[0] + line*128, 128); // <20><EFBFBD><F2B5A5B4><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>谴ά<E8B0B4>ȿ<EFBFBD><C8BF><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>memcpyд<79><D0B4><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD>ά<EFBFBD><CEAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܲ<EFBFBD>ֱ<EFBFBD>ۣ<EFBFBD><DBA3><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD>:
|
||||
for(n=0;n<128;n++) OLED_GRAM_Back[n][line] = OLED_GRAM[n][line];
|
||||
}
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void OLED_Clear(void)
|
||||
{
|
||||
u8 i,n;
|
||||
for(i=0;i<8;i++)
|
||||
{
|
||||
for(n=0;n<128;n++)
|
||||
OLED_GRAM[n][i]=0;
|
||||
}
|
||||
// <20><><EFBFBD>ﲻ<EFBFBD><EFB2BB><EFBFBD><EFBFBD> OLED_Refresh<73><68><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD><E2B2BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>
|
||||
//x:0~127
|
||||
//y:0~63
|
||||
//t:1 <20><><EFBFBD><EFBFBD> 0,<2C><><EFBFBD><EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD>
|
||||
void OLED_DrawPoint(u8 x,u8 y,u8 t)
|
||||
{
|
||||
u8 i,m,n;
|
||||
i=y/8;
|
||||
m=y%8;
|
||||
n=1<<m;
|
||||
if(t){OLED_GRAM[x][i]|=n;}
|
||||
else
|
||||
{
|
||||
OLED_GRAM[x][i]=~OLED_GRAM[x][i];
|
||||
OLED_GRAM[x][i]|=n;
|
||||
OLED_GRAM[x][i]=~OLED_GRAM[x][i];
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>
|
||||
//x1,y1:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//x2,y2:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void OLED_DrawLine(u8 x1,u8 y1,u8 x2,u8 y2,u8 mode)
|
||||
{
|
||||
u16 t;
|
||||
int xerr=0,yerr=0,delta_x,delta_y,distance;
|
||||
int incx,incy,uRow,uCol;
|
||||
delta_x=x2-x1; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
delta_y=y2-y1;
|
||||
uRow=x1;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
uCol=y1;
|
||||
if(delta_x>0)incx=1; //<2F><><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
else if (delta_x==0)incx=0;//<2F><>ֱ<EFBFBD><D6B1>
|
||||
else {incx=-1;delta_x=-delta_x;}
|
||||
if(delta_y>0)incy=1;
|
||||
else if (delta_y==0)incy=0;//ˮƽ<CBAE><C6BD>
|
||||
else {incy=-1;delta_y=-delta_x;}
|
||||
if(delta_x>delta_y)distance=delta_x; //ѡȡ<D1A1><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
else distance=delta_y;
|
||||
for(t=0;t<distance+1;t++)
|
||||
{
|
||||
OLED_DrawPoint(uRow,uCol,mode);//<2F><><EFBFBD><EFBFBD>
|
||||
xerr+=delta_x;
|
||||
yerr+=delta_y;
|
||||
if(xerr>distance)
|
||||
{
|
||||
xerr-=distance;
|
||||
uRow+=incx;
|
||||
}
|
||||
if(yerr>distance)
|
||||
{
|
||||
yerr-=distance;
|
||||
uCol+=incy;
|
||||
}
|
||||
}
|
||||
}
|
||||
//x,y:Բ<><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//r:Բ<>İ뾶
|
||||
void OLED_DrawCircle(u8 x,u8 y,u8 r)
|
||||
{
|
||||
int a, b,num;
|
||||
a = 0;
|
||||
b = r;
|
||||
while(2 * b * b >= r * r)
|
||||
{
|
||||
OLED_DrawPoint(x + a, y - b,1);
|
||||
OLED_DrawPoint(x - a, y - b,1);
|
||||
OLED_DrawPoint(x - a, y + b,1);
|
||||
OLED_DrawPoint(x + a, y + b,1);
|
||||
|
||||
OLED_DrawPoint(x + b, y + a,1);
|
||||
OLED_DrawPoint(x + b, y - a,1);
|
||||
OLED_DrawPoint(x - b, y - a,1);
|
||||
OLED_DrawPoint(x - b, y + a,1);
|
||||
|
||||
a++;
|
||||
num = (a * a + b * b) - r*r;//<2F><><EFBFBD>㻭<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Բ<EFBFBD>ĵľ<C4B5><C4BE><EFBFBD>
|
||||
if(num > 0)
|
||||
{
|
||||
b--;
|
||||
a--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//<2F><>ָ<EFBFBD><D6B8>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ʾһ<CABE><D2BB><EFBFBD>ַ<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>
|
||||
//x:0~127
|
||||
//y:0~63
|
||||
//size1:ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 6x8/6x12/8x16/12x24
|
||||
//mode:0,<2C><>ɫ<EFBFBD><C9AB>ʾ;1,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
void OLED_ShowChar(u8 x,u8 y,u8 chr,u8 size1,u8 mode)
|
||||
{
|
||||
u8 i,m,temp,size2,chr1;
|
||||
u8 x0=x,y0=y;
|
||||
if(size1==8)size2=6;
|
||||
else size2=(size1/8+((size1%8)?1:0))*(size1/2); //<2F>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><D5BC><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>
|
||||
chr1=chr-' '; //<2F><><EFBFBD><EFBFBD>ƫ<EFBFBD>ƺ<EFBFBD><C6BA><EFBFBD>ֵ
|
||||
for(i=0;i<size2;i++)
|
||||
{
|
||||
if(size1==8)
|
||||
{temp=asc2_0806[chr1][i];} //<2F><><EFBFBD><EFBFBD>0806<30><36><EFBFBD><EFBFBD>
|
||||
else if(size1==12)
|
||||
{temp=asc2_1206[chr1][i];} //<2F><><EFBFBD><EFBFBD>1206<30><36><EFBFBD><EFBFBD>
|
||||
else if(size1==16)
|
||||
{temp=asc2_1608[chr1][i];} //<2F><><EFBFBD><EFBFBD>1608<30><38><EFBFBD><EFBFBD>
|
||||
else if(size1==24)
|
||||
{temp=asc2_2412[chr1][i];} //<2F><><EFBFBD><EFBFBD>2412<31><32><EFBFBD><EFBFBD>
|
||||
else return;
|
||||
for(m=0;m<8;m++)
|
||||
{
|
||||
if(temp&0x01)OLED_DrawPoint(x,y,mode);
|
||||
else OLED_DrawPoint(x,y,!mode);
|
||||
temp>>=1;
|
||||
y++;
|
||||
}
|
||||
x++;
|
||||
if((size1!=8)&&((x-x0)==size1/2))
|
||||
{x=x0;y0=y0+8;}
|
||||
y=y0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//<2F><>ʾ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
//x,y:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//size1:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С
|
||||
//*chr:<3A>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ַ
|
||||
//mode:0,<2C><>ɫ<EFBFBD><C9AB>ʾ;1,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
//<2F><>ʾ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
void OLED_ShowString(u8 x,u8 y,u8 *chr,u8 size1,u8 mode)
|
||||
{
|
||||
while((*chr>=' ')&&(*chr<='~'))
|
||||
{
|
||||
OLED_ShowChar(x,y,*chr,size1,mode);
|
||||
if(size1==8)x+=6;
|
||||
else x+=size1/2;
|
||||
chr++;
|
||||
}
|
||||
}
|
||||
|
||||
//m^n
|
||||
u32 OLED_Pow(u8 m,u8 n)
|
||||
{
|
||||
u32 result=1;
|
||||
while(n--) result*=m;
|
||||
return result;
|
||||
}
|
||||
|
||||
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//x,y :<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//num :Ҫ<><D2AA>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//len :<3A><><EFBFBD>ֵ<EFBFBD>λ<EFBFBD><CEBB>
|
||||
//size:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С
|
||||
//mode:0,<2C><>ɫ<EFBFBD><C9AB>ʾ;1,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
void OLED_ShowNum(u8 x,u8 y,u32 num,u8 len,u8 size1,u8 mode)
|
||||
{
|
||||
u8 t,temp,m=0;
|
||||
if(size1==8)m=2;
|
||||
for(t=0;t<len;t++)
|
||||
{
|
||||
temp=(num/OLED_Pow(10,len-t-1))%10;
|
||||
if(temp==0) OLED_ShowChar(x+(size1/2+m)*t,y,'0',size1,mode);
|
||||
else OLED_ShowChar(x+(size1/2+m)*t,y,temp+'0',size1,mode);
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//x,y:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//num:<3A><><EFBFBD>ֶ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//mode:0,<2C><>ɫ<EFBFBD><C9AB>ʾ;1,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
void OLED_ShowChinese(u8 x,u8 y,u8 num,u8 size1,u8 mode)
|
||||
{
|
||||
u8 m,temp;
|
||||
u8 x0=x,y0=y;
|
||||
u16 i,size3=(size1/8+((size1%8)?1:0))*size1; //<2F>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><D5BC><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>
|
||||
for(i=0;i<size3;i++)
|
||||
{
|
||||
if(size1==16)
|
||||
{temp=Hzk1[num][i];}//<2F><><EFBFBD><EFBFBD>16*16<31><36><EFBFBD><EFBFBD>
|
||||
else if(size1==24)
|
||||
{temp=Hzk2[num][i];}//<2F><><EFBFBD><EFBFBD>24*24<32><34><EFBFBD><EFBFBD>
|
||||
else if(size1==32)
|
||||
{temp=Hzk3[num][i];}//<2F><><EFBFBD><EFBFBD>32*32<33><32><EFBFBD><EFBFBD>
|
||||
else if(size1==64)
|
||||
{temp=Hzk4[num][i];}//<2F><><EFBFBD><EFBFBD>64*64<36><34><EFBFBD><EFBFBD>
|
||||
else return;
|
||||
for(m=0;m<8;m++)
|
||||
{
|
||||
if(temp&0x01)OLED_DrawPoint(x,y,mode);
|
||||
else OLED_DrawPoint(x,y,!mode);
|
||||
temp>>=1;
|
||||
y++;
|
||||
}
|
||||
x++;
|
||||
if((x-x0)==size1)
|
||||
{x=x0;y0=y0+8;}
|
||||
y=y0;
|
||||
}
|
||||
}
|
||||
|
||||
//num <20><>ʾ<EFBFBD><CABE><EFBFBD>ֵĸ<D6B5><C4B8><EFBFBD>
|
||||
//space ÿһ<C3BF><D2BB><EFBFBD><EFBFBD>ʾ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
//mode:0,<2C><>ɫ<EFBFBD><C9AB>ʾ;1,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
void OLED_ScrollDisplay(u8 num,u8 space,u8 mode)
|
||||
{
|
||||
u8 i,n,t=0,m=0,r;
|
||||
while(1)
|
||||
{
|
||||
if(m==0)
|
||||
{
|
||||
OLED_ShowChinese(128,24,t,16,mode); //д<><D0B4>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD>OLED_GRAM[][]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
t++;
|
||||
}
|
||||
if(t==num)
|
||||
{
|
||||
for(r=0;r<16*space;r++) //<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
{
|
||||
for(i=1;i<144;i++)
|
||||
{
|
||||
for(n=0;n<8;n++)
|
||||
{
|
||||
OLED_GRAM[i-1][n]=OLED_GRAM[i][n];
|
||||
}
|
||||
}
|
||||
OLED_Refresh();
|
||||
}
|
||||
t=0;
|
||||
}
|
||||
m++;
|
||||
if(m==16){m=0;}
|
||||
for(i=1;i<144;i++) //ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
{
|
||||
for(n=0;n<8;n++)
|
||||
{
|
||||
OLED_GRAM[i-1][n]=OLED_GRAM[i][n];
|
||||
}
|
||||
}
|
||||
OLED_Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
//x,y<><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//sizex,sizey,ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD>
|
||||
//BMP[]<5D><>Ҫд<D2AA><D0B4><EFBFBD><EFBFBD>ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD>
|
||||
//mode:0,<2C><>ɫ<EFBFBD><C9AB>ʾ;1,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
void OLED_ShowPicture(u8 x,u8 y,u8 sizex,u8 sizey,u8 BMP[],u8 mode)
|
||||
{
|
||||
u16 j=0;
|
||||
u8 i,n,temp,m;
|
||||
u8 x0=x,y0=y;
|
||||
sizey=sizey/8+((sizey%8)?1:0);
|
||||
for(n=0;n<sizey;n++)
|
||||
{
|
||||
for(i=0;i<sizex;i++)
|
||||
{
|
||||
temp=BMP[j];
|
||||
j++;
|
||||
for(m=0;m<8;m++)
|
||||
{
|
||||
if(temp&0x01)OLED_DrawPoint(x,y,mode);
|
||||
else OLED_DrawPoint(x,y,!mode);
|
||||
temp>>=1;
|
||||
y++;
|
||||
}
|
||||
x++;
|
||||
if((x-x0)==sizex)
|
||||
{
|
||||
x=x0;
|
||||
y0=y0+8;
|
||||
}
|
||||
y=y0;
|
||||
}
|
||||
}
|
||||
}
|
||||
//OLED<45>ij<EFBFBD>ʼ<EFBFBD><CABC>
|
||||
void OLED_Init(void)
|
||||
{
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
|
||||
/* 1. <20><><EFBFBD><EFBFBD>GPIO1<4F><31><EFBFBD><EFBFBD>4<EFBFBD>IJ<EFBFBD><C4B2><EFBFBD> */ //P1.4<EFBFBD><EFBFBD>SDA<EFBFBD><EFBFBD>
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_4; // ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4<EFBFBD><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>Ӳ<EFBFBD><D3B2><EFBFBD>ģ<DEB8>
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;// <20><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD><EFBFBD>Ǹ<EFBFBD><C7B8>ù<EFBFBD><C3B9>ܣ<EFBFBD>
|
||||
GPIO_InitStruct.Current = GPIO_CURRENT_4mA;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4mA<6D><41><EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD><DDB8>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
GPIO_InitStruct.SchmittTrigger = ENABLE;
|
||||
GPIO_InitStruct.Alternate = GPIOx_AF_GPIO; // // AFΪ<46><CEAA>ͨIO
|
||||
|
||||
/* 2. Ӧ<><D3A6>GPIO<49><4F><EFBFBD><EFBFBD> */
|
||||
LHL_GPIO_Init(pGPIO1, &GPIO_InitStruct); // <20><>ʼ<EFBFBD><CABC>GPIO1
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>GPIO2<4F><32><EFBFBD><EFBFBD>0<EFBFBD>IJ<EFBFBD><C4B2><EFBFBD> */ //P2.0<EFBFBD><EFBFBD>SCL<EFBFBD><EFBFBD>
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_0; // ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4<EFBFBD><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>Ӳ<EFBFBD><D3B2><EFBFBD>ģ<DEB8>
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;// <20><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD><EFBFBD>Ǹ<EFBFBD><C7B8>ù<EFBFBD><C3B9>ܣ<EFBFBD>
|
||||
GPIO_InitStruct.Current = GPIO_CURRENT_4mA;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4mA<6D><41><EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD><DDB8>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
GPIO_InitStruct.SchmittTrigger = ENABLE;
|
||||
GPIO_InitStruct.Alternate = GPIOx_AF_GPIO; // // AFΪ<46><CEAA>ͨIO
|
||||
LHL_GPIO_Init(pGPIO2, &GPIO_InitStruct); // <20><>ʼ<EFBFBD><CABC>GPIO2
|
||||
|
||||
/* 5. <20><><EFBFBD><EFBFBD>GPIO1<4F><31><EFBFBD><EFBFBD>6<EFBFBD>IJ<EFBFBD><C4B2><EFBFBD> */ //P1.6<EFBFBD><EFBFBD>RES<EFBFBD><EFBFBD>
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_6; // ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4<EFBFBD><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>Ӳ<EFBFBD><D3B2><EFBFBD>ģ<DEB8>
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;// <20><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD><EFBFBD>Ǹ<EFBFBD><C7B8>ù<EFBFBD><C3B9>ܣ<EFBFBD>
|
||||
GPIO_InitStruct.Current = GPIO_CURRENT_4mA;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4mA<6D><41><EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD><DDB8>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
GPIO_InitStruct.SchmittTrigger = ENABLE;
|
||||
GPIO_InitStruct.Alternate = GPIOx_AF_GPIO; // // AFΪ<46><CEAA>ͨIO
|
||||
LHL_GPIO_Init(pGPIO1, &GPIO_InitStruct); // <20><>ʼ<EFBFBD><CABC>GPIO2
|
||||
|
||||
OLED_RES_Clr();
|
||||
delay_ms(200);
|
||||
OLED_RES_Set();
|
||||
|
||||
OLED_WR_Byte(0xAE,OLED_CMD); /*display off*/
|
||||
OLED_WR_Byte(0x02,OLED_CMD); /*set lower column address*/
|
||||
OLED_WR_Byte(0x10,OLED_CMD); /*set higher column address*/
|
||||
OLED_WR_Byte(0x40,OLED_CMD); /*set display start line*/
|
||||
OLED_WR_Byte(0xB0,OLED_CMD); /*set page address*/
|
||||
OLED_WR_Byte(0x81,OLED_CMD); /*contract control*/
|
||||
OLED_WR_Byte(0xcf,OLED_CMD); /*128*/
|
||||
OLED_WR_Byte(0xA1,OLED_CMD); /*set segment remap*/
|
||||
OLED_WR_Byte(0xA6,OLED_CMD); /*normal / reverse*/
|
||||
OLED_WR_Byte(0xA8,OLED_CMD); /*multiplex ratio*/
|
||||
OLED_WR_Byte(0x3F,OLED_CMD); /*duty = 1/64*/
|
||||
OLED_WR_Byte(0xad,OLED_CMD); /*set charge pump enable*/
|
||||
OLED_WR_Byte(0x8b,OLED_CMD); /* 0x8B <20>ڹ<EFBFBD> VCC */
|
||||
OLED_WR_Byte(0x33,OLED_CMD); /*0X30---0X33 set VPP 9V */
|
||||
OLED_WR_Byte(0xC8,OLED_CMD); /*Com scan direction*/
|
||||
OLED_WR_Byte(0xD3,OLED_CMD); /*set display offset*/
|
||||
OLED_WR_Byte(0x00,OLED_CMD); /* 0x20 */
|
||||
OLED_WR_Byte(0xD5,OLED_CMD); /*set osc division*/
|
||||
OLED_WR_Byte(0x80,OLED_CMD);
|
||||
OLED_WR_Byte(0xD9,OLED_CMD); /*set pre-charge period*/
|
||||
OLED_WR_Byte(0x1f,OLED_CMD); /*0x22*/
|
||||
OLED_WR_Byte(0xDA,OLED_CMD); /*set COM pins*/
|
||||
OLED_WR_Byte(0x12,OLED_CMD);
|
||||
OLED_WR_Byte(0xdb,OLED_CMD); /*set vcomh*/
|
||||
OLED_WR_Byte(0x40,OLED_CMD);
|
||||
|
||||
// <20><>ʼ<EFBFBD><CABC>ʱ<EFBFBD><CAB1><EFBFBD>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>
|
||||
OLED_Clear();
|
||||
memset(OLED_GRAM_Back, 0, sizeof(OLED_GRAM_Back));
|
||||
// <20><><EFBFBD><EFBFBD>ȫˢ
|
||||
OLED_Refresh();
|
||||
OLED_WR_Byte(0xAF,OLED_CMD); /*display ON*/
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD>ڴ滺<DAB4><E6BBBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ھֲ<DABE><D6B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param x1: <20><>ʼx<CABC><78><EFBFBD><EFBFBD>
|
||||
* @param y1: <20><>ʼy<CABC><79><EFBFBD><EFBFBD>
|
||||
* @param x2: <20><><EFBFBD><EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD>
|
||||
* @param y2: <20><><EFBFBD><EFBFBD>y<EFBFBD><79><EFBFBD><EFBFBD>
|
||||
* @note <20>˺<EFBFBD><CBBA><EFBFBD>ֻ<EFBFBD><EFBFBD><DEB8>ڴ<EFBFBD><DAB4>е<EFBFBD>OLED_GRAM<41><4D><EFBFBD><EFBFBD>ֱ<EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD>Ӳ<EFBFBD><D3B2>
|
||||
*/
|
||||
void OLED_FillArea(u8 x1, u8 y1, u8 x2, u8 y2)
|
||||
{
|
||||
u8 x, y;
|
||||
for(y=y1; y<y2; y++)
|
||||
{
|
||||
for(x=x1; x<x2; x++)
|
||||
{
|
||||
OLED_DrawPoint(x, y, 0); // <20><EFBFBD>ǰ̨<C7B0><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
}
|
||||
}
|
||||
}
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>ڻ<EFBFBD><DABB>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>x1,y1 <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>; x2,y2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>x2,y2)
|
||||
void OLED_FillRect(u8 x1, u8 y1, u8 x2, u8 y2)
|
||||
{
|
||||
u8 x, y;
|
||||
for(y=y1; y<y2; y++)
|
||||
{
|
||||
for(x=x1; x<x2; x++)
|
||||
{
|
||||
OLED_DrawPoint(x, y, 0); // mode=1<><31><EFBFBD><EFBFBD><EFBFBD>ƺ<EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
|
||||
}
|
||||
}
|
||||
}
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ɫ (mode=0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ/<2F><><EFBFBD><EFBFBD>)
|
||||
void OLED_FillRect_White(u8 x1, u8 y1, u8 x2, u8 y2)
|
||||
{
|
||||
u8 x, y;
|
||||
for(y = y1; y < y2; y++)
|
||||
{
|
||||
for(x = x1; x < x2; x++)
|
||||
{
|
||||
OLED_DrawPoint(x, y, 1); // mode=0<><30><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
244
user/Device/oled.h
Executable file
244
user/Device/oled.h
Executable file
@@ -0,0 +1,244 @@
|
||||
#ifndef __OLED_H
|
||||
#define __OLED_H
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "stdint.h"
|
||||
|
||||
//
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// <20><> <20><> <20><> : oled.c
|
||||
// <20><> <20><> <20><> : v1.0
|
||||
// <20><> <20><> :
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : 2025-11-14
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : OLED I2C<32>ӿ<EFBFBD><D3BF><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
// ˵<><CBB5>:
|
||||
// ----------------------------------------------------------------
|
||||
// GND <20><>Դ<EFBFBD><D4B4>
|
||||
// VCC 3.3v<EFBFBD><EFBFBD>Դ
|
||||
// D0 P2.0<EFBFBD><EFBFBD>SCL<EFBFBD><EFBFBD>
|
||||
// D1 P1.4<EFBFBD><EFBFBD>SDA<EFBFBD><EFBFBD>
|
||||
// RES P1.6<EFBFBD><EFBFBD>SPIģ<EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>IICģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>Ӵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>IICģ<EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD>
|
||||
// ----------------------------------------------------------------
|
||||
//-----------------OLED<45>˿ڶ<CBBF><DAB6><EFBFBD>----------------
|
||||
|
||||
#define OLED_SCL_Clr() LHL_GPIO_WritePin(I2C_SCL_GPIO, GPIO_PIN_0,GPIO_PIN_RESET)//SCL
|
||||
#define OLED_SCL_Set() LHL_GPIO_WritePin(I2C_SCL_GPIO, GPIO_PIN_0, GPIO_PIN_SET)
|
||||
|
||||
#define OLED_SDA_Clr() LHL_GPIO_WritePin(I2C_SDA_GPIO, I2C_SDA, GPIO_PIN_RESET)//DIN
|
||||
#define OLED_SDA_Set() LHL_GPIO_WritePin(I2C_SDA_GPIO, I2C_SDA, GPIO_PIN_SET)
|
||||
|
||||
#define OLED_RES_Clr() LHL_GPIO_WritePin(I2C_RES_GPIO, I2C_RES, GPIO_PIN_RESET)//RES
|
||||
#define OLED_RES_Set() LHL_GPIO_WritePin(I2C_RES_GPIO, I2C_RES, GPIO_PIN_SET)
|
||||
|
||||
|
||||
#define OLED_CMD 0 //д<><D0B4><EFBFBD><EFBFBD>
|
||||
#define OLED_DATA 1 //д<><D0B4><EFBFBD><EFBFBD>
|
||||
#define u8 uint8_t
|
||||
#define u16 uint16_t
|
||||
#define u32 uint32_t
|
||||
|
||||
// --- 1. <20>Դ涨<D4B4><E6B6A8> ---
|
||||
// ǰ̨<C7B0><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>µ<EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
extern u8 OLED_GRAM[144][8];
|
||||
// <20><>̨<EFBFBD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ洢<DAB4><E6B4A2>ǰ<EFBFBD><C7B0>Ļ<EFBFBD><C4BB>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>ڶԱȲ<D4B1><C8B2><EFBFBD>
|
||||
extern u8 OLED_GRAM_Back[144][8];
|
||||
|
||||
// --- 2. Ӳ<><D3B2><EFBFBD>ײ<EFBFBD><D7B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (I2C/GPIO) ---
|
||||
|
||||
/**
|
||||
* @brief I2C <20><>ʼ<EFBFBD>ź<EFBFBD>
|
||||
*/
|
||||
void I2C_Start(void);
|
||||
|
||||
/**
|
||||
* @brief I2C <20><><EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD>
|
||||
*/
|
||||
void I2C_Stop(void);
|
||||
|
||||
/**
|
||||
* @brief I2C <20>ȴ<EFBFBD>Ӧ<EFBFBD><D3A6>
|
||||
*/
|
||||
void I2C_WaitAck(void);
|
||||
|
||||
/**
|
||||
* @brief I2C д<><D0B4>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD>
|
||||
* @param dat Ҫд<D2AA><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
void Send_Byte(u8 dat);
|
||||
|
||||
/**
|
||||
* @brief <20><>OLEDд<44><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param dat Ҫд<D2AA><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param mode ģʽѡ<CABD><D1A1>: 0<><30>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>, 1<><31>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
*/
|
||||
void OLED_WR_Byte(u8 dat, u8 mode);
|
||||
|
||||
/**
|
||||
* @brief OLED <20><><EFBFBD>ż<EFBFBD><C5BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>
|
||||
*/
|
||||
void OLED_Init(void);
|
||||
|
||||
|
||||
// --- 3. <20><>Ļ<EFBFBD><C4BB><EFBFBD>ƺ<EFBFBD><C6BA><EFBFBD> ---
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD><EFBFBD>OLED<45><44>ʾ
|
||||
*/
|
||||
void OLED_DisPlay_On(void);
|
||||
|
||||
/**
|
||||
* @brief <20>ر<EFBFBD>OLED<45><44>ʾ
|
||||
*/
|
||||
void OLED_DisPlay_Off(void);
|
||||
|
||||
/**
|
||||
* @brief <20><>Ļ<EFBFBD><C4BB>ɫ<EFBFBD><C9AB>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
* @param i 0:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ, 1:<3A><>ɫ<EFBFBD><C9AB>ʾ
|
||||
*/
|
||||
void OLED_ColorTurn(u8 i);
|
||||
|
||||
/**
|
||||
* @brief <20><>Ļ<EFBFBD><C4BB>ת180<38><30>
|
||||
* @param i 0:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ, 1:<3A><>ת180<38><30>
|
||||
*/
|
||||
void OLED_DisplayTurn(u8 i);
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD><EFBFBD><EFBFBD>Դ滺<D4B4><E6BBBA><EFBFBD><EFBFBD> (OLED_GRAM)
|
||||
* @note <20>˺<EFBFBD><CBBA><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD>ڴ棬<DAB4><E6A3AC><EFBFBD>Զ<EFBFBD>ˢ<EFBFBD>µ<EFBFBD>Ӳ<EFBFBD><D3B2>
|
||||
*/
|
||||
void OLED_Clear(void);
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD>ڴ滺<DAB4><E6BBBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ھֲ<DABE><D6B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param x1 <20><>ʼx<CABC><78><EFBFBD><EFBFBD>
|
||||
* @param y1 <20><>ʼy<CABC><79><EFBFBD><EFBFBD>
|
||||
* @param x2 <20><><EFBFBD><EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD>
|
||||
* @param y2 <20><><EFBFBD><EFBFBD>y<EFBFBD><79><EFBFBD><EFBFBD>
|
||||
* @note <20>˺<EFBFBD><CBBA><EFBFBD>ֻ<EFBFBD><EFBFBD><DEB8>ڴ<EFBFBD><DAB4>е<EFBFBD>OLED_GRAM<41><4D><EFBFBD><EFBFBD>ֱ<EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD>Ӳ<EFBFBD><D3B2>
|
||||
*/
|
||||
void OLED_FillArea(u8 x1, u8 y1, u8 x2, u8 y2);
|
||||
|
||||
|
||||
// --- 4. <20><>Ļˢ<C4BB>º<EFBFBD><C2BA><EFBFBD> ---
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD>ݾɽӿڵ<D3BF>ȫ<EFBFBD><C8AB>ˢ<EFBFBD><CBA2>
|
||||
* @note <20><> OLED_GRAM <20><><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><CDB5><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD>̨<EFBFBD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
void OLED_Refresh(void);
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>
|
||||
* @note <20>Ա<EFBFBD> OLED_GRAM <20><> OLED_GRAM_Back<63><6B><EFBFBD><EFBFBD>ˢ<EFBFBD>±仯<C2B1><E4BBAF><EFBFBD>ֽ<EFBFBD>
|
||||
*/
|
||||
void OLED_Refresh_Diff(void);
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD>ݾɽӿڵĵ<DAB5><C4B5><EFBFBD>ˢ<EFBFBD><CBA2>
|
||||
* @param line <20>к<EFBFBD> (0-7)
|
||||
*/
|
||||
void OLED_Refresh_Line(u8 line);
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>ָ<EFBFBD><D6B8><EFBFBD>У<EFBFBD><D0A3><EFBFBD>Ч<EFBFBD><D0A7>
|
||||
* @param line <20>к<EFBFBD> (0-7)
|
||||
* @note <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޱ仯<DEB1><E4BBAF><EFBFBD><EFBFBD><F2B2BBBD><EFBFBD> I2C <20><><EFBFBD><EFBFBD>
|
||||
*/
|
||||
void OLED_Refresh_Line_Diff(u8 line);
|
||||
|
||||
|
||||
// --- 5. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD> ---
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD><EFBFBD>
|
||||
* @param x 0~127
|
||||
* @param y 0~63
|
||||
* @param t 1:<3A><><EFBFBD><EFBFBD>, 0:<3A><><EFBFBD><EFBFBD>
|
||||
*/
|
||||
void OLED_DrawPoint(u8 x, u8 y, u8 t);
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD><EFBFBD>
|
||||
* @param x1,y1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param x2,y2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param mode 1:<3A><><EFBFBD><EFBFBD>, 0:<3A><><EFBFBD><EFBFBD>
|
||||
*/
|
||||
void OLED_DrawLine(u8 x1, u8 y1, u8 x2, u8 y2, u8 mode);
|
||||
|
||||
/**
|
||||
* @brief <20><>Բ
|
||||
* @param x,y Բ<><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param r Բ<>İ뾶
|
||||
*/
|
||||
void OLED_DrawCircle(u8 x, u8 y, u8 r);
|
||||
|
||||
|
||||
// --- 6. <20>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>ʾ ---
|
||||
|
||||
/**
|
||||
* @brief <20><>ָ<EFBFBD><D6B8>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ʾһ<CABE><D2BB><EFBFBD>ַ<EFBFBD>
|
||||
* @param x,y <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param chr Ҫ<><D2AA>ʾ<EFBFBD><CABE><EFBFBD>ַ<EFBFBD>
|
||||
* @param size1 ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 6x8 / 12x12 / 16x16 / 24x24 (<28>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD>8,12,16,24)
|
||||
* @param mode 0:<3A><>ɫ<EFBFBD><C9AB>ʾ, 1:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
*/
|
||||
void OLED_ShowChar(u8 x, u8 y, u8 chr, u8 size1, u8 mode);
|
||||
|
||||
/**
|
||||
* @brief <20><>ʾ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
* @param x,y <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param chr <20>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ַ
|
||||
* @param size1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С
|
||||
* @param mode 0:<3A><>ɫ<EFBFBD><C9AB>ʾ, 1:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
*/
|
||||
void OLED_ShowString(u8 x, u8 y, u8 *chr, u8 size1, u8 mode);
|
||||
|
||||
/**
|
||||
* @brief <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
* @param x,y <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param num Ҫ<><D2AA>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param len <20><><EFBFBD>ֵ<EFBFBD>λ<EFBFBD><CEBB>
|
||||
* @param size1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С
|
||||
* @param mode 0:<3A><>ɫ<EFBFBD><C9AB>ʾ, 1:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
*/
|
||||
void OLED_ShowNum(u8 x, u8 y, u32 num, u8 len, u8 size1, u8 mode);
|
||||
|
||||
|
||||
// --- 7. <20><EFBFBD><DFBC><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD>/ͼƬ/<2F><><EFBFBD><EFBFBD>) ---
|
||||
|
||||
/**
|
||||
* @brief <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
* @param x,y <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param num <20><><EFBFBD>ֶ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><>Hzk<7A><6B><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>)
|
||||
* @param size1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С (16, 24, 32, 64)
|
||||
* @param mode 0:<3A><>ɫ<EFBFBD><C9AB>ʾ, 1:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
*/
|
||||
void OLED_ShowChinese(u8 x, u8 y, u8 num, u8 size1, u8 mode);
|
||||
|
||||
/**
|
||||
* @brief <20><>ʾͼƬ
|
||||
* @param x,y <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param sizex,sizey ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD>
|
||||
* @param BMP Ҫд<D2AA><D0B4><EFBFBD><EFBFBD>ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD>
|
||||
* @param mode 0:<3A><>ɫ<EFBFBD><C9AB>ʾ, 1:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
*/
|
||||
void OLED_ShowPicture(u8 x, u8 y, u8 sizex, u8 sizey, u8 BMP[], u8 mode);
|
||||
|
||||
/**
|
||||
* @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
* @param num <20><>ʾ<EFBFBD><CABE><EFBFBD>ֵĸ<D6B5><C4B8><EFBFBD>
|
||||
* @param space ÿһ<C3BF><D2BB><EFBFBD><EFBFBD>ʾ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
* @param mode 0:<3A><>ɫ<EFBFBD><C9AB>ʾ, 1:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
* @note <20>˺<EFBFBD><CBBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> while(1) <20><>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾЧ<CABE><D0A7>
|
||||
*/
|
||||
void OLED_ScrollDisplay(u8 num, u8 space, u8 mode);
|
||||
void OLED_FillArea(u8 x1, u8 y1, u8 x2, u8 y2);
|
||||
void OLED_FillRect(u8 x1, u8 y1, u8 x2, u8 y2);
|
||||
void OLED_FillRect_White(u8 x1, u8 y1, u8 x2, u8 y2);
|
||||
#endif
|
||||
|
||||
429
user/Device/oledfont.h
Executable file
429
user/Device/oledfont.h
Executable file
@@ -0,0 +1,429 @@
|
||||
#ifndef __OLEDFONT_H
|
||||
#define __OLEDFONT_H
|
||||
|
||||
|
||||
|
||||
|
||||
const unsigned char asc2_0806[][6] =
|
||||
{
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00},// sp
|
||||
{0x00, 0x00, 0x00, 0x2f, 0x00, 0x00},// !
|
||||
{0x00, 0x00, 0x07, 0x00, 0x07, 0x00},// "
|
||||
{0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14},// #
|
||||
{0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12},// $
|
||||
{0x00, 0x62, 0x64, 0x08, 0x13, 0x23},// %
|
||||
{0x00, 0x36, 0x49, 0x55, 0x22, 0x50},// &
|
||||
{0x00, 0x00, 0x05, 0x03, 0x00, 0x00},// '
|
||||
{0x00, 0x00, 0x1c, 0x22, 0x41, 0x00},// (
|
||||
{0x00, 0x00, 0x41, 0x22, 0x1c, 0x00},// )
|
||||
{0x00, 0x14, 0x08, 0x3E, 0x08, 0x14},// *
|
||||
{0x00, 0x08, 0x08, 0x3E, 0x08, 0x08},// +
|
||||
{0x00, 0x00, 0x00, 0xA0, 0x60, 0x00},// ,
|
||||
{0x00, 0x08, 0x08, 0x08, 0x08, 0x08},// -
|
||||
{0x00, 0x00, 0x60, 0x60, 0x00, 0x00},// .
|
||||
{0x00, 0x20, 0x10, 0x08, 0x04, 0x02},// /
|
||||
{0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E},// 0
|
||||
{0x00, 0x00, 0x42, 0x7F, 0x40, 0x00},// 1
|
||||
{0x00, 0x42, 0x61, 0x51, 0x49, 0x46},// 2
|
||||
{0x00, 0x21, 0x41, 0x45, 0x4B, 0x31},// 3
|
||||
{0x00, 0x18, 0x14, 0x12, 0x7F, 0x10},// 4
|
||||
{0x00, 0x27, 0x45, 0x45, 0x45, 0x39},// 5
|
||||
{0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30},// 6
|
||||
{0x00, 0x01, 0x71, 0x09, 0x05, 0x03},// 7
|
||||
{0x00, 0x36, 0x49, 0x49, 0x49, 0x36},// 8
|
||||
{0x00, 0x06, 0x49, 0x49, 0x29, 0x1E},// 9
|
||||
{0x00, 0x00, 0x36, 0x36, 0x00, 0x00},// :
|
||||
{0x00, 0x00, 0x56, 0x36, 0x00, 0x00},// ;
|
||||
{0x00, 0x08, 0x14, 0x22, 0x41, 0x00},// <
|
||||
{0x00, 0x14, 0x14, 0x14, 0x14, 0x14},// =
|
||||
{0x00, 0x00, 0x41, 0x22, 0x14, 0x08},// >
|
||||
{0x00, 0x02, 0x01, 0x51, 0x09, 0x06},// ?
|
||||
{0x00, 0x32, 0x49, 0x59, 0x51, 0x3E},// @
|
||||
{0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C},// A
|
||||
{0x00, 0x7F, 0x49, 0x49, 0x49, 0x36},// B
|
||||
{0x00, 0x3E, 0x41, 0x41, 0x41, 0x22},// C
|
||||
{0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C},// D
|
||||
{0x00, 0x7F, 0x49, 0x49, 0x49, 0x41},// E
|
||||
{0x00, 0x7F, 0x09, 0x09, 0x09, 0x01},// F
|
||||
{0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A},// G
|
||||
{0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F},// H
|
||||
{0x00, 0x00, 0x41, 0x7F, 0x41, 0x00},// I
|
||||
{0x00, 0x20, 0x40, 0x41, 0x3F, 0x01},// J
|
||||
{0x00, 0x7F, 0x08, 0x14, 0x22, 0x41},// K
|
||||
{0x00, 0x7F, 0x40, 0x40, 0x40, 0x40},// L
|
||||
{0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F},// M
|
||||
{0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F},// N
|
||||
{0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E},// O
|
||||
{0x00, 0x7F, 0x09, 0x09, 0x09, 0x06},// P
|
||||
{0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E},// Q
|
||||
{0x00, 0x7F, 0x09, 0x19, 0x29, 0x46},// R
|
||||
{0x00, 0x46, 0x49, 0x49, 0x49, 0x31},// S
|
||||
{0x00, 0x01, 0x01, 0x7F, 0x01, 0x01},// T
|
||||
{0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F},// U
|
||||
{0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F},// V
|
||||
{0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F},// W
|
||||
{0x00, 0x63, 0x14, 0x08, 0x14, 0x63},// X
|
||||
{0x00, 0x07, 0x08, 0x70, 0x08, 0x07},// Y
|
||||
{0x00, 0x61, 0x51, 0x49, 0x45, 0x43},// Z
|
||||
{0x00, 0x00, 0x7F, 0x41, 0x41, 0x00},// [
|
||||
{0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55},// 55
|
||||
{0x00, 0x00, 0x41, 0x41, 0x7F, 0x00},// ]
|
||||
{0x00, 0x04, 0x02, 0x01, 0x02, 0x04},// ^
|
||||
{0x00, 0x40, 0x40, 0x40, 0x40, 0x40},// _
|
||||
{0x00, 0x00, 0x01, 0x02, 0x04, 0x00},// '
|
||||
{0x00, 0x20, 0x54, 0x54, 0x54, 0x78},// a
|
||||
{0x00, 0x7F, 0x48, 0x44, 0x44, 0x38},// b
|
||||
{0x00, 0x38, 0x44, 0x44, 0x44, 0x20},// c
|
||||
{0x00, 0x38, 0x44, 0x44, 0x48, 0x7F},// d
|
||||
{0x00, 0x38, 0x54, 0x54, 0x54, 0x18},// e
|
||||
{0x00, 0x08, 0x7E, 0x09, 0x01, 0x02},// f
|
||||
{0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C},// g
|
||||
{0x00, 0x7F, 0x08, 0x04, 0x04, 0x78},// h
|
||||
{0x00, 0x00, 0x44, 0x7D, 0x40, 0x00},// i
|
||||
{0x00, 0x40, 0x80, 0x84, 0x7D, 0x00},// j
|
||||
{0x00, 0x7F, 0x10, 0x28, 0x44, 0x00},// k
|
||||
{0x00, 0x00, 0x41, 0x7F, 0x40, 0x00},// l
|
||||
{0x00, 0x7C, 0x04, 0x18, 0x04, 0x78},// m
|
||||
{0x00, 0x7C, 0x08, 0x04, 0x04, 0x78},// n
|
||||
{0x00, 0x38, 0x44, 0x44, 0x44, 0x38},// o
|
||||
{0x00, 0xFC, 0x24, 0x24, 0x24, 0x18},// p
|
||||
{0x00, 0x18, 0x24, 0x24, 0x18, 0xFC},// q
|
||||
{0x00, 0x7C, 0x08, 0x04, 0x04, 0x08},// r
|
||||
{0x00, 0x48, 0x54, 0x54, 0x54, 0x20},// s
|
||||
{0x00, 0x04, 0x3F, 0x44, 0x40, 0x20},// t
|
||||
{0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C},// u
|
||||
{0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C},// v
|
||||
{0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C},// w
|
||||
{0x00, 0x44, 0x28, 0x10, 0x28, 0x44},// x
|
||||
{0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C},// y
|
||||
{0x00, 0x44, 0x64, 0x54, 0x4C, 0x44},// z
|
||||
{0x14, 0x14, 0x14, 0x14, 0x14, 0x14},// horiz lines
|
||||
};
|
||||
//12*12 ASCII<49>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
const unsigned char asc2_1206[95][12]={
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
|
||||
{0x00,0x00,0xFC,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00},/*"!",1*/
|
||||
{0x00,0x0C,0x02,0x0C,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*""",2*/
|
||||
{0x90,0xD0,0xBC,0xD0,0xBC,0x90,0x00,0x03,0x00,0x03,0x00,0x00},/*"#",3*/
|
||||
{0x18,0x24,0xFE,0x44,0x8C,0x00,0x03,0x02,0x07,0x02,0x01,0x00},/*"$",4*/
|
||||
{0x18,0x24,0xD8,0xB0,0x4C,0x80,0x00,0x03,0x00,0x01,0x02,0x01},/*"%",5*/
|
||||
{0xC0,0x38,0xE4,0x38,0xE0,0x00,0x01,0x02,0x02,0x01,0x02,0x02},/*"&",6*/
|
||||
{0x08,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/
|
||||
{0x00,0x00,0x00,0xF8,0x04,0x02,0x00,0x00,0x00,0x01,0x02,0x04},/*"(",8*/
|
||||
{0x00,0x02,0x04,0xF8,0x00,0x00,0x00,0x04,0x02,0x01,0x00,0x00},/*")",9*/
|
||||
{0x90,0x60,0xF8,0x60,0x90,0x00,0x00,0x00,0x01,0x00,0x00,0x00},/*"*",10*/
|
||||
{0x20,0x20,0xFC,0x20,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00},/*"+",11*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x06,0x00,0x00,0x00,0x00},/*",",12*/
|
||||
{0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"-",13*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00},/*".",14*/
|
||||
{0x00,0x80,0x60,0x1C,0x02,0x00,0x04,0x03,0x00,0x00,0x00,0x00},/*"/",15*/
|
||||
{0xF8,0x04,0x04,0x04,0xF8,0x00,0x01,0x02,0x02,0x02,0x01,0x00},/*"0",16*/
|
||||
{0x00,0x08,0xFC,0x00,0x00,0x00,0x00,0x02,0x03,0x02,0x00,0x00},/*"1",17*/
|
||||
{0x18,0x84,0x44,0x24,0x18,0x00,0x03,0x02,0x02,0x02,0x02,0x00},/*"2",18*/
|
||||
{0x08,0x04,0x24,0x24,0xD8,0x00,0x01,0x02,0x02,0x02,0x01,0x00},/*"3",19*/
|
||||
{0x40,0xB0,0x88,0xFC,0x80,0x00,0x00,0x00,0x00,0x03,0x02,0x00},/*"4",20*/
|
||||
{0x3C,0x24,0x24,0x24,0xC4,0x00,0x01,0x02,0x02,0x02,0x01,0x00},/*"5",21*/
|
||||
{0xF8,0x24,0x24,0x2C,0xC0,0x00,0x01,0x02,0x02,0x02,0x01,0x00},/*"6",22*/
|
||||
{0x0C,0x04,0xE4,0x1C,0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00},/*"7",23*/
|
||||
{0xD8,0x24,0x24,0x24,0xD8,0x00,0x01,0x02,0x02,0x02,0x01,0x00},/*"8",24*/
|
||||
{0x38,0x44,0x44,0x44,0xF8,0x00,0x00,0x03,0x02,0x02,0x01,0x00},/*"9",25*/
|
||||
{0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00},/*":",26*/
|
||||
{0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00},/*";",27*/
|
||||
{0x00,0x20,0x50,0x88,0x04,0x02,0x00,0x00,0x00,0x00,0x01,0x02},/*"<",28*/
|
||||
{0x90,0x90,0x90,0x90,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"=",29*/
|
||||
{0x00,0x02,0x04,0x88,0x50,0x20,0x00,0x02,0x01,0x00,0x00,0x00},/*">",30*/
|
||||
{0x18,0x04,0xC4,0x24,0x18,0x00,0x00,0x00,0x02,0x00,0x00,0x00},/*"?",31*/
|
||||
{0xF8,0x04,0xE4,0x94,0xF8,0x00,0x01,0x02,0x02,0x02,0x02,0x00},/*"@",32*/
|
||||
{0x00,0xE0,0x9C,0xF0,0x80,0x00,0x02,0x03,0x00,0x00,0x03,0x02},/*"A",33*/
|
||||
{0x04,0xFC,0x24,0x24,0xD8,0x00,0x02,0x03,0x02,0x02,0x01,0x00},/*"B",34*/
|
||||
{0xF8,0x04,0x04,0x04,0x0C,0x00,0x01,0x02,0x02,0x02,0x01,0x00},/*"C",35*/
|
||||
{0x04,0xFC,0x04,0x04,0xF8,0x00,0x02,0x03,0x02,0x02,0x01,0x00},/*"D",36*/
|
||||
{0x04,0xFC,0x24,0x74,0x0C,0x00,0x02,0x03,0x02,0x02,0x03,0x00},/*"E",37*/
|
||||
{0x04,0xFC,0x24,0x74,0x0C,0x00,0x02,0x03,0x02,0x00,0x00,0x00},/*"F",38*/
|
||||
{0xF0,0x08,0x04,0x44,0xCC,0x40,0x00,0x01,0x02,0x02,0x01,0x00},/*"G",39*/
|
||||
{0x04,0xFC,0x20,0x20,0xFC,0x04,0x02,0x03,0x00,0x00,0x03,0x02},/*"H",40*/
|
||||
{0x04,0x04,0xFC,0x04,0x04,0x00,0x02,0x02,0x03,0x02,0x02,0x00},/*"I",41*/
|
||||
{0x00,0x04,0x04,0xFC,0x04,0x04,0x06,0x04,0x04,0x03,0x00,0x00},/*"J",42*/
|
||||
{0x04,0xFC,0x24,0xD0,0x0C,0x04,0x02,0x03,0x02,0x00,0x03,0x02},/*"K",43*/
|
||||
{0x04,0xFC,0x04,0x00,0x00,0x00,0x02,0x03,0x02,0x02,0x02,0x03},/*"L",44*/
|
||||
{0xFC,0x3C,0xC0,0x3C,0xFC,0x00,0x03,0x00,0x03,0x00,0x03,0x00},/*"M",45*/
|
||||
{0x04,0xFC,0x30,0xC4,0xFC,0x04,0x02,0x03,0x02,0x00,0x03,0x00},/*"N",46*/
|
||||
{0xF8,0x04,0x04,0x04,0xF8,0x00,0x01,0x02,0x02,0x02,0x01,0x00},/*"O",47*/
|
||||
{0x04,0xFC,0x24,0x24,0x18,0x00,0x02,0x03,0x02,0x00,0x00,0x00},/*"P",48*/
|
||||
{0xF8,0x84,0x84,0x04,0xF8,0x00,0x01,0x02,0x02,0x07,0x05,0x00},/*"Q",49*/
|
||||
{0x04,0xFC,0x24,0x64,0x98,0x00,0x02,0x03,0x02,0x00,0x03,0x02},/*"R",50*/
|
||||
{0x18,0x24,0x24,0x44,0x8C,0x00,0x03,0x02,0x02,0x02,0x01,0x00},/*"S",51*/
|
||||
{0x0C,0x04,0xFC,0x04,0x0C,0x00,0x00,0x02,0x03,0x02,0x00,0x00},/*"T",52*/
|
||||
{0x04,0xFC,0x00,0x00,0xFC,0x04,0x00,0x01,0x02,0x02,0x01,0x00},/*"U",53*/
|
||||
{0x04,0x7C,0x80,0xE0,0x1C,0x04,0x00,0x00,0x03,0x00,0x00,0x00},/*"V",54*/
|
||||
{0x1C,0xE0,0x3C,0xE0,0x1C,0x00,0x00,0x03,0x00,0x03,0x00,0x00},/*"W",55*/
|
||||
{0x04,0x9C,0x60,0x9C,0x04,0x00,0x02,0x03,0x00,0x03,0x02,0x00},/*"X",56*/
|
||||
{0x04,0x1C,0xE0,0x1C,0x04,0x00,0x00,0x02,0x03,0x02,0x00,0x00},/*"Y",57*/
|
||||
{0x0C,0x84,0x64,0x1C,0x04,0x00,0x02,0x03,0x02,0x02,0x03,0x00},/*"Z",58*/
|
||||
{0x00,0x00,0xFE,0x02,0x02,0x00,0x00,0x00,0x07,0x04,0x04,0x00},/*"[",59*/
|
||||
{0x00,0x0E,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x00},/*"\",60*/
|
||||
{0x00,0x02,0x02,0xFE,0x00,0x00,0x00,0x04,0x04,0x07,0x00,0x00},/*"]",61*/
|
||||
{0x00,0x04,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"^",62*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x08},/*"_",63*/
|
||||
{0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
|
||||
{0x00,0x40,0xA0,0xA0,0xC0,0x00,0x00,0x01,0x02,0x02,0x03,0x02},/*"a",65*/
|
||||
{0x04,0xFC,0x20,0x20,0xC0,0x00,0x00,0x03,0x02,0x02,0x01,0x00},/*"b",66*/
|
||||
{0x00,0xC0,0x20,0x20,0x60,0x00,0x00,0x01,0x02,0x02,0x02,0x00},/*"c",67*/
|
||||
{0x00,0xC0,0x20,0x24,0xFC,0x00,0x00,0x01,0x02,0x02,0x03,0x02},/*"d",68*/
|
||||
{0x00,0xC0,0xA0,0xA0,0xC0,0x00,0x00,0x01,0x02,0x02,0x02,0x00},/*"e",69*/
|
||||
{0x00,0x20,0xF8,0x24,0x24,0x04,0x00,0x02,0x03,0x02,0x02,0x00},/*"f",70*/
|
||||
{0x00,0x40,0xA0,0xA0,0x60,0x20,0x00,0x07,0x0A,0x0A,0x0A,0x04},/*"g",71*/
|
||||
{0x04,0xFC,0x20,0x20,0xC0,0x00,0x02,0x03,0x02,0x00,0x03,0x02},/*"h",72*/
|
||||
{0x00,0x20,0xE4,0x00,0x00,0x00,0x00,0x02,0x03,0x02,0x00,0x00},/*"i",73*/
|
||||
{0x00,0x00,0x20,0xE4,0x00,0x00,0x08,0x08,0x08,0x07,0x00,0x00},/*"j",74*/
|
||||
{0x04,0xFC,0x80,0xE0,0x20,0x20,0x02,0x03,0x02,0x00,0x03,0x02},/*"k",75*/
|
||||
{0x04,0x04,0xFC,0x00,0x00,0x00,0x02,0x02,0x03,0x02,0x02,0x00},/*"l",76*/
|
||||
{0xE0,0x20,0xE0,0x20,0xC0,0x00,0x03,0x00,0x03,0x00,0x03,0x00},/*"m",77*/
|
||||
{0x20,0xE0,0x20,0x20,0xC0,0x00,0x02,0x03,0x02,0x00,0x03,0x02},/*"n",78*/
|
||||
{0x00,0xC0,0x20,0x20,0xC0,0x00,0x00,0x01,0x02,0x02,0x01,0x00},/*"o",79*/
|
||||
{0x20,0xE0,0x20,0x20,0xC0,0x00,0x08,0x0F,0x0A,0x02,0x01,0x00},/*"p",80*/
|
||||
{0x00,0xC0,0x20,0x20,0xE0,0x00,0x00,0x01,0x02,0x0A,0x0F,0x08},/*"q",81*/
|
||||
{0x20,0xE0,0x40,0x20,0x20,0x00,0x02,0x03,0x02,0x00,0x00,0x00},/*"r",82*/
|
||||
{0x00,0x60,0xA0,0xA0,0x20,0x00,0x00,0x02,0x02,0x02,0x03,0x00},/*"s",83*/
|
||||
{0x00,0x20,0xF8,0x20,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x00},/*"t",84*/
|
||||
{0x20,0xE0,0x00,0x20,0xE0,0x00,0x00,0x01,0x02,0x02,0x03,0x02},/*"u",85*/
|
||||
{0x20,0xE0,0x20,0x80,0x60,0x20,0x00,0x00,0x03,0x01,0x00,0x00},/*"v",86*/
|
||||
{0x60,0x80,0xE0,0x80,0x60,0x00,0x00,0x03,0x00,0x03,0x00,0x00},/*"w",87*/
|
||||
{0x20,0x60,0x80,0x60,0x20,0x00,0x02,0x03,0x00,0x03,0x02,0x00},/*"x",88*/
|
||||
{0x20,0xE0,0x20,0x80,0x60,0x20,0x08,0x08,0x07,0x01,0x00,0x00},/*"y",89*/
|
||||
{0x00,0x20,0xA0,0x60,0x20,0x00,0x00,0x02,0x03,0x02,0x02,0x00},/*"z",90*/
|
||||
{0x00,0x00,0x20,0xDE,0x02,0x00,0x00,0x00,0x00,0x07,0x04,0x00},/*"{",91*/
|
||||
{0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00},/*"|",92*/
|
||||
{0x00,0x02,0xDE,0x20,0x00,0x00,0x00,0x04,0x07,0x00,0x00,0x00},/*"}",93*/
|
||||
{0x02,0x01,0x02,0x04,0x04,0x02,0x00,0x00,0x00,0x00,0x00,0x00},/*"~",94*/
|
||||
};
|
||||
//16*16 ASCII<49>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
const unsigned char asc2_1608[][16]={
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
|
||||
{0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00},/*"!",1*/
|
||||
{0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*""",2*/
|
||||
{0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00},/*"#",3*/
|
||||
{0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00},/*"$",4*/
|
||||
{0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00},/*"%",5*/
|
||||
{0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10},/*"&",6*/
|
||||
{0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/
|
||||
{0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00},/*"(",8*/
|
||||
{0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00},/*")",9*/
|
||||
{0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00},/*"*",10*/
|
||||
{0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00},/*"+",11*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00},/*",",12*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01},/*"-",13*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00},/*".",14*/
|
||||
{0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00},/*"/",15*/
|
||||
{0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00},/*"0",16*/
|
||||
{0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"1",17*/
|
||||
{0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00},/*"2",18*/
|
||||
{0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00},/*"3",19*/
|
||||
{0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00},/*"4",20*/
|
||||
{0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00},/*"5",21*/
|
||||
{0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00},/*"6",22*/
|
||||
{0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00},/*"7",23*/
|
||||
{0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00},/*"8",24*/
|
||||
{0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00},/*"9",25*/
|
||||
{0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00},/*":",26*/
|
||||
{0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00},/*";",27*/
|
||||
{0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00},/*"<",28*/
|
||||
{0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00},/*"=",29*/
|
||||
{0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00},/*">",30*/
|
||||
{0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00},/*"?",31*/
|
||||
{0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00},/*"@",32*/
|
||||
{0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20},/*"A",33*/
|
||||
{0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00},/*"B",34*/
|
||||
{0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00},/*"C",35*/
|
||||
{0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00},/*"D",36*/
|
||||
{0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00},/*"E",37*/
|
||||
{0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00},/*"F",38*/
|
||||
{0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00},/*"G",39*/
|
||||
{0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20},/*"H",40*/
|
||||
{0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"I",41*/
|
||||
{0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00},/*"J",42*/
|
||||
{0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00},/*"K",43*/
|
||||
{0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00},/*"L",44*/
|
||||
{0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00},/*"M",45*/
|
||||
{0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00},/*"N",46*/
|
||||
{0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00},/*"O",47*/
|
||||
{0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00},/*"P",48*/
|
||||
{0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00},/*"Q",49*/
|
||||
{0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20},/*"R",50*/
|
||||
{0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00},/*"S",51*/
|
||||
{0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00},/*"T",52*/
|
||||
{0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00},/*"U",53*/
|
||||
{0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00},/*"V",54*/
|
||||
{0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00},/*"W",55*/
|
||||
{0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20},/*"X",56*/
|
||||
{0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00},/*"Y",57*/
|
||||
{0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00},/*"Z",58*/
|
||||
{0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00},/*"[",59*/
|
||||
{0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00},/*"\",60*/
|
||||
{0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00},/*"]",61*/
|
||||
{0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"^",62*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80},/*"_",63*/
|
||||
{0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
|
||||
{0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20},/*"a",65*/
|
||||
{0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00},/*"b",66*/
|
||||
{0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00},/*"c",67*/
|
||||
{0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20},/*"d",68*/
|
||||
{0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00},/*"e",69*/
|
||||
{0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"f",70*/
|
||||
{0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00},/*"g",71*/
|
||||
{0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20},/*"h",72*/
|
||||
{0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"i",73*/
|
||||
{0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00},/*"j",74*/
|
||||
{0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00},/*"k",75*/
|
||||
{0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"l",76*/
|
||||
{0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F},/*"m",77*/
|
||||
{0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20},/*"n",78*/
|
||||
{0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00},/*"o",79*/
|
||||
{0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00},/*"p",80*/
|
||||
{0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80},/*"q",81*/
|
||||
{0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00},/*"r",82*/
|
||||
{0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00},/*"s",83*/
|
||||
{0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00},/*"t",84*/
|
||||
{0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20},/*"u",85*/
|
||||
{0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00},/*"v",86*/
|
||||
{0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00},/*"w",87*/
|
||||
{0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00},/*"x",88*/
|
||||
{0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00},/*"y",89*/
|
||||
{0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00},/*"z",90*/
|
||||
{0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40},/*"{",91*/
|
||||
{0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},/*"|",92*/
|
||||
{0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00},/*"}",93*/
|
||||
{0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"~",94*/
|
||||
};
|
||||
//24*24 ASICII<49>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
const unsigned char asc2_2412[][36]={
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x7F,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00},/*"!",1*/
|
||||
{0x00,0x00,0x80,0x60,0x30,0x1C,0x8C,0x60,0x30,0x1C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*""",2*/
|
||||
{0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x86,0xE6,0x9F,0x86,0x86,0x86,0x86,0xE6,0x9F,0x86,0x00,0x00,0x01,0x1F,0x01,0x01,0x01,0x01,0x01,0x1F,0x01,0x01,0x00},/*"#",3*/
|
||||
{0x00,0x00,0x80,0xC0,0x60,0x20,0xF8,0x20,0xE0,0xC0,0x00,0x00,0x00,0x00,0x03,0x07,0x0C,0x18,0xFF,0x70,0xE1,0x81,0x00,0x00,0x00,0x00,0x07,0x0F,0x10,0x10,0x7F,0x10,0x0F,0x07,0x00,0x00},/*"$",4*/
|
||||
{0x80,0x60,0x20,0x60,0x80,0x00,0x00,0x00,0xE0,0x20,0x00,0x00,0x0F,0x30,0x20,0x30,0x9F,0x70,0xDC,0x37,0x10,0x30,0xC0,0x00,0x00,0x00,0x10,0x0E,0x03,0x00,0x07,0x18,0x10,0x18,0x07,0x00},/*"%",5*/
|
||||
{0x00,0x00,0xC0,0x20,0x20,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0x1F,0x38,0xE8,0x87,0x03,0xC4,0x3C,0x04,0x00,0x00,0x07,0x0F,0x18,0x10,0x10,0x0B,0x07,0x0D,0x10,0x10,0x08,0x00},/*"&",6*/
|
||||
{0x00,0x80,0x8C,0x4C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0x30,0x08,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0F,0x18,0x20,0x40,0x00},/*"(",8*/
|
||||
{0x00,0x04,0x08,0x30,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00},/*")",9*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x66,0x66,0x3C,0x18,0xFF,0x18,0x3C,0x66,0x66,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00},/*"*",10*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00},/*"+",11*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x8C,0x4C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"-",13*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x38,0x0C,0x00,0x00,0x00,0x00,0x00,0x80,0x70,0x1C,0x03,0x00,0x00,0x00,0x00,0x00,0x60,0x38,0x0E,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"/",15*/
|
||||
{0x00,0x00,0x80,0xC0,0x60,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0xFE,0xFF,0x01,0x00,0x00,0x00,0x00,0x01,0xFF,0xFE,0x00,0x00,0x01,0x07,0x0E,0x18,0x10,0x10,0x18,0x0E,0x07,0x01,0x00},/*"0",16*/
|
||||
{0x00,0x00,0x80,0x80,0x80,0xC0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,0x10,0x10,0x00,0x00},/*"1",17*/
|
||||
{0x00,0x80,0x40,0x20,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0x03,0x03,0x00,0x80,0x40,0x20,0x38,0x1F,0x07,0x00,0x00,0x00,0x1C,0x1A,0x19,0x18,0x18,0x18,0x18,0x18,0x1F,0x00,0x00},/*"2",18*/
|
||||
{0x00,0x80,0xC0,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0x00,0x03,0x03,0x00,0x10,0x10,0x18,0x2F,0xE7,0x80,0x00,0x00,0x00,0x07,0x0F,0x10,0x10,0x10,0x10,0x18,0x0F,0x07,0x00,0x00},/*"3",19*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xE0,0xF0,0x00,0x00,0x00,0x00,0xC0,0xB0,0x88,0x86,0x81,0x80,0xFF,0xFF,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x1F,0x1F,0x10,0x10,0x00},/*"4",20*/
|
||||
{0x00,0x00,0xE0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x3F,0x10,0x08,0x08,0x08,0x18,0xF0,0xE0,0x00,0x00,0x00,0x07,0x0B,0x10,0x10,0x10,0x10,0x1C,0x0F,0x03,0x00,0x00},/*"5",21*/
|
||||
{0x00,0x00,0x80,0xC0,0x40,0x20,0x20,0x20,0xE0,0xC0,0x00,0x00,0x00,0xFC,0xFF,0x21,0x10,0x08,0x08,0x08,0x18,0xF0,0xE0,0x00,0x00,0x01,0x07,0x0C,0x18,0x10,0x10,0x10,0x08,0x0F,0x03,0x00},/*"6",22*/
|
||||
{0x00,0x00,0xC0,0xE0,0x60,0x60,0x60,0x60,0x60,0xE0,0x60,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xE0,0x18,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x00,0x00,0x00,0x00,0x00},/*"7",23*/
|
||||
{0x00,0x80,0xC0,0x60,0x20,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x87,0xEF,0x2C,0x18,0x18,0x30,0x30,0x68,0xCF,0x83,0x00,0x00,0x07,0x0F,0x08,0x10,0x10,0x10,0x10,0x18,0x0F,0x07,0x00},/*"8",24*/
|
||||
{0x00,0x00,0xC0,0xC0,0x20,0x20,0x20,0x20,0xC0,0x80,0x00,0x00,0x00,0x1F,0x3F,0x60,0x40,0x40,0x40,0x20,0x10,0xFF,0xFE,0x00,0x00,0x00,0x0C,0x1C,0x10,0x10,0x10,0x08,0x0F,0x03,0x00,0x00},/*"9",25*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x0E,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00},/*":",26*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x38,0x00,0x00,0x00,0x00,0x00},/*";",27*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x00,0x00,0x00,0x10,0x28,0x44,0x82,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x00},/*"<",28*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"=",29*/
|
||||
{0x00,0x00,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x82,0x44,0x28,0x10,0x00,0x00,0x00,0x10,0x08,0x04,0x02,0x01,0x00,0x00,0x00,0x00,0x00},/*">",30*/
|
||||
{0x00,0xC0,0x20,0x20,0x10,0x10,0x10,0x10,0x30,0xE0,0xC0,0x00,0x00,0x03,0x03,0x00,0x00,0xF0,0x10,0x08,0x0C,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00,0x00},/*"?",31*/
|
||||
{0x00,0x00,0x00,0xC0,0x40,0x60,0x20,0x20,0x20,0x40,0xC0,0x00,0x00,0xFC,0xFF,0x01,0xF0,0x0E,0x03,0xC1,0xFE,0x03,0x80,0x7F,0x00,0x01,0x07,0x0E,0x08,0x11,0x11,0x10,0x11,0x09,0x04,0x02},/*"@",32*/
|
||||
{0x00,0x00,0x00,0x00,0x80,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x7C,0x43,0x40,0x47,0x7F,0xF8,0x80,0x00,0x00,0x10,0x18,0x1F,0x10,0x00,0x00,0x00,0x00,0x13,0x1F,0x1C,0x10},/*"A",33*/
|
||||
{0x20,0xE0,0xE0,0x20,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0xFF,0xFF,0x10,0x10,0x10,0x10,0x18,0x2F,0xE7,0x80,0x00,0x10,0x1F,0x1F,0x10,0x10,0x10,0x10,0x10,0x18,0x0F,0x07,0x00},/*"B",34*/
|
||||
{0x00,0x00,0x80,0xC0,0x40,0x20,0x20,0x20,0x20,0x60,0xE0,0x00,0x00,0xFC,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x01,0x07,0x0E,0x18,0x10,0x10,0x10,0x08,0x04,0x03,0x00},/*"C",35*/
|
||||
{0x20,0xE0,0xE0,0x20,0x20,0x20,0x20,0x40,0xC0,0x80,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFE,0x00,0x10,0x1F,0x1F,0x10,0x10,0x10,0x18,0x08,0x0E,0x07,0x01,0x00},/*"D",36*/
|
||||
{0x20,0xE0,0xE0,0x20,0x20,0x20,0x20,0x20,0x20,0x60,0x80,0x00,0x00,0xFF,0xFF,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00,0x00,0x10,0x1F,0x1F,0x10,0x10,0x10,0x10,0x10,0x10,0x18,0x06,0x00},/*"E",37*/
|
||||
{0x20,0xE0,0xE0,0x20,0x20,0x20,0x20,0x20,0x60,0x60,0x80,0x00,0x00,0xFF,0xFF,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x01,0x00,0x10,0x1F,0x1F,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"F",38*/
|
||||
{0x00,0x00,0x80,0xC0,0x60,0x20,0x20,0x20,0x40,0xE0,0x00,0x00,0x00,0xFC,0xFF,0x01,0x00,0x00,0x40,0x40,0xC0,0xC1,0x40,0x40,0x00,0x01,0x07,0x0E,0x18,0x10,0x10,0x10,0x0F,0x0F,0x00,0x00},/*"G",39*/
|
||||
{0x20,0xE0,0xE0,0x20,0x00,0x00,0x00,0x00,0x20,0xE0,0xE0,0x20,0x00,0xFF,0xFF,0x10,0x10,0x10,0x10,0x10,0x10,0xFF,0xFF,0x00,0x10,0x1F,0x1F,0x10,0x00,0x00,0x00,0x00,0x10,0x1F,0x1F,0x10},/*"H",40*/
|
||||
{0x00,0x00,0x20,0x20,0x20,0xE0,0xE0,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,0x10,0x10,0x00,0x00},/*"I",41*/
|
||||
{0x00,0x00,0x00,0x00,0x20,0x20,0x20,0xE0,0xE0,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x60,0xE0,0x80,0x80,0x80,0xC0,0x7F,0x3F,0x00,0x00,0x00},/*"J",42*/
|
||||
{0x20,0xE0,0xE0,0x20,0x00,0x00,0x20,0xA0,0x60,0x20,0x20,0x00,0x00,0xFF,0xFF,0x30,0x18,0x7C,0xE3,0xC0,0x00,0x00,0x00,0x00,0x10,0x1F,0x1F,0x10,0x00,0x00,0x01,0x13,0x1F,0x1C,0x18,0x10},/*"K",43*/
|
||||
{0x20,0xE0,0xE0,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x1F,0x1F,0x10,0x10,0x10,0x10,0x10,0x10,0x18,0x06,0x00},/*"L",44*/
|
||||
{0x20,0xE0,0xE0,0xE0,0x00,0x00,0x00,0x00,0xE0,0xE0,0xE0,0x20,0x00,0xFF,0x01,0x3F,0xFE,0xC0,0xE0,0x1E,0x01,0xFF,0xFF,0x00,0x10,0x1F,0x10,0x00,0x03,0x1F,0x03,0x00,0x10,0x1F,0x1F,0x10},/*"M",45*/
|
||||
{0x20,0xE0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x20,0xE0,0x20,0x00,0xFF,0x00,0x03,0x07,0x1C,0x78,0xE0,0x80,0x00,0xFF,0x00,0x10,0x1F,0x10,0x00,0x00,0x00,0x00,0x00,0x03,0x0F,0x1F,0x00},/*"N",46*/
|
||||
{0x00,0x00,0x80,0xC0,0x60,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0xFE,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x00,0x01,0x07,0x0E,0x18,0x10,0x10,0x18,0x0C,0x07,0x01,0x00},/*"O",47*/
|
||||
{0x20,0xE0,0xE0,0x20,0x20,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0xFF,0xFF,0x20,0x20,0x20,0x20,0x20,0x30,0x1F,0x0F,0x00,0x10,0x1F,0x1F,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"P",48*/
|
||||
{0x00,0x00,0x80,0xC0,0x60,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0xFE,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x00,0x01,0x07,0x0E,0x11,0x11,0x13,0x3C,0x7C,0x67,0x21,0x00},/*"Q",49*/
|
||||
{0x20,0xE0,0xE0,0x20,0x20,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0xFF,0xFF,0x10,0x10,0x30,0xF0,0xD0,0x08,0x0F,0x07,0x00,0x10,0x1F,0x1F,0x10,0x00,0x00,0x00,0x03,0x0F,0x1C,0x10,0x10},/*"R",50*/
|
||||
{0x00,0x80,0xC0,0x60,0x20,0x20,0x20,0x20,0x40,0x40,0xE0,0x00,0x00,0x07,0x0F,0x0C,0x18,0x18,0x30,0x30,0x60,0xE0,0x81,0x00,0x00,0x1F,0x0C,0x08,0x10,0x10,0x10,0x10,0x18,0x0F,0x07,0x00},/*"S",51*/
|
||||
{0x80,0x60,0x20,0x20,0x20,0xE0,0xE0,0x20,0x20,0x20,0x60,0x80,0x01,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x10,0x1F,0x1F,0x10,0x00,0x00,0x00,0x00},/*"T",52*/
|
||||
{0x20,0xE0,0xE0,0x20,0x00,0x00,0x00,0x00,0x00,0x20,0xE0,0x20,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x07,0x0F,0x18,0x10,0x10,0x10,0x10,0x10,0x08,0x07,0x00},/*"U",53*/
|
||||
{0x20,0x60,0xE0,0xE0,0x20,0x00,0x00,0x00,0x20,0xE0,0x60,0x20,0x00,0x00,0x07,0x7F,0xF8,0x80,0x00,0x80,0x7C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x1F,0x1C,0x07,0x00,0x00,0x00,0x00},/*"V",54*/
|
||||
{0x20,0xE0,0xE0,0x20,0x00,0xE0,0xE0,0x20,0x00,0x20,0xE0,0x20,0x00,0x07,0xFF,0xF8,0xE0,0x1F,0xFF,0xFC,0xE0,0x1F,0x00,0x00,0x00,0x00,0x03,0x1F,0x03,0x00,0x01,0x1F,0x03,0x00,0x00,0x00},/*"W",55*/
|
||||
{0x00,0x20,0x60,0xE0,0xA0,0x00,0x00,0x20,0xE0,0x60,0x20,0x00,0x00,0x00,0x00,0x03,0x8F,0x7C,0xF8,0xC6,0x01,0x00,0x00,0x00,0x00,0x10,0x18,0x1E,0x13,0x00,0x01,0x17,0x1F,0x18,0x10,0x00},/*"X",56*/
|
||||
{0x20,0x60,0xE0,0xE0,0x20,0x00,0x00,0x00,0x20,0xE0,0x60,0x20,0x00,0x00,0x01,0x07,0x3E,0xF8,0xE0,0x18,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x1F,0x1F,0x10,0x10,0x00,0x00,0x00},/*"Y",57*/
|
||||
{0x00,0x80,0x60,0x20,0x20,0x20,0x20,0xA0,0xE0,0xE0,0x20,0x00,0x00,0x00,0x00,0x00,0xC0,0xF0,0x3E,0x0F,0x03,0x00,0x00,0x00,0x00,0x10,0x1C,0x1F,0x17,0x10,0x10,0x10,0x10,0x18,0x06,0x00},/*"Z",58*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0xFC,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x40,0x40,0x00},/*"[",59*/
|
||||
{0x00,0x00,0x10,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x1C,0x60,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x70,0x80,0x00},/*"\",60*/
|
||||
{0x00,0x00,0x04,0x04,0x04,0x04,0x04,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,0x00},/*"]",61*/
|
||||
{0x00,0x00,0x00,0x10,0x08,0x0C,0x04,0x0C,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"^",62*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80},/*"_",63*/
|
||||
{0x00,0x00,0x00,0x04,0x04,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0xD8,0x44,0x64,0x24,0x24,0xFC,0xF8,0x00,0x00,0x00,0x0F,0x1F,0x18,0x10,0x10,0x10,0x08,0x1F,0x1F,0x10,0x18},/*"a",65*/
|
||||
{0x00,0x20,0xE0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x18,0x08,0x04,0x04,0x0C,0xF8,0xF0,0x00,0x00,0x00,0x1F,0x0F,0x18,0x10,0x10,0x10,0x18,0x0F,0x03,0x00},/*"b",66*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,0x18,0x04,0x04,0x04,0x3C,0x38,0x00,0x00,0x00,0x00,0x03,0x0F,0x0C,0x10,0x10,0x10,0x10,0x08,0x06,0x00,0x00},/*"c",67*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xE0,0xF0,0x00,0x00,0x00,0xE0,0xF8,0x1C,0x04,0x04,0x04,0x08,0xFF,0xFF,0x00,0x00,0x00,0x03,0x0F,0x18,0x10,0x10,0x10,0x08,0x1F,0x0F,0x08,0x00},/*"d",68*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,0x48,0x44,0x44,0x44,0x4C,0x78,0x70,0x00,0x00,0x00,0x03,0x0F,0x0C,0x18,0x10,0x10,0x10,0x08,0x04,0x00},/*"e",69*/
|
||||
{0x00,0x00,0x00,0x00,0x80,0xC0,0x60,0x20,0x20,0xE0,0xC0,0x00,0x00,0x04,0x04,0x04,0xFF,0xFF,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x10,0x10,0x1F,0x1F,0x10,0x10,0x10,0x00,0x00,0x00},/*"f",70*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xF8,0x8C,0x04,0x04,0x8C,0xF8,0x74,0x04,0x0C,0x00,0x70,0x76,0xCF,0x8D,0x8D,0x8D,0x89,0xC8,0x78,0x70,0x00},/*"g",71*/
|
||||
{0x00,0x20,0xE0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x08,0x04,0x04,0x04,0xFC,0xF8,0x00,0x00,0x00,0x10,0x1F,0x1F,0x10,0x00,0x00,0x10,0x1F,0x1F,0x10,0x00},/*"h",72*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0xFC,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,0x10,0x10,0x00,0x00},/*"i",73*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0xFC,0xFC,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x80,0x80,0xC0,0x7F,0x3F,0x00,0x00,0x00},/*"j",74*/
|
||||
{0x00,0x20,0xE0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x80,0xC0,0xF4,0x1C,0x04,0x04,0x00,0x00,0x00,0x10,0x1F,0x1F,0x11,0x00,0x03,0x1F,0x1C,0x10,0x10,0x00},/*"k",75*/
|
||||
{0x00,0x00,0x20,0x20,0x20,0xE0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,0x10,0x10,0x00,0x00},/*"l",76*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFC,0xFC,0x08,0x04,0xFC,0xFC,0x08,0x04,0xFC,0xFC,0x00,0x10,0x1F,0x1F,0x10,0x00,0x1F,0x1F,0x10,0x00,0x1F,0x1F,0x10},/*"m",77*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFC,0xFC,0x08,0x08,0x04,0x04,0xFC,0xF8,0x00,0x00,0x00,0x10,0x1F,0x1F,0x10,0x00,0x00,0x10,0x1F,0x1F,0x10,0x00},/*"n",78*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF0,0x18,0x0C,0x04,0x04,0x0C,0x18,0xF0,0xE0,0x00,0x00,0x03,0x0F,0x0C,0x10,0x10,0x10,0x10,0x0C,0x0F,0x03,0x00},/*"o",79*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFC,0xFC,0x08,0x04,0x04,0x04,0x0C,0xF8,0xF0,0x00,0x00,0x80,0xFF,0xFF,0x88,0x90,0x10,0x10,0x1C,0x0F,0x03,0x00},/*"p",80*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,0x1C,0x04,0x04,0x04,0x08,0xF8,0xFC,0x00,0x00,0x00,0x03,0x0F,0x18,0x10,0x10,0x90,0x88,0xFF,0xFF,0x80,0x00},/*"q",81*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0xFC,0xFC,0x10,0x08,0x04,0x04,0x0C,0x0C,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,0x10,0x10,0x00,0x00,0x00,0x00},/*"r",82*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x78,0xCC,0xC4,0x84,0x84,0x84,0x0C,0x1C,0x00,0x00,0x00,0x1E,0x18,0x10,0x10,0x10,0x11,0x19,0x0F,0x06,0x00},/*"s",83*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0xFF,0xFF,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x1F,0x10,0x10,0x10,0x0C,0x00,0x00},/*"t",84*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFC,0xFE,0x00,0x00,0x00,0x04,0xFC,0xFE,0x00,0x00,0x00,0x00,0x0F,0x1F,0x18,0x10,0x10,0x08,0x1F,0x0F,0x08,0x00},/*"u",85*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x0C,0x3C,0xFC,0xC4,0x00,0x00,0xC4,0x3C,0x0C,0x04,0x00,0x00,0x00,0x00,0x01,0x0F,0x1E,0x0E,0x01,0x00,0x00,0x00},/*"v",86*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x3C,0xFC,0xC4,0x00,0xE4,0x7C,0xFC,0x84,0x80,0x7C,0x04,0x00,0x00,0x07,0x1F,0x07,0x00,0x00,0x07,0x1F,0x07,0x00,0x00},/*"w",87*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x1C,0x7C,0xE4,0xC0,0x34,0x1C,0x04,0x04,0x00,0x00,0x10,0x10,0x1C,0x16,0x01,0x13,0x1F,0x1C,0x18,0x10,0x00},/*"x",88*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x0C,0x3C,0xFC,0xC4,0x00,0xC4,0x3C,0x04,0x04,0x00,0x00,0x00,0xC0,0x80,0xC1,0x37,0x0E,0x01,0x00,0x00,0x00,0x00},/*"y",89*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x04,0x04,0xC4,0xF4,0x7C,0x1C,0x04,0x00,0x00,0x00,0x00,0x10,0x1C,0x1F,0x17,0x11,0x10,0x10,0x18,0x0E,0x00},/*"z",90*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x0C,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x28,0xEF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x60,0x40,0x00,0x00},/*"{",91*/
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00},/*"|",92*/
|
||||
{0x00,0x00,0x04,0x0C,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEF,0x28,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"}",93*/
|
||||
{0x00,0x18,0x06,0x02,0x02,0x04,0x08,0x10,0x20,0x20,0x30,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"~",94*/
|
||||
|
||||
|
||||
|
||||
};
|
||||
const unsigned char Hzk1[][32]={
|
||||
{0x00,0x00,0xF0,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0x10,0x10,0xF0,0x00,0x00,0x00,0x00,0x00,0x0F,0x04,0x04,0x04,0x04,0xFF,0x04,0x04,0x04,0x04,0x0F,0x00,0x00,0x00},/*"<22><>",0*/
|
||||
{0x40,0x40,0x40,0x5F,0x55,0x55,0x55,0x75,0x55,0x55,0x55,0x5F,0x40,0x40,0x40,0x00,0x00,0x40,0x20,0x0F,0x09,0x49,0x89,0x79,0x09,0x09,0x09,0x0F,0x20,0x40,0x00,0x00},/*"<22><>",1*/
|
||||
{0x00,0xFE,0x02,0x42,0x4A,0xCA,0x4A,0x4A,0xCA,0x4A,0x4A,0x42,0x02,0xFE,0x00,0x00,0x00,0xFF,0x40,0x50,0x4C,0x43,0x40,0x40,0x4F,0x50,0x50,0x5C,0x40,0xFF,0x00,0x00},/*"",2*/
|
||||
{0x00,0x00,0xF8,0x88,0x88,0x88,0x88,0xFF,0x88,0x88,0x88,0x88,0xF8,0x00,0x00,0x00,0x00,0x00,0x1F,0x08,0x08,0x08,0x08,0x7F,0x88,0x88,0x88,0x88,0x9F,0x80,0xF0,0x00},/*"<22><>",3*/
|
||||
{0x80,0x82,0x82,0x82,0x82,0x82,0x82,0xE2,0xA2,0x92,0x8A,0x86,0x82,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"<22><>",4*/
|
||||
{0x10,0x10,0x10,0xFF,0x10,0x90,0x08,0x88,0x88,0x88,0xFF,0x88,0x88,0x88,0x08,0x00,0x04,0x44,0x82,0x7F,0x01,0x80,0x80,0x40,0x43,0x2C,0x10,0x28,0x46,0x81,0x80,0x00},/*"<22><>",5*/
|
||||
{0x00,0x10,0x10,0x10,0x10,0xD0,0x30,0xFF,0x30,0xD0,0x12,0x1C,0x10,0x10,0x00,0x00,0x10,0x08,0x04,0x02,0x01,0x00,0x00,0xFF,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x00},/*"<22><>",6*/
|
||||
{0x04,0x04,0x04,0x84,0xE4,0x3C,0x27,0x24,0x24,0x24,0x24,0xE4,0x04,0x04,0x04,0x00,0x04,0x02,0x01,0x00,0xFF,0x09,0x09,0x09,0x09,0x49,0x89,0x7F,0x00,0x00,0x00,0x00},/*"<22><>",7*/
|
||||
{0x00,0xFE,0x22,0x5A,0x86,0x00,0xFE,0x92,0x92,0x92,0x92,0x92,0xFE,0x00,0x00,0x00,0x00,0xFF,0x04,0x08,0x07,0x00,0xFF,0x40,0x20,0x03,0x0C,0x14,0x22,0x41,0x40,0x00},/*"<22><>",8*/
|
||||
{0x00,0x80,0x40,0x20,0x18,0x06,0x80,0x00,0x07,0x18,0x20,0x40,0x80,0x00,0x00,0x00,0x01,0x00,0x20,0x70,0x28,0x26,0x21,0x20,0x20,0x24,0x38,0x60,0x00,0x01,0x01,0x00},/*"<22><>",9*/
|
||||
{0x00,0x10,0x12,0x92,0x92,0x92,0x92,0x92,0x92,0x12,0x12,0x02,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x10,0x10,0x10,0x10,0x3F,0x00,0x40,0x80,0x7F,0x00,0x00,0x00},/*"˾",10*/
|
||||
|
||||
|
||||
|
||||
};
|
||||
const unsigned char Hzk2[][72]={
|
||||
{0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xFC,0x84,0x80,0x80,0x80,0x80,0x80,0x80,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x7F,0x40,0x40,0x40,0x40,0x40,0x40,0xFF,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"<22><>",0*/
|
||||
|
||||
};
|
||||
const unsigned char Hzk3[][128]={
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0xFF,0xFF,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0xFF,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0xFF,0xFF,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"<22><>",0*/
|
||||
|
||||
|
||||
};
|
||||
|
||||
const unsigned char Hzk4[][512]={
|
||||
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0xF0,0xF0,0x70,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFE,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0xFF,0xFF,0xFF,0xFF,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0xFF,0xFF,0xFF,0xFF,0x07,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0xFF,0xFF,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x0F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"<22><>",0*/
|
||||
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user