aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports
diff options
context:
space:
mode:
authormarcoveeneman <marco-veeneman@hotmail.com>2015-03-22 22:46:09 +0100
committermarcoveeneman <marco-veeneman@hotmail.com>2015-03-22 22:46:09 +0100
commit927cbb1beeaf11a4fa715189aa3060b757f4d67c (patch)
tree07b56fe79966317bfe567a6e2244796ba4e47209 /os/hal/ports
parent2d6792780aa9427dafb94bc15f3bbd43a69b48bb (diff)
downloadChibiOS-Contrib-927cbb1beeaf11a4fa715189aa3060b757f4d67c.tar.gz
ChibiOS-Contrib-927cbb1beeaf11a4fa715189aa3060b757f4d67c.tar.bz2
ChibiOS-Contrib-927cbb1beeaf11a4fa715189aa3060b757f4d67c.zip
Tiva tickless mode is working for 16 bit timers too. Typecasting was not correct before.
Diffstat (limited to 'os/hal/ports')
-rw-r--r--os/hal/ports/TIVA/LLD/st_lld.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/ports/TIVA/LLD/st_lld.h b/os/hal/ports/TIVA/LLD/st_lld.h
index fd6dc80..bec1a36 100644
--- a/os/hal/ports/TIVA/LLD/st_lld.h
+++ b/os/hal/ports/TIVA/LLD/st_lld.h
@@ -197,7 +197,7 @@ extern "C" {
*/
static inline systime_t st_lld_get_counter(void)
{
- return (systime_t) 0xffffffff - TIVA_ST_TIM->TAR;
+ return (systime_t) (((systime_t) 0xffffffff) - TIVA_ST_TIM->TAR);
}
/**
@@ -211,7 +211,7 @@ static inline systime_t st_lld_get_counter(void)
*/
static inline void st_lld_start_alarm(systime_t time)
{
- TIVA_ST_TIM->TAMATCHR = (uint32_t) 0xffffffff - time;
+ TIVA_ST_TIM->TAMATCHR = (systime_t) (((systime_t) 0xffffffff) - time);
TIVA_ST_TIM->ICR = TIVA_ST_TIM->MIS;
TIVA_ST_TIM->IMR = GPTM_IMR_TAMIM;
}
@@ -235,7 +235,7 @@ static inline void st_lld_stop_alarm(void)
*/
static inline void st_lld_set_alarm(systime_t time)
{
- TIVA_ST_TIM->TAMATCHR = (uint32_t) (0xffffffff - time);
+ TIVA_ST_TIM->TAMATCHR = (systime_t) (((systime_t) 0xffffffff) - time);
}
/**
@@ -247,7 +247,7 @@ static inline void st_lld_set_alarm(systime_t time)
*/
static inline systime_t st_lld_get_alarm(void)
{
- return (systime_t) (0xffffffff - TIVA_ST_TIM->TAMATCHR);
+ return (systime_t) (((systime_t)0xffffffff) - TIVA_ST_TIM->TAMATCHR);
}
/**