@@ -103,7 +103,6 @@ static mp_obj_t async_iterator = NULL;
103
103
// Record if an error occurs in async animation. Unfortunately there is no way to report this.
104
104
static bool async_error = false ;
105
105
static volatile bool wakeup_event = false ;
106
- static uint16_t async_nonce = 0 ;
107
106
static mp_uint_t async_delay = 1000 ;
108
107
static mp_uint_t async_tick = 0 ;
109
108
@@ -156,7 +155,7 @@ inline void microbit_display_obj_t::setPinsForRow(uint8_t brightness) {
156
155
157
156
// Wwrite the new bit pattern.
158
157
// Set port 0 4-7 and retain lower 4 bits.
159
- nrf_gpio_port_write (NRF_GPIO_PORT_SELECT_PORT0, ~column_strobe<<4 & 0xF0 | nrf_gpio_port_read (NRF_GPIO_PORT_SELECT_PORT0) & 0x0F );
158
+ nrf_gpio_port_write (NRF_GPIO_PORT_SELECT_PORT0, ( ~column_strobe<<4 & 0xF0 ) | ( nrf_gpio_port_read (NRF_GPIO_PORT_SELECT_PORT0) & 0x0F ) );
160
159
161
160
// Set port 1 8-12 for the current row.
162
161
nrf_gpio_port_write (NRF_GPIO_PORT_SELECT_PORT1, strobe_mask | (~column_strobe>>4 & 0x1F ));
@@ -167,7 +166,7 @@ void microbit_display_obj_t::advanceRow() {
167
166
168
167
// Clear the old bit pattern for this row.
169
168
// Clear port 0 4-7 and retain lower 4 bits.
170
- nrf_gpio_port_write (NRF_GPIO_PORT_SELECT_PORT0, 0xF0 | nrf_gpio_port_read (NRF_GPIO_PORT_SELECT_PORT0) & 0x0F );
169
+ nrf_gpio_port_write (NRF_GPIO_PORT_SELECT_PORT0, 0xF0 | ( nrf_gpio_port_read (NRF_GPIO_PORT_SELECT_PORT0) & 0x0F ) );
171
170
// Clear port 1 8-12 for the current row.
172
171
nrf_gpio_port_write (NRF_GPIO_PORT_SELECT_PORT1, strobe_mask | 0x1F );
173
172
0 commit comments