aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/stm32/gdb_if.c
diff options
context:
space:
mode:
authorGareth McMullin2015-03-02 21:59:04 -0800
committerGareth McMullin2015-03-02 21:59:04 -0800
commit3e466f2d23401df610cb0f94a226317c2dc38751 (patch)
tree7225d3f7929044ced05872d0d11dfd3501605603 /src/platforms/stm32/gdb_if.c
parentb07ffffcee53e18051b324eb59a2794044ce6f95 (diff)
Factor out timing routines common to all STM32 targets.
Diffstat (limited to 'src/platforms/stm32/gdb_if.c')
-rw-r--r--src/platforms/stm32/gdb_if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platforms/stm32/gdb_if.c b/src/platforms/stm32/gdb_if.c
index 286c66b..52922e7 100644
--- a/src/platforms/stm32/gdb_if.c
+++ b/src/platforms/stm32/gdb_if.c
@@ -113,7 +113,7 @@ unsigned char gdb_if_getchar(void)
unsigned char gdb_if_getchar_to(int timeout)
{
- timeout_counter = timeout/100;
+ platform_timeout_set(timeout);
if (!(out_ptr < count_out)) do {
/* Detach if port closed */
@@ -121,7 +121,7 @@ unsigned char gdb_if_getchar_to(int timeout)
return 0x04;
gdb_if_update_buf();
- } while(timeout_counter && !(out_ptr < count_out));
+ } while (!platform_timeout_is_expired() && !(out_ptr < count_out));
if(out_ptr < count_out)
return gdb_if_getchar();