summaryrefslogtreecommitdiff
path: root/firmware/export/i2c-coldfire.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/i2c-coldfire.h')
-rw-r--r--firmware/export/i2c-coldfire.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/export/i2c-coldfire.h b/firmware/export/i2c-coldfire.h
index d4a5781116..544a3169cf 100644
--- a/firmware/export/i2c-coldfire.h
+++ b/firmware/export/i2c-coldfire.h
@@ -26,10 +26,18 @@
26#ifndef _I2C_COLDFIRE_H 26#ifndef _I2C_COLDFIRE_H
27#define _I2C_COLDFIRE_H 27#define _I2C_COLDFIRE_H
28 28
29#include "cpu.h"
30
29void i2c_init(void); 31void i2c_init(void);
30int i2c_write(int device, unsigned char *buf, int count); 32int i2c_read (volatile unsigned char *iface, unsigned char addr,
33 unsigned char *buf, int count);
34int i2c_write(volatile unsigned char *iface, unsigned char addr,
35 const unsigned char *buf, int count);
31void i2c_close(void); 36void i2c_close(void);
37void i2c_adjust_prescale(int multiplier);
32 38
39#define I2C_IFACE_0 ((volatile unsigned char *)&MADR)
40#define I2C_IFACE_1 ((volatile unsigned char *)&MADR2)
33 41
34#define MAX_LOOP 0x100 /* TODO: select a better value */ 42#define MAX_LOOP 0x100 /* TODO: select a better value */
35 43