doc/display/e-Paper-master/RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_4in01f.c
void EPD_4IN01F_Show7Block(void)
{
    unsigned long i,j,k;
    unsigned char const Color_seven[8] =
	{EPD_4IN01F_BLACK,EPD_4IN01F_BLUE,EPD_4IN01F_GREEN,EPD_4IN01F_ORANGE,
	EPD_4IN01F_RED,EPD_4IN01F_YELLOW,EPD_4IN01F_WHITE,EPD_4IN01F_WHITE};
    EPD_4IN01F_SendCommand(0x61);//Set Resolution setting
    EPD_4IN01F_SendData(0x02);
    EPD_4IN01F_SendData(0x80);
    EPD_4IN01F_SendData(0x01);
    EPD_4IN01F_SendData(0x90);
    EPD_4IN01F_SendCommand(0x10);
    for(i=0; i<EPD_4IN01F_HEIGHT/2; i++) {
        for(k = 0 ; k < 4; k ++) {
            for(j = 0 ; j < EPD_4IN01F_WIDTH/8; j ++) {
                EPD_4IN01F_SendData((Color_seven[k]<<4) |Color_seven[k]);
            }
        }
    }
    for(i=0; i<EPD_4IN01F_HEIGHT/2; i++) {
        for(k = 4 ; k < 8; k ++) {
            for(j = 0 ; j < EPD_4IN01F_WIDTH/8; j ++) {
                EPD_4IN01F_SendData((Color_seven[k]<<4) |Color_seven[k]);
            }
        }
    }
    EPD_4IN01F_SendCommand(0x04);//0x04
    EPD_4IN01F_BusyHigh();
    EPD_4IN01F_SendCommand(0x12);//0x12
    EPD_4IN01F_BusyHigh();
    EPD_4IN01F_SendCommand(0x02);  //0x02
    EPD_4IN01F_BusyLow();
	// DEV_Delay_ms(200);
}
/******************************************************************************
function:
		show 7 kind of color block 
******************************************************************************/
show 7 kind of color block
show 7 kind of color block
void EPD_4IN01F_Show7Block(void)
{
    unsigned long i,j,k;
    unsigned char const Color_seven[8] =
	{EPD_4IN01F_BLACK,EPD_4IN01F_BLUE,EPD_4IN01F_GREEN,EPD_4IN01F_ORANGE,
	EPD_4IN01F_RED,EPD_4IN01F_YELLOW,EPD_4IN01F_WHITE,EPD_4IN01F_WHITE};
    EPD_4IN01F_SendCommand(0x61);
    EPD_4IN01F_SendData(0x02);
    EPD_4IN01F_SendData(0x80);
    EPD_4IN01F_SendData(0x01);
    EPD_4IN01F_SendData(0x90);
    EPD_4IN01F_SendCommand(0x10);
    for(i=0; i<EPD_4IN01F_HEIGHT/2; i++) {
        for(k = 0 ; k < 4; k ++) {
            for(j = 0 ; j < EPD_4IN01F_WIDTH/8; j ++) {
                EPD_4IN01F_SendData((Color_seven[k]<<4) |Color_seven[k]);
            }
        }
    }
    for(i=0; i<EPD_4IN01F_HEIGHT/2; i++) {
        for(k = 4 ; k < 8; k ++) {
            for(j = 0 ; j < EPD_4IN01F_WIDTH/8; j ++) {
                EPD_4IN01F_SendData((Color_seven[k]<<4) |Color_seven[k]);
            }
        }
    }
    EPD_4IN01F_SendCommand(0x04);
    EPD_4IN01F_BusyHigh();
    EPD_4IN01F_SendCommand(0x12);
    EPD_4IN01F_BusyHigh();
    EPD_4IN01F_SendCommand(0x02);  
    EPD_4IN01F_BusyLow();
}
void EPD_4IN01F_Show7Block ( void ) { unsigned long i , j , k ; unsigned char const Color_seven [ 8 ] = { EPD_4IN01F_BLACK , EPD_4IN01F_BLUE , EPD_4IN01F_GREEN , EPD_4IN01F_ORANGE , EPD_4IN01F_RED , EPD_4IN01F_YELLOW , EPD_4IN01F_WHITE , EPD_4IN01F_WHITE } ; EPD_4IN01F_SendCommand ( 0x61 ) ; EPD_4IN01F_SendData ( 0x02 ) ; EPD_4IN01F_SendData ( 0x80 ) ; EPD_4IN01F_SendData ( 0x01 ) ; EPD_4IN01F_SendData ( 0x90 ) ; EPD_4IN01F_SendCommand ( 0x10 ) ; for ( i = 0 ; i < EPD_4IN01F_HEIGHT / 2 ; i ++ ) { for ( k = 0 ; k < 4 ; k ++ ) { for ( j = 0 ; j < EPD_4IN01F_WIDTH / 8 ; j ++ ) { EPD_4IN01F_SendData ( ( Color_seven [ k ] << 4 ) | Color_seven [ k ] ) ; } } } for ( i = 0 ; i < EPD_4IN01F_HEIGHT / 2 ; i ++ ) { for ( k = 4 ; k < 8 ; k ++ ) { for ( j = 0 ; j < EPD_4IN01F_WIDTH / 8 ; j ++ ) { EPD_4IN01F_SendData ( ( Color_seven [ k ] << 4 ) | Color_seven [ k ] ) ; } } } EPD_4IN01F_SendCommand ( 0x04 ) ; EPD_4IN01F_BusyHigh ( ) ; EPD_4IN01F_SendCommand ( 0x12 ) ; EPD_4IN01F_BusyHigh ( ) ; EPD_4IN01F_SendCommand ( 0x02 ) ; EPD_4IN01F_BusyLow ( ) ; }
function:
show 7 kind of color block
function : show 7 kind of color block
//Set Resolution setting //0x04 //0x12 //0x02 // DEV_Delay_ms(200);