summaryrefslogtreecommitdiff
path: root/include/task.h
diff options
context:
space:
mode:
authorNick Sanders <nsanders@chromium.org>2016-07-26 13:17:09 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-17 16:19:07 -0700
commit6fcd163da5169bfca36ab8c15cfd9d0624acae19 (patch)
treecc1e3cd999fa3df95547356e8160fd966aa26bc3 /include/task.h
parent6fad4f8588242cd6202e1177e145073c6aff6b7a (diff)
downloadchrome-ec-6fcd163da5169bfca36ab8c15cfd9d0624acae19.tar.gz
stm32f446e-eval: add support for stm32f446
This adds basic support for the stm32f446. This consists of: * New DMA model for stm32f4 * New clock domain support. * MCO oscillator gpio export support. * Flash support for irregular blocks. BUG=chromium:608039 TEST=boots w/ correct clock, stm32f0 also boots. BRANCH=None Change-Id: I1c5cf6ddca09009c9dac60da8a3d0c5ceedfcf4d Signed-off-by: Nick Sanders <nsanders@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/363992 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/task.h')
-rw-r--r--include/task.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/task.h b/include/task.h
index a1b133b986..e177bae546 100644
--- a/include/task.h
+++ b/include/task.h
@@ -13,13 +13,26 @@
/* Task event bitmasks */
/* Tasks may use the bits in TASK_EVENT_CUSTOM for their own events */
-#define TASK_EVENT_CUSTOM(x) (x & 0x03ffffff)
+#define TASK_EVENT_CUSTOM(x) (x & 0x0007ffff)
+
+/* npcx peci event */
+#define TASK_EVENT_PECI_DONE (1 << 19)
+
+/* I2C tx/rx interrupt handler completion event. */
+#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
+
/* DMA transmit complete event */
#define TASK_EVENT_DMA_TC (1 << 26)
/* ADC interrupt handler event */
#define TASK_EVENT_ADC_DONE (1 << 27)
-/* I2C interrupt handler event */
-#define TASK_EVENT_I2C_IDLE (1 << 28)
/* task_wake() called on task */
#define TASK_EVENT_WAKE (1 << 29)
/* Mutex unlocking */