Skip to content

Commit 38b2bb7

Browse files
ficetoficeto
ficeto
authored and
ficeto
committed
overflow at 160MHz
1 parent 3d0dafc commit 38b2bb7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cores/esp8266/core_esp8266_si2c.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void twi_stop(void){
7272
}
7373

7474
static void twi_delay(unsigned char v){
75-
unsigned char i;
75+
unsigned int i;
7676
unsigned int reg;
7777
for(i=0;i<v;i++) reg = GPI;
7878
}
@@ -88,7 +88,7 @@ static bool twi_write_start(void) {
8888
}
8989

9090
static bool twi_write_stop(void){
91-
unsigned char i = 0;
91+
unsigned int i = 0;
9292
SCL_LOW();
9393
SDA_LOW();
9494
twi_delay(twi_dcount);
@@ -102,7 +102,7 @@ static bool twi_write_stop(void){
102102
}
103103

104104
static bool twi_write_bit(bool bit) {
105-
unsigned char i = 0;
105+
unsigned int i = 0;
106106
SCL_LOW();
107107
if (bit) SDA_HIGH();
108108
else SDA_LOW();
@@ -114,7 +114,7 @@ static bool twi_write_bit(bool bit) {
114114
}
115115

116116
static bool twi_read_bit(void) {
117-
unsigned char i = 0;
117+
unsigned int i = 0;
118118
SCL_LOW();
119119
SDA_HIGH();
120120
twi_delay(twi_dcount+1);

0 commit comments

Comments
 (0)