Skip to content

Commit 8444193

Browse files
fix inversion bitmath error
1 parent 58e1ee7 commit 8444193

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • ports/atmel-samd/common-hal/busio

ports/atmel-samd/common-hal/busio/SPI.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
147147
// the prototypical SERCOM.
148148
uint32_t SPI_CONFIG_OFFSETS[] = {0x40003000, 0x40003400, 0x43000000, 0x43000400, 0x43000800, 0x43000C00};
149149
if (slave_mode) {
150-
*((uint32_t*) SPI_CONFIG_OFFSETS[sercom_index]) &= (1<<2);
150+
*((uint32_t*) SPI_CONFIG_OFFSETS[sercom_index]) &= ~(1<<2);
151151
}
152152
hri_sercomspi_write_CTRLA_DOPO_bf(sercom, dopo);
153153
hri_sercomspi_write_CTRLA_DIPO_bf(sercom, miso_pad);

0 commit comments

Comments
 (0)