mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 23:05:19 +03:00
merge upstream into osd-improvement branch
This commit is contained in:
commit
ea50b3a5b7
317 changed files with 10567 additions and 37394 deletions
|
@ -147,7 +147,8 @@ void MAX7456_DMA_IRQ_HANDLER_FUNCTION (void) {
|
|||
}
|
||||
#endif
|
||||
|
||||
void max7456_init(uint8_t video_system) {
|
||||
void max7456_init(uint8_t video_system)
|
||||
{
|
||||
uint8_t max_screen_rows;
|
||||
uint8_t srdata = 0;
|
||||
uint16_t x;
|
||||
|
@ -159,7 +160,7 @@ void max7456_init(uint8_t video_system) {
|
|||
IOConfigGPIO(max7456CsPin, SPI_IO_CS_CFG);
|
||||
|
||||
//Minimum spi clock period for max7456 is 100ns (10Mhz)
|
||||
spiSetDivisor(MAX7456_SPI_INSTANCE, SPI_STANDARD_CLOCK);
|
||||
spiSetDivisor(MAX7456_SPI_INSTANCE, SPI_CLOCK_STANDARD);
|
||||
|
||||
delay(1000);
|
||||
// force soft reset on Max7456
|
||||
|
@ -168,10 +169,10 @@ void max7456_init(uint8_t video_system) {
|
|||
delay(100);
|
||||
|
||||
srdata = max7456_send(0xA0, 0xFF);
|
||||
if ((0x01 & srdata) == 0x01){ //PAL
|
||||
if ((0x01 & srdata) == 0x01) { //PAL
|
||||
video_signal_type = VIDEO_MODE_PAL;
|
||||
}
|
||||
else if((0x02 & srdata) == 0x02){ //NTSC
|
||||
else if ((0x02 & srdata) == 0x02) { //NTSC
|
||||
video_signal_type = VIDEO_MODE_NTSC;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue