Updated V2 (functioning)

This commit is contained in:
Charlez Kwan 2021-03-08 18:53:17 +01:00
parent 20ed200486
commit 2210a04de7
103 changed files with 31170 additions and 20166 deletions

21
User/Config/DEV_Config.c Normal file → Executable file
View file

@ -3,12 +3,13 @@
* | Author : Waveshare team
* | Function : Hardware underlying interface
* | Info :
* Used to shield the underlying layers of each master
* Used to shield the underlying layers of each master
* and enhance portability
*----------------
* | This version: V2.0
* | Date : 2018-10-30
* | Info :
# ******************************************************************************
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documnetation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@ -34,7 +35,23 @@
extern SPI_HandleTypeDef hspi1;
void DEV_SPI_WriteByte(UBYTE value)
{
HAL_SPI_Transmit(&hspi1, &value, 1, 1000);
HAL_SPI_Transmit(&hspi1, &value, 1, 1000);
}
int DEV_Module_Init(void)
{
DEV_Digital_Write(EPD_DC_PIN, 0);
DEV_Digital_Write(EPD_CS_PIN, 0);
DEV_Digital_Write(EPD_RST_PIN, 1);
return 0;
}
void DEV_Module_Exit(void)
{
DEV_Digital_Write(EPD_DC_PIN, 0);
DEV_Digital_Write(EPD_CS_PIN, 0);
//close 5V
DEV_Digital_Write(EPD_RST_PIN, 0);
}

3
User/Config/DEV_Config.h Normal file → Executable file
View file

@ -80,4 +80,7 @@
#define DEV_Delay_ms(__xms) HAL_Delay(__xms);
void DEV_SPI_WriteByte(UBYTE value);
int DEV_Module_Init(void);
void DEV_Module_Exit(void);
#endif

0
User/Config/Debug.h Normal file → Executable file
View file