B4R Question ESP8266 exception if to use DelayMicroseconds

peacemaker

Expert
Licensed User
Longtime User
HI, All

Is it known trouble? Anyone seen with ESP8266?
If to replace Delay with DelayMicroseconds:

Native call makes the same:
#if C
void DelayMicro (B4R::Object* o) {
   delayMicroseconds(o->toULong());
}
#End if
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
Not solved, but tricked:
B4X:
Private Sub DelayMicrosec(microseconds As UInt)
    Dim Start As ULong = Micros
    Do While True
        Dim Check As ULong = Micros
        If Check > microseconds + Start Then
            Exit
        End If
        If Check Mod 100 = 0 Then
            RunNative("yld", Null)
        End If
    Loop
End Sub

#if C
void yld(B4R::Object* o){
    yield();
}
#End If

Question is not answered...
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…