summaryrefslogtreecommitdiffstats
path: root/platforms/avr
diff options
context:
space:
mode:
Diffstat (limited to 'platforms/avr')
-rw-r--r--platforms/avr/drivers/i2c_master.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/platforms/avr/drivers/i2c_master.c b/platforms/avr/drivers/i2c_master.c
index 524494c99d..58939f3e00 100644
--- a/platforms/avr/drivers/i2c_master.c
+++ b/platforms/avr/drivers/i2c_master.c
@@ -23,6 +23,7 @@
#include "i2c_master.h"
#include "timer.h"
#include "wait.h"
+#include "util.h"
#ifndef F_SCL
# define F_SCL 400000UL // SCL frequency
@@ -37,8 +38,6 @@
#define TWBR_val (((F_CPU / F_SCL) - 16) / 2)
-#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
-
void i2c_init(void) {
TWSR = 0; /* no prescaler */
TWBR = (uint8_t)TWBR_val;