mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
Missed 7456 enabled targets
This commit is contained in:
parent
95c844b178
commit
869d639a00
2 changed files with 6 additions and 6 deletions
|
@ -55,11 +55,11 @@ uint8_t max7456_send(uint8_t add, uint8_t data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void max7456_init(uint8_t video_system) {
|
void max7456_init(uint8_t video_system)
|
||||||
|
{
|
||||||
uint8_t max_screen_rows;
|
uint8_t max_screen_rows;
|
||||||
uint8_t srdata = 0;
|
uint8_t srdata = 0;
|
||||||
uint16_t x;
|
uint16_t x;
|
||||||
char buf[LINE];
|
|
||||||
|
|
||||||
#ifdef MAX7456_SPI_CS_PIN
|
#ifdef MAX7456_SPI_CS_PIN
|
||||||
max7456CsPin = IOGetByTag(IO_TAG(MAX7456_SPI_CS_PIN));
|
max7456CsPin = IOGetByTag(IO_TAG(MAX7456_SPI_CS_PIN));
|
||||||
|
@ -68,7 +68,7 @@ void max7456_init(uint8_t video_system) {
|
||||||
IOConfigGPIO(max7456CsPin, SPI_IO_CS_CFG);
|
IOConfigGPIO(max7456CsPin, SPI_IO_CS_CFG);
|
||||||
|
|
||||||
//Minimum spi clock period for max7456 is 100ns (10Mhz)
|
//Minimum spi clock period for max7456 is 100ns (10Mhz)
|
||||||
spiSetDivisor(MAX7456_SPI_INSTANCE, SPI_9MHZ_CLOCK_DIVIDER);
|
spiSetDivisor(MAX7456_SPI_INSTANCE, SPI_CLOCK_STANDARD);
|
||||||
|
|
||||||
delay(1000);
|
delay(1000);
|
||||||
// force soft reset on Max7456
|
// force soft reset on Max7456
|
||||||
|
@ -77,10 +77,10 @@ void max7456_init(uint8_t video_system) {
|
||||||
delay(100);
|
delay(100);
|
||||||
|
|
||||||
srdata = max7456_send(0xA0, 0xFF);
|
srdata = max7456_send(0xA0, 0xFF);
|
||||||
if ((0x01 & srdata) == 0x01){ //PAL
|
if ((0x01 & srdata) == 0x01) { //PAL
|
||||||
video_signal_type = VIDEO_MODE_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;
|
video_signal_type = VIDEO_MODE_NTSC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ static uint32_t reverse32(uint32_t in)
|
||||||
bool rtc6705Init(void)
|
bool rtc6705Init(void)
|
||||||
{
|
{
|
||||||
DISABLE_RTC6705;
|
DISABLE_RTC6705;
|
||||||
spiSetDivisor(RTC6705_SPI_INSTANCE, SPI_0_5625MHZ_CLOCK_DIVIDER);
|
spiSetDivisor(RTC6705_SPI_INSTANCE, SPI_CLOCK_SLOW);
|
||||||
return rtc6705IsReady();
|
return rtc6705IsReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue