Fixed ident style and compilation for targets with MAX on DMA
This commit is contained in:
parent
419547a2bf
commit
bae96d9595
|
@ -205,7 +205,7 @@ void max7456ReInit(void)
|
|||
uint8_t maxScreenRows;
|
||||
uint8_t srdata = 0;
|
||||
uint16_t x;
|
||||
static uint8_t firstInit = 1;
|
||||
static bool firstInit = true;
|
||||
|
||||
//do not init MAX before camera power up correctly
|
||||
if (millis() < 1500)
|
||||
|
@ -249,7 +249,7 @@ void max7456ReInit(void)
|
|||
if (firstInit)
|
||||
{
|
||||
max7456RefreshAll();
|
||||
firstInit = 0;
|
||||
firstInit = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -327,10 +327,8 @@ void max7456DrawScreen(void)
|
|||
|
||||
//------------ end of (re)init-------------------------------------
|
||||
|
||||
for (k=0; k< MAX_CHARS2UPDATE; k++)
|
||||
{
|
||||
if (screenBuffer[pos] != shadowBuffer[pos])
|
||||
{
|
||||
for (k=0; k< MAX_CHARS2UPDATE; k++) {
|
||||
if (screenBuffer[pos] != shadowBuffer[pos]) {
|
||||
spiBuff[buff_len++] = MAX7456ADD_DMAH;
|
||||
spiBuff[buff_len++] = pos >> 8;
|
||||
spiBuff[buff_len++] = MAX7456ADD_DMAL;
|
||||
|
|
|
@ -35,15 +35,15 @@
|
|||
#define VM1_REG 0x01
|
||||
|
||||
// video mode register 0 bits
|
||||
#define VIDEO_BUFFER_DISABLE 0x01
|
||||
#define MAX7456_RESET 0x02
|
||||
#define VERTICAL_SYNC_NEXT_VSYNC 0x04
|
||||
#define OSD_ENABLE 0x08
|
||||
#define SYNC_MODE_AUTO 0x00
|
||||
#define SYNC_MODE_INTERNAL 0x30
|
||||
#define SYNC_MODE_EXTERNAL 0x20
|
||||
#define VIDEO_MODE_PAL 0x40
|
||||
#define VIDEO_MODE_NTSC 0x00
|
||||
#define VIDEO_BUFFER_DISABLE 0x01
|
||||
#define MAX7456_RESET 0x02
|
||||
#define VERTICAL_SYNC_NEXT_VSYNC 0x04
|
||||
#define OSD_ENABLE 0x08
|
||||
#define SYNC_MODE_AUTO 0x00
|
||||
#define SYNC_MODE_INTERNAL 0x30
|
||||
#define SYNC_MODE_EXTERNAL 0x20
|
||||
#define VIDEO_MODE_PAL 0x40
|
||||
#define VIDEO_MODE_NTSC 0x00
|
||||
|
||||
// video mode register 1 bits
|
||||
|
||||
|
|
|
@ -1143,7 +1143,7 @@ void updateOsd(void)
|
|||
static uint32_t counter;
|
||||
#ifdef MAX7456_DMA_CHANNEL_TX
|
||||
// don't touch buffers if DMA transaction is in progress
|
||||
if (max7456_dma_in_progres())
|
||||
if (max7456DmaInProgres())
|
||||
return;
|
||||
#endif // MAX7456_DMA_CHANNEL_TX
|
||||
|
||||
|
|
Loading…
Reference in New Issue