STM32 provides a new compilation mode that greatly reduces the initial compilation time and is easier to operate.
This commit is contained in:
parent
04115ac1a4
commit
0f3d02f894
168 changed files with 332875 additions and 5820 deletions
|
|
@ -83,14 +83,6 @@ static void EPD_1IN64G_ReadBusyH(void)
|
|||
}
|
||||
Debug("e-Paper busy H release\r\n");
|
||||
}
|
||||
static void EPD_1IN64G_ReadBusyL(void)
|
||||
{
|
||||
Debug("e-Paper busy L\r\n");
|
||||
while(DEV_Digital_Read(EPD_BUSY_PIN)) { //LOW: idle, HIGH: busy
|
||||
DEV_Delay_ms(5);
|
||||
}
|
||||
Debug("e-Paper busy L release\r\n");
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Turn On Display
|
||||
|
|
|
|||
|
|
@ -83,14 +83,6 @@ static void EPD_2IN36G_ReadBusyH(void)
|
|||
}
|
||||
Debug("e-Paper busy H release\r\n");
|
||||
}
|
||||
static void EPD_2IN36G_ReadBusyL(void)
|
||||
{
|
||||
Debug("e-Paper busy L\r\n");
|
||||
while(DEV_Digital_Read(EPD_BUSY_PIN)) { //LOW: idle, HIGH: busy
|
||||
DEV_Delay_ms(5);
|
||||
}
|
||||
Debug("e-Paper busy L release\r\n");
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Turn On Display
|
||||
|
|
|
|||
|
|
@ -287,28 +287,28 @@ void EPD_2in7_gray_SetLut(void)
|
|||
{
|
||||
unsigned int count;
|
||||
EPD_2in7_SendCommand(0x20); //vcom
|
||||
for(count=0;count<44;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_vcom[count]);}
|
||||
for(count=0;count<44;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_vcom[count]);}
|
||||
|
||||
EPD_2in7_SendCommand(0x21); //red not use
|
||||
for(count=0;count<42;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_ww[count]);}
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_ww[count]);}
|
||||
|
||||
EPD_2in7_SendCommand(0x22); //bw r
|
||||
for(count=0;count<42;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_bw[count]);}
|
||||
EPD_2in7_SendCommand(0x22); //bw r
|
||||
for(count=0;count<42;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_bw[count]);}
|
||||
|
||||
EPD_2in7_SendCommand(0x23); //wb w
|
||||
for(count=0;count<42;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_wb[count]);}
|
||||
EPD_2in7_SendCommand(0x23); //wb w
|
||||
for(count=0;count<42;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_wb[count]);}
|
||||
|
||||
EPD_2in7_SendCommand(0x24); //bb b
|
||||
for(count=0;count<42;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_bb[count]);}
|
||||
EPD_2in7_SendCommand(0x24); //bb b
|
||||
for(count=0;count<42;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_bb[count]);}
|
||||
|
||||
EPD_2in7_SendCommand(0x25); //vcom
|
||||
for(count=0;count<42;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_ww[count]);}
|
||||
EPD_2in7_SendCommand(0x25); //vcom
|
||||
for(count=0;count<42;count++)
|
||||
{EPD_2in7_SendData(EPD_2in7_gray_lut_ww[count]);}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -193,8 +193,8 @@ void EPD_2IN9BC_Clear(void)
|
|||
}
|
||||
}
|
||||
|
||||
EPD_2IN9BC_SendCommand(0x12);
|
||||
EPD_2IN9BC_ReadBusy();
|
||||
EPD_2IN9BC_SendCommand(0x12);
|
||||
EPD_2IN9BC_ReadBusy();
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
|||
|
|
@ -83,14 +83,6 @@ static void EPD_3IN0G_ReadBusyH(void)
|
|||
}
|
||||
Debug("e-Paper busy H release\r\n");
|
||||
}
|
||||
static void EPD_3IN0G_ReadBusyL(void)
|
||||
{
|
||||
Debug("e-Paper busy L\r\n");
|
||||
while(DEV_Digital_Read(EPD_BUSY_PIN)) { //LOW: idle, HIGH: busy
|
||||
DEV_Delay_ms(5);
|
||||
}
|
||||
Debug("e-Paper busy L release\r\n");
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Turn On Display
|
||||
|
|
|
|||
|
|
@ -609,11 +609,10 @@ void EPD_4IN2_Display(UBYTE *Image)
|
|||
|
||||
void EPD_4IN2_PartialDisplay(UWORD X_start,UWORD Y_start,UWORD X_end,UWORD Y_end, UBYTE *Image)
|
||||
{
|
||||
UWORD Width, Height;
|
||||
UWORD Width;
|
||||
static UBYTE DATA[EPD_4IN2_WIDTH * EPD_4IN2_HEIGHT / 8] = {0x00};
|
||||
|
||||
Width = (EPD_4IN2_WIDTH % 8 == 0)? (EPD_4IN2_WIDTH / 8 ): (EPD_4IN2_WIDTH / 8 + 1);
|
||||
Height = EPD_4IN2_HEIGHT;
|
||||
|
||||
X_start = (X_start % 8 == 0)? (X_start): (X_start/8*8+8);
|
||||
X_end = (X_end % 8 == 0)? (X_end): (X_end/8*8+8);
|
||||
|
|
|
|||
|
|
@ -83,14 +83,6 @@ static void EPD_4IN37G_ReadBusyH(void)
|
|||
}
|
||||
Debug("e-Paper busy H release\r\n");
|
||||
}
|
||||
static void EPD_4IN37G_ReadBusyL(void)
|
||||
{
|
||||
Debug("e-Paper busy L\r\n");
|
||||
while(DEV_Digital_Read(EPD_BUSY_PIN)) { //LOW: idle, HIGH: busy
|
||||
DEV_Delay_ms(5);
|
||||
}
|
||||
Debug("e-Paper busy L release\r\n");
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Turn On Display
|
||||
|
|
|
|||
|
|
@ -83,14 +83,6 @@ static void EPD_7IN3G_ReadBusyH(void)
|
|||
}
|
||||
Debug("e-Paper busy H release\r\n");
|
||||
}
|
||||
static void EPD_7IN3G_ReadBusyL(void)
|
||||
{
|
||||
Debug("e-Paper busy L\r\n");
|
||||
while(DEV_Digital_Read(EPD_BUSY_PIN)) { //LOW: idle, HIGH: busy
|
||||
DEV_Delay_ms(5);
|
||||
}
|
||||
Debug("e-Paper busy L release\r\n");
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function : Turn On Display
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ void EPD_7IN5_Init(void)
|
|||
{
|
||||
EPD_7IN5_Reset();
|
||||
|
||||
EPD_7IN5_SendCommand(0x01); // POWER_SETTING
|
||||
EPD_7IN5_SendCommand(0x01); // POWER_SETTING
|
||||
EPD_7IN5_SendData(0x37);
|
||||
EPD_7IN5_SendData(0x00);
|
||||
|
||||
|
|
|
|||
|
|
@ -280,31 +280,30 @@ void EPD_7IN5B_HD_DisplayPicture(const UBYTE *blackimage,UBYTE Block)
|
|||
EPD_7IN5B_HD_SendData(0xAF);
|
||||
EPD_7IN5B_HD_SendData(0x02);
|
||||
EPD_7IN5B_HD_SendCommand(0x24);
|
||||
for (UDOUBLE j = 0; j < Height/2; j++) {
|
||||
for (UDOUBLE i = 0; i < Width; i++) {
|
||||
EPD_7IN5B_HD_SendData(blackimage[i + j * Width]);
|
||||
}
|
||||
}
|
||||
|
||||
for (UDOUBLE j = 0; j < Height/2; j++) {
|
||||
for (UDOUBLE i = 0; i < Width; i++) {
|
||||
EPD_7IN5B_HD_SendData(blackimage[i + j * Width]);
|
||||
}
|
||||
}
|
||||
}else if(Block == 1){
|
||||
for (UDOUBLE j = 0; j < Height/2; j++) {
|
||||
for (UDOUBLE i = 0; i < Width; i++) {
|
||||
EPD_7IN5B_HD_SendData(blackimage[i + j * Width]);
|
||||
for (UDOUBLE i = 0; i < Width; i++) {
|
||||
EPD_7IN5B_HD_SendData(blackimage[i + j * Width]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(Block == 2){
|
||||
EPD_7IN5B_HD_SendCommand(0x26);
|
||||
for (UDOUBLE j = 0; j < Height/2; j++) {
|
||||
for (UDOUBLE i = 0; i < Width; i++) {
|
||||
EPD_7IN5B_HD_SendData(~blackimage[i + j * Width]);
|
||||
for (UDOUBLE j = 0; j < Height/2; j++) {
|
||||
for (UDOUBLE i = 0; i < Width; i++) {
|
||||
EPD_7IN5B_HD_SendData(~blackimage[i + j * Width]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(Block == 3){
|
||||
for (UDOUBLE j = 0; j < Height/2; j++) {
|
||||
for (UDOUBLE i = 0; i < Width; i++) {
|
||||
EPD_7IN5B_HD_SendData(~blackimage[i + j * Width]);
|
||||
for (UDOUBLE i = 0; i < Width; i++) {
|
||||
EPD_7IN5B_HD_SendData(~blackimage[i + j * Width]);
|
||||
}
|
||||
}
|
||||
}
|
||||
EPD_7IN5B_HD_TurnOnDisplay();
|
||||
}
|
||||
}
|
||||
|
|
@ -327,12 +326,11 @@ void EPD_7IN5B_HD_DisplayImage(const UBYTE *blackimage, const UBYTE *ryimage,UDO
|
|||
EPD_7IN5B_HD_SendCommand(0x24);
|
||||
for (UDOUBLE j = 0; j < Height; j++) {
|
||||
for (UDOUBLE i = 0; i < Width; i++) {
|
||||
if((i>=start_X/8) && (i<(start_X+image_width)/8) && (j>=start_Y) && (j<(start_Y+image_high))){
|
||||
EPD_7IN5B_HD_SendData(blackimage[i-start_X/8 + (j - start_Y) * image_width/8]);
|
||||
}else{
|
||||
EPD_7IN5B_HD_SendData(0xff);
|
||||
}
|
||||
|
||||
if((i>=start_X/8) && (i<(start_X+image_width)/8) && (j>=start_Y) && (j<(start_Y+image_high))){
|
||||
EPD_7IN5B_HD_SendData(blackimage[i-start_X/8 + (j - start_Y) * image_width/8]);
|
||||
}else{
|
||||
EPD_7IN5B_HD_SendData(0xff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -341,12 +339,11 @@ void EPD_7IN5B_HD_DisplayImage(const UBYTE *blackimage, const UBYTE *ryimage,UDO
|
|||
EPD_7IN5B_HD_SendCommand(0x26);
|
||||
for (UDOUBLE j = 0; j < Height; j++) {
|
||||
for (UDOUBLE i = 0; i < Width; i++) {
|
||||
if((i>=start_X/8) && (i<(start_X+image_width)/8) && (j>=start_Y) && (j<(start_Y+image_high))){
|
||||
EPD_7IN5B_HD_SendData(~ryimage[i-start_X/8 + (j - start_Y) * image_width/8]);
|
||||
}else{
|
||||
EPD_7IN5B_HD_SendData(0x00);
|
||||
}
|
||||
|
||||
if((i>=start_X/8) && (i<(start_X+image_width)/8) && (j>=start_Y) && (j<(start_Y+image_high))){
|
||||
EPD_7IN5B_HD_SendData(~ryimage[i-start_X/8 + (j - start_Y) * image_width/8]);
|
||||
}else{
|
||||
EPD_7IN5B_HD_SendData(0x00);
|
||||
}
|
||||
}
|
||||
}
|
||||
EPD_7IN5B_HD_TurnOnDisplay();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue