diff options
| author | Damien George | 2014-08-22 21:49:08 +0100 |
|---|---|---|
| committer | Damien George | 2014-09-07 20:41:09 +0100 |
| commit | e2a618615df33d884dde975c3e0a0727d9ea9629 (patch) | |
| tree | c93dc1ccb193590d9dc157fbce87af1aa4d73457 /stmhal/uart.c | |
| parent | c7687ad7e6969bd72751741c5d8a5673d40fa51c (diff) | |
stmhal: Fix modselect so non-hashable objects can be polled.
Diffstat (limited to 'stmhal/uart.c')
| -rw-r--r-- | stmhal/uart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/uart.c b/stmhal/uart.c index 6cb8a8e40..884490a5f 100644 --- a/stmhal/uart.c +++ b/stmhal/uart.c @@ -485,7 +485,7 @@ mp_uint_t uart_ioctl(mp_obj_t self_in, mp_uint_t request, int *errcode, ...) { if (request == MP_IOCTL_POLL) { mp_uint_t flags = va_arg(vargs, mp_uint_t); ret = 0; - if (flags & MP_IOCTL_POLL_RD && uart_rx_any(self)) { + if ((flags & MP_IOCTL_POLL_RD) && uart_rx_any(self)) { ret |= MP_IOCTL_POLL_RD; } if (flags & MP_IOCTL_POLL_WR) { |
