Save current local changes

This commit is contained in:
Ayzen
2026-03-13 17:49:58 +03:00
parent db80907a0b
commit eafc328caa
89 changed files with 36315 additions and 34500 deletions

View File

@ -490,6 +490,12 @@ void UART_RxCpltCallback(void)
case STM32_DAC_CMD_HEADER: // STM32 internal DAC command
UART_rec_incr = 2;//timeout flag is still setting!
break;
case AD9102_WAVE_CTRL_HEADER: // AD9102 custom waveform control command
UART_rec_incr = 2;//timeout flag is still setting!
break;
case AD9102_WAVE_DATA_HEADER: // AD9102 custom waveform data packet
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
@ -542,6 +548,16 @@ void UART_RxCpltCallback(void)
UART_rec_incr = 0;
flg_tmt = 0;//Reset the timeout flag
}
else if (UART_header == AD9102_WAVE_CTRL_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 = AD9102_WAVE_CTRL_CMD;
UART_rec_incr = 0;
flg_tmt = 0;//Reset the timeout flag
}
else
{
if ((UART_rec_incr&0x0001)>0)
@ -556,19 +572,29 @@ void UART_RxCpltCallback(void)
case (CL_8 - 1):
if (UART_header == 0x1111)
{
if ((UART_rec_incr & 0x0001) > 0)
COMMAND[(UART_rec_incr >> 1) - 1] += ((uint16_t)(uart_buf)) << 8;
else
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 = DECODE_ENABLE;
UART_rec_incr = 0;
flg_tmt = 0;//Reset the timeout flag
}
else
{
if ((UART_rec_incr&0x0001)>0)
COMMAND[(UART_rec_incr>>1)-1] += ((uint16_t)(uart_buf))<<8;
else
CPU_state = DECODE_ENABLE;
UART_rec_incr = 0;
flg_tmt = 0;//Reset the timeout flag
}
else if (UART_header == AD9102_WAVE_DATA_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 = AD9102_WAVE_DATA_CMD;
UART_rec_incr = 0;
flg_tmt = 0;//Reset the timeout flag
}
else
{
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);
UART_rec_incr++;
UART_transmission_request = NO_MESS;