summaryrefslogtreecommitdiff
path: root/n
diff options
context:
space:
mode:
authordemonchy2005-04-17 00:58:35 +0000
committerdemonchy2005-04-17 00:58:35 +0000
commit22caf22f2c501ad8e4d3aa7f203d9b7dfff41065 (patch)
treeffbc06e73b8aeb64e1873b836ce8f25cbe98043f /n
parentcba6967dc51c73f5a50026438f5d873dc797419a (diff)
Correction de l'initialisation
Diffstat (limited to 'n')
-rw-r--r--n/avr/twi-master/twi_master.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/n/avr/twi-master/twi_master.c b/n/avr/twi-master/twi_master.c
index 9bde94c..ab53b6e 100644
--- a/n/avr/twi-master/twi_master.c
+++ b/n/avr/twi-master/twi_master.c
@@ -25,7 +25,7 @@ static uint8_t twi_dest_addr;
static uint8_t twi_len;
static uint8_t twi_idx;
static uint8_t twi_nb_retry;
-uint8_t twi_state = 0;
+uint8_t twi_state = TWI_FREE;
#define SYSCLK 14745600UL
@@ -45,7 +45,7 @@ twi_master_init (void)
int8_t
twi_is_finished ()
{
- if (twi_state == TWI_SUCCESS)
+ if (twi_state == TWI_SUCCESS || twi_state == TWI_ECHEC)
return 1;
else
return 0;
@@ -68,7 +68,10 @@ twi_master_send (uint8_t addr, uint8_t *data, uint8_t len)
return 0;
}
else
+ {
+ TWI_DEBUG ('x');
return -1;
+ }
}
int8_t