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;
|
||||||
|
|
|
@ -35,15 +35,15 @@
|
||||||
#define VM1_REG 0x01
|
#define VM1_REG 0x01
|
||||||
|
|
||||||
// video mode register 0 bits
|
// video mode register 0 bits
|
||||||
#define VIDEO_BUFFER_DISABLE 0x01
|
#define VIDEO_BUFFER_DISABLE 0x01
|
||||||
#define MAX7456_RESET 0x02
|
#define MAX7456_RESET 0x02
|
||||||
#define VERTICAL_SYNC_NEXT_VSYNC 0x04
|
#define VERTICAL_SYNC_NEXT_VSYNC 0x04
|
||||||
#define OSD_ENABLE 0x08
|
#define OSD_ENABLE 0x08
|
||||||
#define SYNC_MODE_AUTO 0x00
|
#define SYNC_MODE_AUTO 0x00
|
||||||
#define SYNC_MODE_INTERNAL 0x30
|
#define SYNC_MODE_INTERNAL 0x30
|
||||||
#define SYNC_MODE_EXTERNAL 0x20
|
#define SYNC_MODE_EXTERNAL 0x20
|
||||||
#define VIDEO_MODE_PAL 0x40
|
#define VIDEO_MODE_PAL 0x40
|
||||||
#define VIDEO_MODE_NTSC 0x00
|
#define VIDEO_MODE_NTSC 0x00
|
||||||
|
|
||||||
// video mode register 1 bits
|
// video mode register 1 bits
|
||||||
|
|
||||||
|
|
|
@ -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