From db212811293f91e0f1147eb57e5f6d5df2db10ef Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 29 Nov 2010 23:07:46 +0100 Subject: digital/avr/modules/twi: cleanup TWI module, refs #29, closes #90 - use contexts - changed interface - merge test programs - share polling mechanism - prepare place for other drivers - add callback system - use english comments --- digital/mimot/src/dirty/twi_proto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'digital/mimot/src/dirty/twi_proto.c') diff --git a/digital/mimot/src/dirty/twi_proto.c b/digital/mimot/src/dirty/twi_proto.c index a6894109..3048c594 100644 --- a/digital/mimot/src/dirty/twi_proto.c +++ b/digital/mimot/src/dirty/twi_proto.c @@ -67,10 +67,10 @@ twi_proto_init (void) void twi_proto_update (void) { - u8 buf[AC_TWI_SL_RECV_BUFFER_SIZE]; + u8 buf[AC_TWI_SLAVE_RECV_BUFFER_SIZE]; u8 read_data; /* Handle incoming command. */ - while ((read_data = twi_sl_poll (buf, sizeof (buf)))) + while ((read_data = twi_slave_poll (buf, sizeof (buf)))) twi_proto_callback (buf, read_data); /* Update status. */ u8 status_with_crc[8]; @@ -89,7 +89,7 @@ twi_proto_update (void) /* Compute CRC. */ status_with_crc[0] = crc_compute (&status_with_crc[1], sizeof (status_with_crc) - 1); - twi_sl_update (status_with_crc, sizeof (status_with_crc)); + twi_slave_update (status_with_crc, sizeof (status_with_crc)); } /** Handle one command. */ -- cgit v1.2.3