aboutsummaryrefslogtreecommitdiff
path: root/stmhal/uart.c
diff options
context:
space:
mode:
authorDamien George2014-08-22 21:49:08 +0100
committerDamien George2014-09-07 20:41:09 +0100
commite2a618615df33d884dde975c3e0a0727d9ea9629 (patch)
treec93dc1ccb193590d9dc157fbce87af1aa4d73457 /stmhal/uart.c
parentc7687ad7e6969bd72751741c5d8a5673d40fa51c (diff)
stmhal: Fix modselect so non-hashable objects can be polled.
Diffstat (limited to 'stmhal/uart.c')
-rw-r--r--stmhal/uart.c2
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) {