From 5d29fe79d30f430ae326d9dc57ccfaed6fe61328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 8 Mar 2016 16:10:33 +0100 Subject: Another full update of current work --- include/twi.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/twi.h (limited to 'include/twi.h') diff --git a/include/twi.h b/include/twi.h new file mode 100644 index 0000000..0763c4b --- /dev/null +++ b/include/twi.h @@ -0,0 +1,24 @@ +#include +#include +#include + +#include "mcu/mcu_def.h" + +#ifndef _IOE_TWI_H_ +#define _IOE_TWI_H_ + +#ifndef MCUSUPPORT_TWI +#error "No TWI interface is known on your mcu." +#endif + +enum twiMode { + TWI_MODE_MASTER, + TWI_MODE_SLAVE +}; + +void twi_init(enum twiMode); +int8_t twi_busy(void); +void twi_join(void); +void twi_send(uint8_t data); + +#endif /* _IOE_TWI_H_ */ -- cgit v1.2.3