Skip to content

Commit 967c076

Browse files
committed
codal_app/mphalport: Fix bit-wise logic in mp_hal_stdio_poll.
Signed-off-by: Damien George <damien@micropython.org>
1 parent ca485d2 commit 967c076

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codal_app/mphalport.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ void mp_hal_set_interrupt_char(int c) {
5454

5555
uintptr_t mp_hal_stdio_poll(uintptr_t poll_flags) {
5656
uintptr_t ret = 0;
57-
if (poll_flags && MP_STREAM_POLL_RD) {
57+
if (poll_flags & MP_STREAM_POLL_RD) {
5858
if (uBit.serial.isReadable()) {
5959
ret |= MP_STREAM_POLL_RD;
6060
}
6161
}
62-
if (poll_flags && MP_STREAM_POLL_WR) {
62+
if (poll_flags & MP_STREAM_POLL_WR) {
6363
if (uBit.serial.isWriteable()) {
6464
ret |= MP_STREAM_POLL_WR;
6565
}

0 commit comments

Comments
 (0)