修改枚举类名称,添加发送错误帧给app
This commit is contained in:
@@ -211,7 +211,8 @@ void task_thread(void* arg)
|
||||
static size_t end_time = 0;
|
||||
if(start_time - end_time > 2000)
|
||||
{
|
||||
switch(get_protocol_status())
|
||||
sertrf.fc_protocol_status = get_protocol_status();
|
||||
switch(sertrf.fc_protocol_status)
|
||||
{
|
||||
case PROTOCOL_STATUS_OK:
|
||||
// rgb_color_change(1, sertrf.device.last_color);
|
||||
@@ -664,4 +665,11 @@ int stmisp_recv(void* data, uint16_t len, int timeout)
|
||||
int stmisp_get_length(void)
|
||||
{
|
||||
return embedded_device_get_rx_length(&sertrf.device);
|
||||
}
|
||||
|
||||
int app_send_error_code(uint8_t error_code)
|
||||
{
|
||||
sertrf.mode_status.sertrf_error_code = error_code;
|
||||
|
||||
return resend_send_data(&sertrf.resend_device, RESEND_CMD_ERROR_CODE, &sertrf.mode_status.sertrf_error_code, sizeof(sertrf_mode_status_t), 1000);
|
||||
}
|
||||
Reference in New Issue
Block a user