22 static const CnvParams _hex = CNV_DEFAULT_HEX;
24 const char cmd_busrd_help[] =
"Read one or more bus addresses: busrd <addr> [<count>]";
26 bool cmd_busrd_exec(
int argc,
const char *args[])
32 puts(
"busrd <addr> <count>, addresses in hex (without '0x'), count in integer");
36 count = argc == 1 ? 1 : atoi(args[1]);
38 puts(
"Failed to read count");
42 if (
cnvParseU(args[0], &addr, _hex) == 0) {
43 puts(
"Failed to read hex address");
52 for (i = 0; i < count; i += 4) {
53 printf(
"%08x: %08x\n", addr + i, *((uint32_t *)(addr + i )));
int cnvParseU(const char *input, uint32_t *output, CnvParams params)
Parse an unsigned integer.
This structure provides information about formatting and parsing.
This module implements parsing and formating of strings and integers.