Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -184,23 +184,25 @@ function: Initialization pin
******************************************************************************/
static void DEV_GPIOConfig(void)
{
DEV_GPIO_Mode(EPD_SCK_PIN, 1);
DEV_GPIO_Mode(EPD_PWR_PIN, 1); // handle PWR pin first
DEV_Digital_Write(EPD_PWR_PIN, 0); // power off HAT+ before resetting values

DEV_GPIO_Mode(EPD_SCK_PIN, 1);
DEV_GPIO_Mode(EPD_SI0_PIN, 1);
DEV_GPIO_Mode(EPD_CS_M_PIN, 1);
DEV_GPIO_Mode(EPD_CS_S_PIN, 1);
DEV_GPIO_Mode(EPD_DC_PIN, 1);
DEV_GPIO_Mode(EPD_RST_PIN, 1);
DEV_GPIO_Mode(EPD_BUSY_PIN, 0);
DEV_GPIO_Mode(EPD_PWR_PIN, 1);

DEV_Digital_Write(EPD_SCK_PIN, 0);
DEV_Digital_Write(EPD_SI0_PIN, 0);
DEV_Digital_Write(EPD_CS_M_PIN, 0);
DEV_Digital_Write(EPD_CS_S_PIN, 0);
DEV_Digital_Write(EPD_CS_M_PIN, 1); // CS is low active, thus high
DEV_Digital_Write(EPD_CS_S_PIN, 1); // same applies
DEV_Digital_Write(EPD_DC_PIN, 0);
DEV_Digital_Write(EPD_RST_PIN, 0);
// DEV_Digital_Write(EPD_BUSY_PIN, 0);
DEV_Digital_Write(EPD_PWR_PIN, 1);
DEV_Digital_Write(EPD_PWR_PIN, 1); // turn power on
}

/******************************************************************************
Expand Down