Stabilizing a few things.

Music plays, httpd responds in a snap, messaging subsystem works, full
end-to-end flash erase/flash/configure wifi & hardware/reboot to
squeezelite was tested.

CMake system works well:  it now allows to flash in a single command
(assuming esp-idf V4.0 is properly installed on the system) with the
standard line:

idf.py flash -p <comport>

this makes building and flashing the app less confusing for new
developers/users wanting to experiment
This commit is contained in:
Sebastien
2020-03-11 15:51:55 -04:00
parent 993cdc7492
commit ea873ae3bc
13 changed files with 50 additions and 791 deletions

View File

@@ -15,6 +15,7 @@
#include "gds_err.h"
#include "gds_private.h"
#include "gds_default_if.h"
#include "messaging.h"
static int I2CPortNumber;
static int I2CWait;
@@ -89,6 +90,12 @@ bool GDS_I2CAttachDevice( struct GDS_Device* Device, int Width, int Height, int
static bool I2CDefaultWriteBytes( int Address, bool IsCommand, const uint8_t* Data, size_t DataLength ) {
i2c_cmd_handle_t* CommandHandle = NULL;
static uint8_t ModeByte = 0;
static uint32_t failures=0;
if(failures > 1000){
ESP_LOGE("I2C_Display","I2C Write failure");
failures = 1;
return false;
}
NullCheck( Data, return false );
@@ -108,6 +115,10 @@ static bool I2CDefaultWriteBytes( int Address, bool IsCommand, const uint8_t* Da
return true;
error:
if(++failures == 1){
messaging_post_message(MESSAGING_ERROR,MESSAGING_CLASS_SYSTEM, "Display communication failed.");
}
if (CommandHandle) i2c_cmd_link_delete( CommandHandle );
return false;
}