owc_gpiobus_read_data: disable preemption earlier
Now this is done before starting the low pulse that has rather tight timing. Reviewed by: imp (D22108) MFC after: 2 weeks
This commit is contained in:
parent
4fc619ef64
commit
d91b70f305
@ -279,6 +279,8 @@ owc_gpiobus_read_data(device_t dev, struct ow_timing *t, int *bit)
|
|||||||
if (error != 0)
|
if (error != 0)
|
||||||
return (error);
|
return (error);
|
||||||
|
|
||||||
|
critical_enter();
|
||||||
|
|
||||||
/* Force low for t_lowr microseconds */
|
/* Force low for t_lowr microseconds */
|
||||||
then = sbinuptime();
|
then = sbinuptime();
|
||||||
OUTPIN(sc);
|
OUTPIN(sc);
|
||||||
@ -291,7 +293,6 @@ owc_gpiobus_read_data(device_t dev, struct ow_timing *t, int *bit)
|
|||||||
* master's pushing the line low.
|
* master's pushing the line low.
|
||||||
*/
|
*/
|
||||||
INPIN(sc);
|
INPIN(sc);
|
||||||
critical_enter();
|
|
||||||
do {
|
do {
|
||||||
now = sbinuptime();
|
now = sbinuptime();
|
||||||
GETPIN(sc, &sample);
|
GETPIN(sc, &sample);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user