X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fhelper%2Fcommand.c;h=5deaee859342ae03ad1fa1e7253ed925faff88f4;hp=bd7113a78cd27d40dca98e3ea0e6c96b6d7a1c63;hb=47b8cf84202bf792cf66fbfa01169e9592236b8a;hpb=d0e763ac7ef6aa17b17bd00ccdfbccfb4eacda69 diff --git a/src/helper/command.c b/src/helper/command.c index bd7113a78c..5deaee8593 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -1173,8 +1173,8 @@ COMMAND_HANDLER(handle_sleep_command) return retval; if (!busy) { - long long then = timeval_ms(); - while (timeval_ms() - then < (long long)duration) { + int64_t then = timeval_ms(); + while (timeval_ms() - then < (int64_t)duration) { target_call_timer_callbacks_now(); usleep(1000); } @@ -1410,6 +1410,8 @@ DEFINE_PARSE_ULONGLONG(_u32, uint32_t, 0, UINT32_MAX) DEFINE_PARSE_ULONGLONG(_u16, uint16_t, 0, UINT16_MAX) DEFINE_PARSE_ULONGLONG(_u8, uint8_t, 0, UINT8_MAX) +DEFINE_PARSE_ULONGLONG(_target_addr, target_addr_t, 0, TARGET_ADDR_MAX) + #define DEFINE_PARSE_LONGLONG(name, type, min, max) \ DEFINE_PARSE_WRAPPER(name, type, min, max, long long, _llong) DEFINE_PARSE_LONGLONG(_int, int, n < INT_MIN, INT_MAX)