Fixed a bug in the initialization of the bme280 module, which led to a change in PC0 to output instead of input. As a result, the ADC stopped working. This manifested itself as inoperability of packet decoding.

This commit is contained in:
Dmitriy Logachov 2021-01-17 18:20:46 +05:00
parent a0b0cfa97d
commit 48ef9a625f

View File

@ -250,7 +250,7 @@ bool bme280_init(uint8_t cs_usrio_pin) {
bme280_temperature_fine_adjust = BME280_TEMPERATURE_ADJUSTMENT;
USR_IO_DDR |= bme280_cs_usrio_pin;
USR_IO_DDR |= _BV(bme280_cs_usrio_pin);
SPI_DDR |= _BV(SPI_MOSI) | _BV(SPI_CLK);
SPI_DDR &= ~(_BV(SPI_MISO));