saw AD9102 done

This commit is contained in:
Ayzen
2026-02-03 18:57:12 +03:00
parent bd15847b76
commit fedc27bfa8
31 changed files with 25122 additions and 22131 deletions

View File

@ -475,23 +475,48 @@ void UART_RxCpltCallback(void)
flg_tmt = 0;//Reset the timeout flag
CPU_state = STATE;
break;
case 0x7777:
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
case 0x7777:
UART_rec_incr = 2;//timeout flag is still setting!
break;
case AD9102_CMD_HEADER: // AD9102 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
//UART_transmission_request = MESS_01;
//CPU_state = HALT;
State_Data[0] |= UART_ERR;
CPU_state = DEFAULT_ENABLE;//Parking system and send error state!
break;
}
break;
case (CL_8 - 1):
if (UART_header == 0x1111)
{
break;
case (AD9102_CMD_8 - 1):
if (UART_header == AD9102_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 = AD9102_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;
}
break;
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