diff --git a/configs/mikroe-stm32f4/src/up_touchscreen.c b/configs/mikroe-stm32f4/src/up_touchscreen.c index 095168c89e0..52edd65de55 100644 --- a/configs/mikroe-stm32f4/src/up_touchscreen.c +++ b/configs/mikroe-stm32f4/src/up_touchscreen.c @@ -156,11 +156,11 @@ /* Delays ***************************************************************************/ /* All values will be increased by one system timer tick (probably 10MS). */ -#define TC_PENUP_POLL_TICKS (70 / MSEC_PER_TICK) /* IDLE polling rate: 100 MSec */ -#define TC_PENDOWN_POLL_TICKS (40 / MSEC_PER_TICK) /* Active polling rate: 60 MSec */ -#define TC_DEBOUNCE_TICKS (16 / MSEC_PER_TICK) /* Delay before re-sampling: 30 MSec */ -#define TC_SAMPLE_TICKS (4 / MSEC_PER_TICK) /* Delay for A/D sampling: 4 MSec */ -#define TC_SETTLE_TICKS (10 / MSEC_PER_TICK) /* Delay for A/D settling: 4 MSec */ +#define TC_PENUP_POLL_TICKS MSEC2TICK(70) /* IDLE polling rate: 70 MSec */ +#define TC_PENDOWN_POLL_TICKS MSEC2TICK(40) /* Active polling rate: 40 MSec */ +#define TC_DEBOUNCE_TICKS MSEC2TICK(16) /* Delay before re-sampling: 16 MSec */ +#define TC_SAMPLE_TICKS MSEC2TICK(4) /* Delay for A/D sampling: 4 MSec */ +#define TC_SETTLE_TICKS MSECT2TICK(10) /* Delay for A/D settling: 10 MSec */ #define TC_RESAMPLE_TICKS TC_SAMPLE_TICKS /************************************************************************************ diff --git a/configs/pic32mx7mmb/src/up_touchscreen.c b/configs/pic32mx7mmb/src/up_touchscreen.c index d29111f6713..99b35151c61 100644 --- a/configs/pic32mx7mmb/src/up_touchscreen.c +++ b/configs/pic32mx7mmb/src/up_touchscreen.c @@ -142,10 +142,10 @@ /* Delays ***************************************************************************/ /* All values will be increased by one system timer tick (probably 10MS). */ -#define TC_PENUP_POLL_TICKS (100 / MSEC_PER_TICK) /* IDLE polling rate: 100 MSec */ -#define TC_PENDOWN_POLL_TICKS (60 / MSEC_PER_TICK) /* Active polling rate: 60 MSec */ -#define TC_DEBOUNCE_TICKS (30 / MSEC_PER_TICK) /* Delay before re-sampling: 30 MSec */ -#define TC_SAMPLE_TICKS (4 / MSEC_PER_TICK) /* Delay for A/D sampling: 4 MSec */ +#define TC_PENUP_POLL_TICKS MSEC2TICK(100) /* IDLE polling rate: 100 MSec */ +#define TC_PENDOWN_POLL_TICKS MSEC2TICK(60) /* Active polling rate: 60 MSec */ +#define TC_DEBOUNCE_TICKS MSEC2TICK(30) /* Delay before re-sampling: 30 MSec */ +#define TC_SAMPLE_TICKS MSEC2TICK(4) /* Delay for A/D sampling: 4 MSec */ #define TC_RESAMPLE_TICKS TC_SAMPLE_TICKS /************************************************************************************ diff --git a/configs/sam4s-xplained-pro/src/sam_tc.c b/configs/sam4s-xplained-pro/src/sam_tc.c index 4012bb80d4f..bad80cc3e4e 100755 --- a/configs/sam4s-xplained-pro/src/sam_tc.c +++ b/configs/sam4s-xplained-pro/src/sam_tc.c @@ -218,8 +218,8 @@ int sam_timerinitialize(void) /* Set the timeout */ - tcvdbg("Interval = %d us.\n", (unsigned long)MSEC_PER_TICK * 1000); - ret = ioctl(fd, TCIOC_SETTIMEOUT, (unsigned long)MSEC_PER_TICK * 1000); + tcvdbg("Interval = %d us.\n", (unsigned long)USEC_PER_TICK); + ret = ioctl(fd, TCIOC_SETTIMEOUT, (unsigned long)USEC_PER_TICK); if (ret < 0) { tcdbg("ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno);