mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 09:45:21 +03:00
More audio fix
This commit is contained in:
parent
dd2468eff7
commit
eadf7f42ef
1 changed files with 8 additions and 6 deletions
|
@ -270,17 +270,18 @@ void audioResetDecodeTime(void)
|
||||||
|
|
||||||
uint8_t audioHardReset(void)
|
uint8_t audioHardReset(void)
|
||||||
{
|
{
|
||||||
|
uint8_t retry=0;
|
||||||
|
RST_LOW();
|
||||||
|
delay_ms(20);
|
||||||
XDCS_HIGH();
|
XDCS_HIGH();
|
||||||
CS_HIGH();
|
CS_HIGH();
|
||||||
RST_LOW();
|
|
||||||
delay_ms(100); // 100ms
|
|
||||||
RST_HIGH();
|
RST_HIGH();
|
||||||
|
while (READ_DREQ() == 0 && retry < 200) {
|
||||||
if (!audioWaitDreq(100)) {
|
retry++;
|
||||||
return 0;
|
delay_us(50);
|
||||||
}
|
}
|
||||||
delay_ms(20); // 20ms
|
delay_ms(20); // 20ms
|
||||||
return 1;
|
return retry < 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t audioSoftReset(void)
|
uint8_t audioSoftReset(void)
|
||||||
|
@ -288,6 +289,7 @@ uint8_t audioSoftReset(void)
|
||||||
audioSpiSetSpeed(SPI_SPEED_64);
|
audioSpiSetSpeed(SPI_SPEED_64);
|
||||||
if (!audioWaitDreq(100))
|
if (!audioWaitDreq(100))
|
||||||
{
|
{
|
||||||
|
TRACE("audioSoftReset !audioWaitDreq");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue