added AD9833 and DS1809 support

This commit is contained in:
Ayzen
2026-02-09 10:28:20 +03:00
parent 7442f4dd3a
commit b1ae9a5e49
25 changed files with 30112 additions and 27513 deletions

View File

@ -481,6 +481,12 @@ void UART_RxCpltCallback(void)
case AD9102_CMD_HEADER: // AD9102 command
UART_rec_incr = 2;//timeout flag is still setting!
break;
case AD9833_CMD_HEADER: // AD9833 command
UART_rec_incr = 2;//timeout flag is still setting!
break;
case DS1809_CMD_HEADER: // DS1809 UC/DC pulse command
UART_rec_incr = 2;//timeout flag is still setting!
break;
default: //error decoding header
UART_rec_incr = 0;
flg_tmt = 0;//Reset the timeout flag
@ -503,6 +509,26 @@ void UART_RxCpltCallback(void)
UART_rec_incr = 0;
flg_tmt = 0;//Reset the timeout flag
}
else if (UART_header == AD9833_CMD_HEADER)
{
if ((UART_rec_incr & 0x0001) > 0)
COMMAND[(UART_rec_incr >> 1) - 1] += ((uint16_t)(uart_buf)) << 8;
else
COMMAND[(UART_rec_incr >> 1) - 1] = (uint16_t)(uart_buf);
CPU_state = AD9833_CMD;
UART_rec_incr = 0;
flg_tmt = 0;//Reset the timeout flag
}
else if (UART_header == DS1809_CMD_HEADER)
{
if ((UART_rec_incr & 0x0001) > 0)
COMMAND[(UART_rec_incr >> 1) - 1] += ((uint16_t)(uart_buf)) << 8;
else
COMMAND[(UART_rec_incr >> 1) - 1] = (uint16_t)(uart_buf);
CPU_state = DS1809_CMD;
UART_rec_incr = 0;
flg_tmt = 0;//Reset the timeout flag
}
else
{
if ((UART_rec_incr&0x0001)>0)