Errors in mutex README fixed

pull/7/head
Peter Hinch 2017-02-07 07:48:32 +00:00
rodzic 8780201bd9
commit 63c660d2f9
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -22,9 +22,11 @@ mutex = mutex.Mutex()
data_ready = False
def callback(): # Timer or interrupt callback
global data_ready
if mutex.test():
data_ready = True
# Update critical variables
mutex.release()
else:
# defer any update
# Associate callback with device (pin or timer)