Skip to content

Commit

Permalink
overflow at 160MHz
Browse files Browse the repository at this point in the history
  • Loading branch information
ficeto authored and ficeto committed May 3, 2015
1 parent 3d0dafc commit 38b2bb7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cores/esp8266/core_esp8266_si2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void twi_stop(void){
}

static void twi_delay(unsigned char v){
unsigned char i;
unsigned int i;
unsigned int reg;
for(i=0;i<v;i++) reg = GPI;
}
Expand All @@ -88,7 +88,7 @@ static bool twi_write_start(void) {
}

static bool twi_write_stop(void){
unsigned char i = 0;
unsigned int i = 0;
SCL_LOW();
SDA_LOW();
twi_delay(twi_dcount);
Expand All @@ -102,7 +102,7 @@ static bool twi_write_stop(void){
}

static bool twi_write_bit(bool bit) {
unsigned char i = 0;
unsigned int i = 0;
SCL_LOW();
if (bit) SDA_HIGH();
else SDA_LOW();
Expand All @@ -114,7 +114,7 @@ static bool twi_write_bit(bool bit) {
}

static bool twi_read_bit(void) {
unsigned char i = 0;
unsigned int i = 0;
SCL_LOW();
SDA_HIGH();
twi_delay(twi_dcount+1);
Expand Down

0 comments on commit 38b2bb7

Please sign in to comment.