summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-12-03 16:15:20 +0000
committerAidan MacDonald <amachronic@protonmail.com>2023-01-12 06:33:50 -0500
commit7e5fc4076aa82ad329aad280e938cdffbb0422e8 (patch)
treedcbafbfc823a9d7226337fd2dbcbccfb4021f372 /firmware/export
parent39439f69094225380af1714e52a5ff145612e70e (diff)
downloadrockbox-7e5fc4076aa82ad329aad280e938cdffbb0422e8.tar.gz
rockbox-7e5fc4076aa82ad329aad280e938cdffbb0422e8.zip
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
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/i2c-coldfire.h2
-rw-r--r--firmware/export/i2c-rk27xx.h2
-rw-r--r--firmware/export/i2c-s5l8700.h2
-rw-r--r--firmware/export/i2c-s5l8702.h2
-rw-r--r--firmware/export/i2c.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/firmware/export/i2c-coldfire.h b/firmware/export/i2c-coldfire.h
index b0d21a8631..f98daf5d5f 100644
--- a/firmware/export/i2c-coldfire.h
+++ b/firmware/export/i2c-coldfire.h
@@ -30,7 +30,7 @@
30 30
31#include "cpu.h" 31#include "cpu.h"
32 32
33void i2c_init(void); 33void i2c_init(void) INIT_ATTR;
34int i2c_read (volatile unsigned char *iface, unsigned char addr, 34int i2c_read (volatile unsigned char *iface, unsigned char addr,
35 unsigned char *buf, int count); 35 unsigned char *buf, int count);
36int i2c_write(volatile unsigned char *iface, unsigned char addr, 36int i2c_write(volatile unsigned char *iface, unsigned char addr,
diff --git a/firmware/export/i2c-rk27xx.h b/firmware/export/i2c-rk27xx.h
index 96baf566a7..d16d4c3dbb 100644
--- a/firmware/export/i2c-rk27xx.h
+++ b/firmware/export/i2c-rk27xx.h
@@ -24,7 +24,7 @@
24 24
25#include "config.h" 25#include "config.h"
26 26
27void i2c_init(void); 27void i2c_init(void) INIT_ATTR;
28int i2c_write(unsigned char slave, int address, int len, const unsigned char *data); 28int i2c_write(unsigned char slave, int address, int len, const unsigned char *data);
29int i2c_read(unsigned char slave, int address, int len, unsigned char *data); 29int i2c_read(unsigned char slave, int address, int len, unsigned char *data);
30 30
diff --git a/firmware/export/i2c-s5l8700.h b/firmware/export/i2c-s5l8700.h
index e6ffcfae55..607f361384 100644
--- a/firmware/export/i2c-s5l8700.h
+++ b/firmware/export/i2c-s5l8700.h
@@ -24,7 +24,7 @@
24 24
25#include "config.h" 25#include "config.h"
26 26
27void i2c_init(void); 27void i2c_init(void) INIT_ATTR;
28int i2c_write(unsigned char slave, int address, int len, const unsigned char *data); 28int i2c_write(unsigned char slave, int address, int len, const unsigned char *data);
29int i2c_read(unsigned char slave, int address, int len, unsigned char *data); 29int i2c_read(unsigned char slave, int address, int len, unsigned char *data);
30 30
diff --git a/firmware/export/i2c-s5l8702.h b/firmware/export/i2c-s5l8702.h
index f671e4059e..a1e7be04b4 100644
--- a/firmware/export/i2c-s5l8702.h
+++ b/firmware/export/i2c-s5l8702.h
@@ -24,7 +24,7 @@
24 24
25#include "config.h" 25#include "config.h"
26 26
27void i2c_init(void); 27void i2c_init(void) INIT_ATTR;
28int i2c_write(int bus, unsigned char slave, int address, int len, const unsigned char *data); 28int i2c_write(int bus, unsigned char slave, int address, int len, const unsigned char *data);
29int i2c_read(int bus, unsigned char slave, int address, int len, unsigned char *data); 29int i2c_read(int bus, unsigned char slave, int address, int len, unsigned char *data);
30 30
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 @@
21#ifndef I2C_H 21#ifndef I2C_H
22#define I2C_H 22#define I2C_H
23 23
24extern void i2c_init(void); 24extern void i2c_init(void) INIT_ATTR;
25extern void i2c_begin(void); 25extern void i2c_begin(void);
26extern void i2c_end(void); 26extern void i2c_end(void);
27extern int i2c_write(int device, const unsigned char* buf, int count ); 27extern int i2c_write(int device, const unsigned char* buf, int count );