dropping useless max7456Lock boolean (#8499)

dropping useless max7456Lock boolean
This commit is contained in:
Michael Keller 2019-06-30 12:59:51 +12:00 committed by GitHub
commit 8140504f84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 17 deletions

View File

@ -210,7 +210,6 @@ static uint8_t displayMemoryModeReg = 0;
static uint8_t hosRegValue; // HOS (Horizontal offset register) value
static uint8_t vosRegValue; // VOS (Vertical offset register) value
static bool max7456Lock = false;
static bool fontIsLoading = false;
static uint8_t max7456DeviceType;
@ -647,12 +646,10 @@ void max7456DrawScreen(void)
{
static uint16_t pos = 0;
if (!max7456Lock && !fontIsLoading) {
if (!fontIsLoading) {
// (Re)Initialize MAX7456 at startup or stall is detected.
max7456Lock = true;
max7456ReInitIfRequired();
int buff_len = 0;
@ -682,7 +679,6 @@ void max7456DrawScreen(void)
__spiBusTransactionEnd(busdev);
#endif // MAX7456_DMA_CHANNEL_TX
}
max7456Lock = false;
}
}
@ -730,17 +726,12 @@ static void max7456DrawScreenSlow(void)
// should not be used when armed
void max7456RefreshAll(void)
{
if (!max7456Lock) {
#ifdef MAX7456_DMA_CHANNEL_TX
while (dmaTransactionInProgress);
while (dmaTransactionInProgress);
#endif
max7456Lock = true;
max7456ReInitIfRequired();
max7456DrawScreenSlow();
max7456Lock = false;
}
max7456ReInitIfRequired();
max7456DrawScreenSlow();
}
void max7456WriteNvm(uint8_t char_address, const uint8_t *font_data)
@ -748,8 +739,6 @@ void max7456WriteNvm(uint8_t char_address, const uint8_t *font_data)
#ifdef MAX7456_DMA_CHANNEL_TX
while (dmaTransactionInProgress);
#endif
while (max7456Lock);
max7456Lock = true;
__spiBusTransactionBegin(busdev);
// disable display
@ -777,8 +766,6 @@ void max7456WriteNvm(uint8_t char_address, const uint8_t *font_data)
while ((max7456Send(MAX7456ADD_STAT, 0x00) & STAT_NVR_BUSY) != 0x00);
__spiBusTransactionEnd(busdev);
max7456Lock = false;
}
#ifdef MAX7456_NRST_PIN