mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 07:15:18 +03:00
Fixed ident style and compilation for targets with MAX on DMA
This commit is contained in:
parent
419547a2bf
commit
bae96d9595
3 changed files with 14 additions and 16 deletions
|
@ -205,7 +205,7 @@ void max7456ReInit(void)
|
||||||
uint8_t maxScreenRows;
|
uint8_t maxScreenRows;
|
||||||
uint8_t srdata = 0;
|
uint8_t srdata = 0;
|
||||||
uint16_t x;
|
uint16_t x;
|
||||||
static uint8_t firstInit = 1;
|
static bool firstInit = true;
|
||||||
|
|
||||||
//do not init MAX before camera power up correctly
|
//do not init MAX before camera power up correctly
|
||||||
if (millis() < 1500)
|
if (millis() < 1500)
|
||||||
|
@ -249,7 +249,7 @@ void max7456ReInit(void)
|
||||||
if (firstInit)
|
if (firstInit)
|
||||||
{
|
{
|
||||||
max7456RefreshAll();
|
max7456RefreshAll();
|
||||||
firstInit = 0;
|
firstInit = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,10 +327,8 @@ void max7456DrawScreen(void)
|
||||||
|
|
||||||
//------------ end of (re)init-------------------------------------
|
//------------ end of (re)init-------------------------------------
|
||||||
|
|
||||||
for (k=0; k< MAX_CHARS2UPDATE; k++)
|
for (k=0; k< MAX_CHARS2UPDATE; k++) {
|
||||||
{
|
if (screenBuffer[pos] != shadowBuffer[pos]) {
|
||||||
if (screenBuffer[pos] != shadowBuffer[pos])
|
|
||||||
{
|
|
||||||
spiBuff[buff_len++] = MAX7456ADD_DMAH;
|
spiBuff[buff_len++] = MAX7456ADD_DMAH;
|
||||||
spiBuff[buff_len++] = pos >> 8;
|
spiBuff[buff_len++] = pos >> 8;
|
||||||
spiBuff[buff_len++] = MAX7456ADD_DMAL;
|
spiBuff[buff_len++] = MAX7456ADD_DMAL;
|
||||||
|
|
|
@ -1143,7 +1143,7 @@ void updateOsd(void)
|
||||||
static uint32_t counter;
|
static uint32_t counter;
|
||||||
#ifdef MAX7456_DMA_CHANNEL_TX
|
#ifdef MAX7456_DMA_CHANNEL_TX
|
||||||
// don't touch buffers if DMA transaction is in progress
|
// don't touch buffers if DMA transaction is in progress
|
||||||
if (max7456_dma_in_progres())
|
if (max7456DmaInProgres())
|
||||||
return;
|
return;
|
||||||
#endif // MAX7456_DMA_CHANNEL_TX
|
#endif // MAX7456_DMA_CHANNEL_TX
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue