Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
79875995
Commit
79875995
authored
Nov 13, 2016
by
zelll
Committed by
Philip Gladstone
Nov 13, 2016
Browse files
i2c - allow slave stretching SCL (just loop and check) (#1589)
parent
a1684496
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/driver/i2c_master.c
View file @
79875995
...
@@ -33,6 +33,8 @@ LOCAL uint8 pinSCL = 15;
...
@@ -33,6 +33,8 @@ LOCAL uint8 pinSCL = 15;
LOCAL
void
ICACHE_FLASH_ATTR
LOCAL
void
ICACHE_FLASH_ATTR
i2c_master_setDC
(
uint8
SDA
,
uint8
SCL
)
i2c_master_setDC
(
uint8
SDA
,
uint8
SCL
)
{
{
uint8
sclLevel
;
SDA
&=
0x01
;
SDA
&=
0x01
;
SCL
&=
0x01
;
SCL
&=
0x01
;
m_nLastSDA
=
SDA
;
m_nLastSDA
=
SDA
;
...
@@ -47,6 +49,11 @@ i2c_master_setDC(uint8 SDA, uint8 SCL)
...
@@ -47,6 +49,11 @@ i2c_master_setDC(uint8 SDA, uint8 SCL)
}
else
{
}
else
{
I2C_MASTER_SDA_HIGH_SCL_HIGH
();
I2C_MASTER_SDA_HIGH_SCL_HIGH
();
}
}
if
(
1
==
SCL
)
{
do
{
sclLevel
=
GPIO_INPUT_GET
(
GPIO_ID_PIN
(
I2C_MASTER_SCL_GPIO
));
}
while
(
sclLevel
==
0
);
}
}
}
/******************************************************************************
/******************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment