summaryrefslogtreecommitdiff
path: root/include/task.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/task.h')
-rw-r--r--include/task.h39
1 files changed, 19 insertions, 20 deletions
diff --git a/include/task.h b/include/task.h
index 0343644437..5010900e59 100644
--- a/include/task.h
+++ b/include/task.h
@@ -1,4 +1,4 @@
-/* Copyright 2012 The Chromium OS Authors. All rights reserved.
+/* Copyright 2012 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -22,48 +22,47 @@
#define TASK_EVENT_SYSJUMP_READY BIT(16)
/* Used to signal that IPC layer is available for sending new data */
-#define TASK_EVENT_IPC_READY BIT(17)
+#define TASK_EVENT_IPC_READY BIT(17)
-#define TASK_EVENT_PD_AWAKE BIT(18)
+#define TASK_EVENT_PD_AWAKE BIT(18)
/* npcx peci event */
-#define TASK_EVENT_PECI_DONE BIT(19)
+#define TASK_EVENT_PECI_DONE BIT(19)
/* I2C tx/rx interrupt handler completion event. */
#ifdef CHIP_STM32
-#define TASK_EVENT_I2C_COMPLETION(port) \
- (1 << ((port) + 20))
-#define TASK_EVENT_I2C_IDLE (TASK_EVENT_I2C_COMPLETION(0))
-#define TASK_EVENT_MAX_I2C 6
+#define TASK_EVENT_I2C_COMPLETION(port) (1 << ((port) + 20))
+#define TASK_EVENT_I2C_IDLE (TASK_EVENT_I2C_COMPLETION(0))
+#define TASK_EVENT_MAX_I2C 6
#ifdef I2C_PORT_COUNT
#if (I2C_PORT_COUNT > TASK_EVENT_MAX_I2C)
#error "Too many i2c ports for i2c events"
#endif
#endif
#else
-#define TASK_EVENT_I2C_IDLE BIT(20)
-#define TASK_EVENT_PS2_DONE BIT(21)
+#define TASK_EVENT_I2C_IDLE BIT(20)
+#define TASK_EVENT_PS2_DONE BIT(21)
#endif
/* DMA transmit complete event */
-#define TASK_EVENT_DMA_TC BIT(26)
+#define TASK_EVENT_DMA_TC BIT(26)
/* ADC interrupt handler event */
-#define TASK_EVENT_ADC_DONE BIT(27)
+#define TASK_EVENT_ADC_DONE BIT(27)
/*
* task_reset() that was requested has been completed
*
* For test-only builds, may be used by some tasks to restart themselves.
*/
-#define TASK_EVENT_RESET_DONE BIT(28)
+#define TASK_EVENT_RESET_DONE BIT(28)
/* task_wake() called on task */
-#define TASK_EVENT_WAKE BIT(29)
+#define TASK_EVENT_WAKE BIT(29)
/* Mutex unlocking */
-#define TASK_EVENT_MUTEX BIT(30)
+#define TASK_EVENT_MUTEX BIT(30)
/*
* Timer expired. For example, task_wait_event() timed out before receiving
* another event.
*/
-#define TASK_EVENT_TIMER (1U << 31)
+#define TASK_EVENT_TIMER (1U << 31)
/* Maximum time for task_wait_event() */
#define TASK_MAX_WAIT_US 0x7fffffff
@@ -402,7 +401,7 @@ typedef struct mutex mutex_t;
* initialize it. We provide the same macro for CrOS EC OS so that we
* can use it in shared code.
*/
-#define K_MUTEX_DEFINE(name) static mutex_t name = { }
+#define K_MUTEX_DEFINE(name) static mutex_t name = {}
/**
* Lock a mutex.
@@ -456,8 +455,8 @@ struct irq_def {
#define IRQ_HANDLER(irqname) CONCAT3(irq_, irqname, _handler)
#define IRQ_HANDLER_OPT(irqname) CONCAT3(irq_, irqname, _handler_optional)
#define DECLARE_IRQ(irq, routine, priority) DECLARE_IRQ_(irq, routine, priority)
-#define DECLARE_IRQ_(irq, routine, priority) \
- static void __keep routine(void); \
+#define DECLARE_IRQ_(irq, routine, priority) \
+ static void __keep routine(void); \
void IRQ_HANDLER_OPT(irq)(void) __attribute__((alias(#routine)))
/* Include ec.irqlist here for compilation dependency */
@@ -468,4 +467,4 @@ struct irq_def {
#endif /* CONFIG_COMMON_RUNTIME */
#endif /* !CONFIG_ZEPHYR */
-#endif /* __CROS_EC_TASK_H */
+#endif /* __CROS_EC_TASK_H */