From 7e5fc4076aa82ad329aad280e938cdffbb0422e8 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 3 Dec 2022 16:15:20 +0000 Subject: Add INIT_ATTR to i2c_init() It's usually only called from init() in main.c, so this is safe. There is one more call in system-dm320.c from system_init(), but that's also "safe". I don't know if it's okay to call i2c_init() twice, but presumably it works... Change-Id: I9c1cd918d162d9955f7cf03209e836cbd5e30c57 --- firmware/export/i2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/export/i2c.h') diff --git a/firmware/export/i2c.h b/firmware/export/i2c.h index ac9ddba055..21ec809f13 100644 --- a/firmware/export/i2c.h +++ b/firmware/export/i2c.h @@ -21,7 +21,7 @@ #ifndef I2C_H #define I2C_H -extern void i2c_init(void); +extern void i2c_init(void) INIT_ATTR; extern void i2c_begin(void); extern void i2c_end(void); extern int i2c_write(int device, const unsigned char* buf, int count ); -- cgit v1.2.3