From e17a99cb1eb9eecfc48e06556997d67f88d37896 Mon Sep 17 00:00:00 2001 From: ligd Date: Thu, 23 May 2024 22:10:30 +0800 Subject: [PATCH 1/2] compiler: add HAVE_EXPRESSION_STATEMENT macro for gcc this will open fast version of div_const which defined in: include/nuttx/lib/math32.h when meet 64/32 when use gcc compiling Signed-off-by: ligd --- arch/risc-v/src/esp32c3-legacy/esp32c3_ble_adapter.c | 6 +++--- arch/risc-v/src/esp32c3/esp_ble_adapter.c | 6 +++--- arch/xtensa/src/esp32/esp32_ble_adapter.c | 6 +++--- arch/xtensa/src/esp32s3/esp32s3_ble_adapter.c | 6 +++--- include/nuttx/compiler.h | 6 ++++++ 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/arch/risc-v/src/esp32c3-legacy/esp32c3_ble_adapter.c b/arch/risc-v/src/esp32c3-legacy/esp32c3_ble_adapter.c index 75a7b72fe3930..e838064a4c41f 100644 --- a/arch/risc-v/src/esp32c3-legacy/esp32c3_ble_adapter.c +++ b/arch/risc-v/src/esp32c3-legacy/esp32c3_ble_adapter.c @@ -913,6 +913,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) { int ret; struct bt_sem_s *bt_sem = (struct bt_sem_s *)semphr; + uint32_t tick = MSEC2TICK(block_time_ms); if (block_time_ms == OSI_FUNCS_TIME_BLOCKING) { @@ -922,7 +923,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) { if (block_time_ms > 0) { - ret = nxsem_tickwait(&bt_sem->sem, MSEC2TICK(block_time_ms)); + ret = nxsem_tickwait(&bt_sem->sem, tick); } else { @@ -932,8 +933,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) if (ret) { - wlerr("ERROR: Failed to wait sem in %lu ticks. Error=%d\n", - MSEC2TICK(block_time_ms), ret); + wlerr("ERROR: Failed to wait sem in %lu ticks. Error=%d\n", tick, ret); } return esp_errno_trans(ret); diff --git a/arch/risc-v/src/esp32c3/esp_ble_adapter.c b/arch/risc-v/src/esp32c3/esp_ble_adapter.c index 5122aa6a597c9..38da6b3f84847 100644 --- a/arch/risc-v/src/esp32c3/esp_ble_adapter.c +++ b/arch/risc-v/src/esp32c3/esp_ble_adapter.c @@ -1052,6 +1052,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) { int ret; struct bt_sem_s *bt_sem = (struct bt_sem_s *)semphr; + uint32_t tick = MSEC2TICK(block_time_ms); if (block_time_ms == OSI_FUNCS_TIME_BLOCKING) { @@ -1061,7 +1062,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) { if (block_time_ms > 0) { - ret = nxsem_tickwait(&bt_sem->sem, MSEC2TICK(block_time_ms)); + ret = nxsem_tickwait(&bt_sem->sem, tick); } else { @@ -1071,8 +1072,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) if (ret) { - wlerr("ERROR: Failed to wait sem in %lu ticks. Error=%d\n", - MSEC2TICK(block_time_ms), ret); + wlerr("ERROR: Failed to wait sem in %lu ticks. Error=%d\n", tick, ret); } return esp_errno_trans(ret); diff --git a/arch/xtensa/src/esp32/esp32_ble_adapter.c b/arch/xtensa/src/esp32/esp32_ble_adapter.c index 253a407b4d47f..7cae6decc96ab 100644 --- a/arch/xtensa/src/esp32/esp32_ble_adapter.c +++ b/arch/xtensa/src/esp32/esp32_ble_adapter.c @@ -1115,6 +1115,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) { int ret; struct bt_sem_s *bt_sem = (struct bt_sem_s *)semphr; + uint32_t tick = MSEC2TICK(block_time_ms); if (block_time_ms == OSI_FUNCS_TIME_BLOCKING) { @@ -1124,7 +1125,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) { if (block_time_ms > 0) { - ret = nxsem_tickwait(&bt_sem->sem, MSEC2TICK(block_time_ms)); + ret = nxsem_tickwait(&bt_sem->sem, tick); } else { @@ -1134,8 +1135,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) if (ret) { - wlerr("ERROR: Failed to wait sem in %u ticks. Error=%d\n", - MSEC2TICK(block_time_ms), ret); + wlerr("ERROR: Failed to wait sem in %u ticks. Error=%d\n", tick, ret); } return esp_errno_trans(ret); diff --git a/arch/xtensa/src/esp32s3/esp32s3_ble_adapter.c b/arch/xtensa/src/esp32s3/esp32s3_ble_adapter.c index efcefc48d52d7..6e7cc957ece80 100644 --- a/arch/xtensa/src/esp32s3/esp32s3_ble_adapter.c +++ b/arch/xtensa/src/esp32s3/esp32s3_ble_adapter.c @@ -1043,6 +1043,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) { int ret; struct bt_sem_s *bt_sem = (struct bt_sem_s *)semphr; + uint32_t tick = MSEC2TICK(block_time_ms); if (block_time_ms == OSI_FUNCS_TIME_BLOCKING) { @@ -1052,7 +1053,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) { if (block_time_ms > 0) { - ret = nxsem_tickwait(&bt_sem->sem, MSEC2TICK(block_time_ms)); + ret = nxsem_tickwait(&bt_sem->sem, tick); } else { @@ -1062,8 +1063,7 @@ static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) if (ret) { - wlerr("ERROR: Failed to wait sem in %u ticks. Error=%d\n", - MSEC2TICK(block_time_ms), ret); + wlerr("ERROR: Failed to wait sem in %u ticks. Error=%d\n", tick, ret); } return esp_errno_trans(ret); diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index 4a2d4f7249c0e..1155e4168aa86 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -559,6 +559,12 @@ # define tz_nonsecure_call __attribute__((cmse_nonsecure_call)) # endif +/* GCC support expression statement, a compound statement enclosed in + * parentheses may appear as an expression in GNU C. + */ + +# define CONFIG_HAVE_EXPRESSION_STATEMENT 1 + /* SDCC-specific definitions ************************************************/ #elif defined(SDCC) || defined(__SDCC) From 8c4cf50fcc41d332973dc6eb465698905325dd29 Mon Sep 17 00:00:00 2001 From: ligd Date: Tue, 5 Nov 2024 14:19:56 +0800 Subject: [PATCH 2/2] boards: fix compile failed In file included from /home/ligd/platform/mainline/nuttx/include/nuttx/clock.h:38, from sam_automount.c:35: sam_automount.c:92:19: error: braced-group within expression allowed only inside a function 92 | .ddelay = MSEC2TICK(CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_DDELAY), | ^~~~~~~~~ sam_automount.c:93:19: error: braced-group within expression allowed only inside a function 93 | .udelay = MSEC2TICK(CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY), | ^~~~~~~~~ Signed-off-by: ligd --- boards/arm/cxd56xx/spresense/src/cxd56_automount.c | 4 ++-- boards/arm/kinetis/freedom-k28f/src/k28_automount.c | 4 ++-- boards/arm/kinetis/freedom-k64f/src/k64_automount.c | 4 ++-- boards/arm/kinetis/freedom-k66f/src/k66_automount.c | 4 ++-- boards/arm/kinetis/twr-k64f120m/src/k64_automount.c | 4 ++-- boards/arm/sama5/sama5d4-ek/src/sam_automount.c | 8 ++++---- boards/arm/samd5e5/metro-m4/src/sam_automount.c | 4 ++-- boards/arm/samv7/common/src/sam_automount.c | 4 ++-- boards/arm/stm32/clicker2-stm32/src/stm32_automount.c | 8 ++++---- boards/risc-v/litex/arty_a7/src/litex_automount.c | 6 ++---- include/nuttx/clock.h | 2 ++ 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_automount.c b/boards/arm/cxd56xx/spresense/src/cxd56_automount.c index 110c200bc46f2..3b514080fcc3d 100644 --- a/boards/arm/cxd56xx/spresense/src/cxd56_automount.c +++ b/boards/arm/cxd56xx/spresense/src/cxd56_automount.c @@ -89,8 +89,8 @@ static const struct cxd56_automount_config_s g_sdcard0config = .fstype = CONFIG_CXD56_SDCARD_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_CXD56_SDCARD_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_CXD56_SDCARD_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK(CONFIG_CXD56_SDCARD_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK(CONFIG_CXD56_SDCARD_AUTOMOUNT_UDELAY), + .ddelay = MSEC2TICK_SLOW(CONFIG_CXD56_SDCARD_AUTOMOUNT_DDELAY), + .udelay = MSEC2TICK_SLOW(CONFIG_CXD56_SDCARD_AUTOMOUNT_UDELAY), .attach = sdcard_attach, .enable = sdcard_enable, .inserted = sdcard_inserted diff --git a/boards/arm/kinetis/freedom-k28f/src/k28_automount.c b/boards/arm/kinetis/freedom-k28f/src/k28_automount.c index aa713ee50376d..26c0c77672c51 100644 --- a/boards/arm/kinetis/freedom-k28f/src/k28_automount.c +++ b/boards/arm/kinetis/freedom-k28f/src/k28_automount.c @@ -87,8 +87,8 @@ static const struct k28_automount_config_s g_sdhc_config = .fstype = CONFIG_FRDMK28F_SDHC_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_FRDMK28F_SDHC_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_FRDMK28F_SDHC_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK(CONFIG_FRDMK28F_SDHC_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK(CONFIG_FRDMK28F_SDHC_AUTOMOUNT_UDELAY), + .ddelay = MSEC2TICKSLOW(CONFIG_FRDMK28F_SDHC_AUTOMOUNT_DDELAY), + .udelay = MSEC2TICKSLOW(CONFIG_FRDMK28F_SDHC_AUTOMOUNT_UDELAY), .attach = k28_sdhc_attach, .enable = k28_sdhc_enable, .inserted = k28_sdhc_inserted diff --git a/boards/arm/kinetis/freedom-k64f/src/k64_automount.c b/boards/arm/kinetis/freedom-k64f/src/k64_automount.c index 35efbe25192d5..904a7e2f45fab 100644 --- a/boards/arm/kinetis/freedom-k64f/src/k64_automount.c +++ b/boards/arm/kinetis/freedom-k64f/src/k64_automount.c @@ -87,8 +87,8 @@ static const struct k64_automount_config_s g_sdhc_config = .fstype = CONFIG_FRDMK64F_SDHC_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_FRDMK64F_SDHC_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_FRDMK64F_SDHC_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK(CONFIG_FRDMK64F_SDHC_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK(CONFIG_FRDMK64F_SDHC_AUTOMOUNT_UDELAY), + .ddelay = MSEC2TICKSLOW(CONFIG_FRDMK64F_SDHC_AUTOMOUNT_DDELAY), + .udelay = MSEC2TICKSLOW(CONFIG_FRDMK64F_SDHC_AUTOMOUNT_UDELAY), .attach = k64_attach, .enable = k64_enable, .inserted = k64_inserted diff --git a/boards/arm/kinetis/freedom-k66f/src/k66_automount.c b/boards/arm/kinetis/freedom-k66f/src/k66_automount.c index 397fcd4e0e618..27124f14a5d67 100644 --- a/boards/arm/kinetis/freedom-k66f/src/k66_automount.c +++ b/boards/arm/kinetis/freedom-k66f/src/k66_automount.c @@ -87,8 +87,8 @@ static const struct k66_automount_config_s g_sdhc_config = .fstype = CONFIG_FRDMK66F_SDHC_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_FRDMK66F_SDHC_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_FRDMK66F_SDHC_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK(CONFIG_FRDMK66F_SDHC_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK(CONFIG_FRDMK66F_SDHC_AUTOMOUNT_UDELAY), + .ddelay = MSEC2TICKSLOW(CONFIG_FRDMK66F_SDHC_AUTOMOUNT_DDELAY), + .udelay = MSEC2TICKSLOW(CONFIG_FRDMK66F_SDHC_AUTOMOUNT_UDELAY), .attach = k66_attach, .enable = k66_enable, .inserted = k66_inserted diff --git a/boards/arm/kinetis/twr-k64f120m/src/k64_automount.c b/boards/arm/kinetis/twr-k64f120m/src/k64_automount.c index 943c2ab091aeb..186de398fc9ba 100644 --- a/boards/arm/kinetis/twr-k64f120m/src/k64_automount.c +++ b/boards/arm/kinetis/twr-k64f120m/src/k64_automount.c @@ -87,8 +87,8 @@ static const struct k64_automount_config_s g_sdhc_config = .fstype = CONFIG_TWR_K64F120M_SDHC_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_TWR_K64F120M_SDHC_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_TWR_K64F120M_SDHC_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK(CONFIG_TWR_K64F120M_SDHC_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK(CONFIG_TWR_K64F120M_SDHC_AUTOMOUNT_UDELAY), + .ddelay = MSEC2TICKSLOW(CONFIG_TWR_K64F120M_SDHC_AUTOMOUNT_DDELAY), + .udelay = MSEC2TICKSLOW(CONFIG_TWR_K64F120M_SDHC_AUTOMOUNT_UDELAY), .attach = k64_attach, .enable = k64_enable, .inserted = k64_inserted diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_automount.c b/boards/arm/sama5/sama5d4-ek/src/sam_automount.c index 737c6324738e2..d38e789f38930 100644 --- a/boards/arm/sama5/sama5d4-ek/src/sam_automount.c +++ b/boards/arm/sama5/sama5d4-ek/src/sam_automount.c @@ -89,8 +89,8 @@ static const struct sam_automount_config_s g_hsmci0config = .fstype = CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK(CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK(CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY), + .ddelay = MSEC2TICKSLOW(CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_DDELAY), + .udelay = MSEC2TICKSLOW(CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY), .attach = sam_attach, .enable = sam_enable, .inserted = sam_inserted @@ -109,8 +109,8 @@ static const struct sam_automount_config_s g_hsmci1config = .fstype = CONFIG_SAMA5D4EK_HSMCI1_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_SAMA5D4EK_HSMCI1_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_SAMA5D4EK_HSMCI1_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK(CONFIG_SAMA5D4EK_HSMCI1_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK(CONFIG_SAMA5D4EK_HSMCI1_AUTOMOUNT_UDELAY), + .ddelay = MSEC2TICK_SLOW(CONFIG_SAMA5D4EK_HSMCI1_AUTOMOUNT_DDELAY), + .udelay = MSEC2TICK_SLOW(CONFIG_SAMA5D4EK_HSMCI1_AUTOMOUNT_UDELAY), .attach = sam_attach, .enable = sam_enable, .inserted = sam_inserted diff --git a/boards/arm/samd5e5/metro-m4/src/sam_automount.c b/boards/arm/samd5e5/metro-m4/src/sam_automount.c index d20cf39a60c0f..1b92df9988eb2 100644 --- a/boards/arm/samd5e5/metro-m4/src/sam_automount.c +++ b/boards/arm/samd5e5/metro-m4/src/sam_automount.c @@ -89,8 +89,8 @@ static const struct sam_automount_config_s g_port0config = .fstype = CONFIG_METRO_M4_USB_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_METRO_M4_USB_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_METRO_M4_USB_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK(CONFIG_METRO_M4_USB_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK(CONFIG_METRO_M4_USB_AUTOMOUNT_UDELAY), + .ddelay = MSEC2TICKSLOW(CONFIG_METRO_M4_USB_AUTOMOUNT_DDELAY), + .udelay = MSEC2TICKSLOW(CONFIG_METRO_M4_USB_AUTOMOUNT_UDELAY), .attach = sam_attach, .enable = sam_enable, .inserted = sam_inserted diff --git a/boards/arm/samv7/common/src/sam_automount.c b/boards/arm/samv7/common/src/sam_automount.c index bcd711544678a..908d5d5086c6c 100644 --- a/boards/arm/samv7/common/src/sam_automount.c +++ b/boards/arm/samv7/common/src/sam_automount.c @@ -92,8 +92,8 @@ static const struct sam_automount_config_s g_hsmci0config = .fstype = CONFIG_SAMV7_HSMCI0_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_SAMV7_HSMCI0_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_SAMV7_HSMCI0_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK(CONFIG_SAMV7_HSMCI0_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK(CONFIG_SAMV7_HSMCI0_AUTOMOUNT_UDELAY), + .ddelay = MSEC2TICK_SLOW(CONFIG_SAMV7_HSMCI0_AUTOMOUNT_DDELAY), + .udelay = MSEC2TICK_SLOW(CONFIG_SAMV7_HSMCI0_AUTOMOUNT_UDELAY), .attach = sam_attach, .enable = sam_enable, .inserted = sam_inserted diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_automount.c b/boards/arm/stm32/clicker2-stm32/src/stm32_automount.c index cd8efd2bd15e6..72ed2a8c83653 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_automount.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_automount.c @@ -93,9 +93,9 @@ static const struct stm32_automount_config_s g_mb1_mmcsdconfig = .fstype = CONFIG_CLICKER2_STM32_MB1_MMCSD_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_CLICKER2_STM32_MB1_MMCSD_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_CLICKER2_STM32_MB1_MMCSD_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK( + .ddelay = MSEC2TICKSLOW( CONFIG_CLICKER2_STM32_MB1_MMCSD_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK( + .udelay = MSEC2TICKSLOW( CONFIG_CLICKER2_STM32_MB1_MMCSD_AUTOMOUNT_UDELAY), .attach = stm32_attach, .enable = stm32_enable, @@ -115,9 +115,9 @@ static const struct stm32_automount_config_s g_mb2_mmcsdconfig = .fstype = CONFIG_CLICKER2_STM32_MB2_MMCSD_AUTOMOUNT_FSTYPE, .blockdev = CONFIG_CLICKER2_STM32_MB2_MMCSD_AUTOMOUNT_BLKDEV, .mountpoint = CONFIG_CLICKER2_STM32_MB2_MMCSD_AUTOMOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK( + .ddelay = MSEC2TICKSLOW( CONFIG_CLICKER2_STM32_MB2_MMCSD_AUTOMOUNT_DDELAY), - .udelay = MSEC2TICK( + .udelay = MSEC2TICKSLOW( CONFIG_CLICKER2_STM32_MB2_MMCSD_AUTOMOUNT_UDELAY), .attach = stm32_attach, .enable = stm32_enable, diff --git a/boards/risc-v/litex/arty_a7/src/litex_automount.c b/boards/risc-v/litex/arty_a7/src/litex_automount.c index 4abdce06b87e1..c6f690a397889 100644 --- a/boards/risc-v/litex/arty_a7/src/litex_automount.c +++ b/boards/risc-v/litex/arty_a7/src/litex_automount.c @@ -93,10 +93,8 @@ static const struct litex_automount_config_s g_mb1_mmcsdconfig = .fstype = CONFIG_LITEX_SDIO_MOUNT_FSTYPE, .blockdev = CONFIG_LITEX_SDIO_MOUNT_BLKDEV, .mountpoint = CONFIG_LITEX_SDIO_MOUNT_MOUNTPOINT, - .ddelay = MSEC2TICK( - 100), - .udelay = MSEC2TICK( - 100), + .ddelay = MSEC2TICKSLOW(100), + .udelay = MSEC2TICKSLOW(100), .attach = litex_attach, .enable = litex_enable, .inserted = litex_inserted diff --git a/include/nuttx/clock.h b/include/nuttx/clock.h index 74b55d2ad5f25..26deb373087b1 100644 --- a/include/nuttx/clock.h +++ b/include/nuttx/clock.h @@ -185,8 +185,10 @@ #if (MSEC_PER_TICK * USEC_PER_MSEC) == USEC_PER_TICK # define MSEC2TICK(msec) div_const_roundup(msec, MSEC_PER_TICK) +# define MSEC2TICKSLOW(msec) (((msec)+(MSEC_PER_TICK/2))/MSEC_PER_TICK) #else # define MSEC2TICK(msec) USEC2TICK((msec) * USEC_PER_MSEC) +# define MSEC2TICKSLOW(msec) USEC2TICK((msec) * USEC_PER_MSEC) #endif #define DSEC2TICK(dsec) MSEC2TICK((dsec) * MSEC_PER_DSEC)