diff options
| author | liruncong <[email protected]> | 2018-09-10 19:40:08 +0800 |
|---|---|---|
| committer | liruncong <[email protected]> | 2018-09-10 19:40:08 +0800 |
| commit | 7b788014f78ef6a2f38f8c26824df7127a4db42b (patch) | |
| tree | 3136b6b6d9e2d20d8d712b22265b51aad6657c42 /components/drivers/cputime | |
| parent | 95c36f32e20b9799907890cbb6d366ad783501b1 (diff) | |
修正drivers下,armclang编译时的警告或错误 注:vcom_tx_thread_entry下, if(!res & CDC_TX_HAS_DATE)应为bug.
Diffstat (limited to 'components/drivers/cputime')
| -rw-r--r-- | components/drivers/cputime/cputime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/cputime/cputime.c b/components/drivers/cputime/cputime.c index 20f41b6dac..0c260f13bd 100644 --- a/components/drivers/cputime/cputime.c +++ b/components/drivers/cputime/cputime.c @@ -68,7 +68,7 @@ uint32_t clock_cpu_microsecond(uint32_t cpu_tick) { float unit = clock_cpu_getres(); - return (cpu_tick * unit) / 1000; + return (uint32_t)((cpu_tick * unit) / 1000); } /** @@ -83,7 +83,7 @@ uint32_t clock_cpu_millisecond(uint32_t cpu_tick) { float unit = clock_cpu_getres(); - return (cpu_tick * unit) / (1000 * 1000); + return (uint32_t)((cpu_tick * unit) / (1000 * 1000)); } /** |
