summaryrefslogtreecommitdiff
path: root/include/task.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2019-03-11 15:57:52 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-03-26 04:42:55 -0700
commitbb266fc26fc05d4ab22de6ad7bce5b477c9f9140 (patch)
treef6ada087f62246c3a9547e649ac8846b0ed6d5ab /include/task.h
parent0bfc511527cf2aebfa163c63a1d028419ca0b0c3 (diff)
downloadchrome-ec-bb266fc26fc05d4ab22de6ad7bce5b477c9f9140.tar.gz
common: replace 1 << digits, with BIT(digits)
Requested for linux integration, use BIT instead of 1 << First step replace bit operation with operand containing only digits. Fix an error in motion_lid try to set bit 31 of a signed integer. BUG=None BRANCH=None TEST=compile Change-Id: Ie843611f2f68e241f0f40d4067f7ade726951d29 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1518659 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/task.h')
-rw-r--r--include/task.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/task.h b/include/task.h
index 014531721c..74bb7efe64 100644
--- a/include/task.h
+++ b/include/task.h
@@ -16,10 +16,10 @@
/* Tasks may use the bits in TASK_EVENT_CUSTOM for their own events */
#define TASK_EVENT_CUSTOM(x) (x & 0x0003ffff)
-#define TASK_EVENT_PD_AWAKE (1 << 18)
+#define TASK_EVENT_PD_AWAKE BIT(18)
/* npcx peci event */
-#define TASK_EVENT_PECI_DONE (1 << 19)
+#define TASK_EVENT_PECI_DONE BIT(19)
/* I2C tx/rx interrupt handler completion event. */
#ifdef CHIP_STM32
@@ -33,19 +33,19 @@
#endif
#endif
#else
-#define TASK_EVENT_I2C_IDLE (1 << 20)
+#define TASK_EVENT_I2C_IDLE BIT(20)
#endif
/* DMA transmit complete event */
-#define TASK_EVENT_DMA_TC (1 << 26)
+#define TASK_EVENT_DMA_TC BIT(26)
/* ADC interrupt handler event */
-#define TASK_EVENT_ADC_DONE (1 << 27)
+#define TASK_EVENT_ADC_DONE BIT(27)
/* task_reset() that was requested has been completed */
-#define TASK_EVENT_RESET_DONE (1 << 28)
+#define TASK_EVENT_RESET_DONE BIT(28)
/* task_wake() called on task */
-#define TASK_EVENT_WAKE (1 << 29)
+#define TASK_EVENT_WAKE BIT(29)
/* Mutex unlocking */
-#define TASK_EVENT_MUTEX (1 << 30)
+#define TASK_EVENT_MUTEX BIT(30)
/*
* Timer expired. For example, task_wait_event() timed out before receiving
* another event.