Skip to content

Hardfault Handler. #4

@embedded4ever

Description

@embedded4ever

First of all, i want to say thanks for sharing this library with the community. But there are many logic error in software design.

Let me explain, if i want to show something on S2 screen, that's ok.

EPD_12in48_Display648x492

This function not working properly with other screen.
Let me explain with one example. Now, i want to show something on M1 screen. Here is the code from inside the function which i mentioned above.

 EPD_M1_SendCommand(0x13);
    for(y = 492; y < 984; y++)
        for(x = 0; x < 81; x++) {
            EPD_M1_SendData(0xff);
        }

After change ;


 for(y = 492; y < 984; y++)
        for(x = 0; x < 81; x++) {
        	EPD_M1_SendData(*(Image+ (y*163) +x));
        }

Opps, hardfault is came. Because of, trying to access an address that does not exist. Now one step, here is the solution.

 for(y = 0; y < 492; y++)
        for(x = 0; x < 81; x++) {
        	EPD_M1_SendData(*(Image+ (y*81) +x));
        }

i think, you need to add one arguman to the func which i mentioned above for selecting which screen we used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions