return ERROR_OK;
}
- switch (strtol(args[1], NULL, 0))
+ uint8_t context_id;
+ COMMAND_PARSE_NUMBER(u8, args[1], context_id);
+ switch (context_id)
{
case 0:
tracemode |= ETMV1_CONTEXTID_NONE;
return ERROR_FAIL;
}
- switch (strtoul(args[1], NULL, 0))
+ uint8_t port_width;
+ COMMAND_PARSE_NUMBER(u8, args[1], port_width);
+ switch (port_width)
{
case 4:
portmode |= ETM_PORT_4BIT;
if (argc >= 2)
{
etm_ctx->image->base_address_set = 1;
- etm_ctx->image->base_address = strtoul(args[1], NULL, 0);
+ COMMAND_PARSE_NUMBER(int, args[1], etm_ctx->image->base_address);
}
else
{
if (argc > 0)
{
- uint32_t new_value = strtoul(args[0], NULL, 0);
+ uint32_t new_value;
+ COMMAND_PARSE_NUMBER(u32, args[0], new_value);
if ((new_value < 2) || (new_value > 100))
{