dap: react properly to unsupported UART commands
Add ID_DAP_UART_* command definitions and react properly to unsupported UART commands. Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no> Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
58d9d889aa
commit
e31cdc00a0
2 changed files with 31 additions and 0 deletions
|
|
@ -922,6 +922,31 @@ static uint16_t dap_process_cmd(struct dap_context *const ctx,
|
|||
retval = 1;
|
||||
*response = DAP_ERROR;
|
||||
break;
|
||||
case ID_DAP_UART_TRANSPORT:
|
||||
LOG_ERR("UART Transport unsupported");
|
||||
retval = 1;
|
||||
*response = DAP_ERROR;
|
||||
break;
|
||||
case ID_DAP_UART_CONFIGURE:
|
||||
LOG_ERR("UART Configure unsupported");
|
||||
retval = 1;
|
||||
*response = DAP_ERROR;
|
||||
break;
|
||||
case ID_DAP_UART_CONTROL:
|
||||
LOG_ERR("UART Control unsupported");
|
||||
retval = 1;
|
||||
*response = DAP_ERROR;
|
||||
break;
|
||||
case ID_DAP_UART_STATUS:
|
||||
LOG_ERR("UART Status unsupported");
|
||||
retval = 1;
|
||||
*response = DAP_ERROR;
|
||||
break;
|
||||
case ID_DAP_UART_TRANSFER:
|
||||
LOG_ERR("UART Transfer unsupported");
|
||||
retval = 1;
|
||||
*response = DAP_ERROR;
|
||||
break;
|
||||
|
||||
default:
|
||||
*(response - 1) = ID_DAP_INVALID;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,12 @@
|
|||
#define ID_DAP_SWO_STATUS 0x1BU
|
||||
#define ID_DAP_SWO_DATA 0x1CU
|
||||
|
||||
#define ID_DAP_UART_TRANSPORT 0x1FU
|
||||
#define ID_DAP_UART_CONFIGURE 0x20U
|
||||
#define ID_DAP_UART_CONTROL 0x22U
|
||||
#define ID_DAP_UART_STATUS 0x23U
|
||||
#define ID_DAP_UART_TRANSFER 0x21U
|
||||
|
||||
#define ID_DAP_QUEUE_COMMANDS 0x7EU
|
||||
#define ID_DAP_EXECUTE_COMMANDS 0x7FU
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue