doc/display/e-Paper-master/RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_4in37b.c
void EPD_4IN37B_Display(UBYTE *ImageBlack, UBYTE*ImageRed)
{
    UWORD Width, Height;
    Width = (EPD_4IN37B_WIDTH % 8 == 0)? (EPD_4IN37B_WIDTH / 8 ): (EPD_4IN37B_WIDTH / 8 + 1);
    Height = EPD_4IN37B_HEIGHT;

    EPD_4IN37B_SendCommand(0x10);
    for (UWORD j = 0; j < Height; j++) {
        for (UWORD i = 0; i < Width; i++) {
            EPD_4IN37B_SendData(ImageBlack[i + j * Width]);
        }
    }
    EPD_4IN37B_SendCommand(0x13);
    for (UWORD j = 0; j < Height; j++) {
        for (UWORD i = 0; i < Width; i++) {
            EPD_4IN37B_SendData(~ImageRed[i + j * Width]);
        }
    }

    EPD_4IN37B_TurnOnDisplay();
}
/******************************************************************************
function :	Sends the image buffer in RAM to e-Paper and displays
parameter:
******************************************************************************/
function :      Sends the image buffer in RAM to e-Paper and displays
parameter.
function : Sends the image buffer in RAM to e - Paper and displays parameter .
void EPD_4IN37B_Display(UBYTE *ImageBlack, UBYTE*ImageRed)
{
    UWORD Width, Height;
    Width = (EPD_4IN37B_WIDTH % 8 == 0)? (EPD_4IN37B_WIDTH / 8 ): (EPD_4IN37B_WIDTH / 8 + 1);
    Height = EPD_4IN37B_HEIGHT;
    EPD_4IN37B_SendCommand(0x10);
    for (UWORD j = 0; j < Height; j++) {
        for (UWORD i = 0; i < Width; i++) {
            EPD_4IN37B_SendData(ImageBlack[i + j * Width]);
        }
    }
    EPD_4IN37B_SendCommand(0x13);
    for (UWORD j = 0; j < Height; j++) {
        for (UWORD i = 0; i < Width; i++) {
            EPD_4IN37B_SendData(~ImageRed[i + j * Width]);
        }
    }
    EPD_4IN37B_TurnOnDisplay();
}
void EPD_4IN37B_Display ( UBYTE * ImageBlack , UBYTE * ImageRed ) { UWORD Width , Height ; Width = ( EPD_4IN37B_WIDTH % 8 == 0 ) ? ( EPD_4IN37B_WIDTH / 8 ) : ( EPD_4IN37B_WIDTH / 8 + 1 ) ; Height = EPD_4IN37B_HEIGHT ; EPD_4IN37B_SendCommand ( 0x10 ) ; for ( UWORD j = 0 ; j < Height ; j ++ ) { for ( UWORD i = 0 ; i < Width ; i ++ ) { EPD_4IN37B_SendData ( ImageBlack [ i + j * Width ] ) ; } } EPD_4IN37B_SendCommand ( 0x13 ) ; for ( UWORD j = 0 ; j < Height ; j ++ ) { for ( UWORD i = 0 ; i < Width ; i ++ ) { EPD_4IN37B_SendData ( ~ ImageRed [ i + j * Width ] ) ; } } EPD_4IN37B_TurnOnDisplay ( ) ; }
function :      Sends the image buffer in RAM to e-Paper and displays
parameter:
function : Sends the image buffer in RAM to e - Paper and displays parameter :