summaryrefslogtreecommitdiff
path: root/include/i2c_bitbang.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/i2c_bitbang.h')
-rw-r--r--include/i2c_bitbang.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/i2c_bitbang.h b/include/i2c_bitbang.h
index d550f1a582..12486b7ee6 100644
--- a/include/i2c_bitbang.h
+++ b/include/i2c_bitbang.h
@@ -20,6 +20,17 @@ extern const unsigned int i2c_bitbang_ports_used;
*/
void enable_i2c_raw_mode(bool enable);
+/**
+ * Board level function to initialize I2C peripherals before task starts.
+ *
+ * Note: This requires CONFIG_I2C_BITBANG to be enabled, as the task event
+ * based I2C transactions can only be done in bitbang mode if accessed pre-task.
+ *
+ * Example: I/O expanders can be initialized to utilize GPIOs earlier
+ * than the HOOK task starts.
+ */
+__override_proto void board_pre_task_i2c_peripheral_init(void);
+
/* expose static functions for testing */
#ifdef TEST_BUILD
int bitbang_start_cond(const struct i2c_port_t *i2c_port);