update uarts
This commit is contained in:
@@ -83,6 +83,12 @@ ErrorCode[0] = -1;
|
||||
|
||||
ErrorCode[0] = 0;
|
||||
break;
|
||||
case 3:
|
||||
Data_len[0] = UART_RX_FIFO_read(&uart7_DBG_rx, Data, y_width);
|
||||
|
||||
ErrorCode[0] = 0;
|
||||
break;
|
||||
|
||||
}
|
||||
#else
|
||||
/* dummy function for generate mex file for sim*/
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*
|
||||
*/
|
||||
/* %%%-SFUNWIZ_wrapper_externs_Changes_BEGIN --- EDIT HERE TO _END */
|
||||
#ifdef HAL_IMPL
|
||||
#define REC_ZONE_LEN (2000)
|
||||
extern uint8_t rec_zone[2][REC_ZONE_LEN];
|
||||
extern int rec_sel;
|
||||
@@ -44,7 +45,7 @@ static int FAT_REC_write(uint8_t *buff, const uint16_t len)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* %%%-SFUNWIZ_wrapper_externs_Changes_END --- EDIT HERE TO _BEGIN */
|
||||
|
||||
@@ -124,6 +125,15 @@ static uint8_T seq_last[16];
|
||||
ErrorCode[0] = 0;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
// TODO write all data to fifo
|
||||
if (sep[0] != seq_last[uart_id[0]] && UART_TX_FIFO_write(&uart7_DBG_tx, (uint8_t *)buff, len[0]))
|
||||
{
|
||||
seq_last[uart_id[0]] = sep[0];
|
||||
ErrorCode[0] = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user