diff options
author | Leo C | 2015-05-30 11:47:03 +0200 |
---|---|---|
committer | Leo C | 2015-05-30 11:47:03 +0200 |
commit | a8eb521f94848a627a3fe470e34f62b13c157d34 (patch) | |
tree | 0e8197a34d71c319644fcf29a90be3953c6b5559 | |
parent | 8590a76bcc7cbe1443abf37498f824a0eab0c8d7 (diff) | |
download | z180-stamp-a8eb521f94848a627a3fe470e34f62b13c157d34.zip |
return timestamp diff
-rw-r--r-- | avr/z180-serv.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/avr/z180-serv.c b/avr/z180-serv.c index c7869a6..af1d8e0 100644 --- a/avr/z180-serv.c +++ b/avr/z180-serv.c @@ -114,10 +114,9 @@ void do_msg_echo(uint8_t subf, int len, uint8_t * msg) /* get timer */ void do_msg_get_timer(uint8_t subf, int len, uint8_t * msg) { - (void)len; (void)msg; - - uint32_t time_ms = get_timer(0); + uint32_t time_ms = (len >= 4) ? *(uint32_t *) msg : 0; + time_ms = get_timer(time_ms); msg_xmit(3, subf, sizeof(time_ms), (uint8_t *) &time_ms); } |