Skip to content

Commit

Permalink
missed avr select/unselect changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
daskygit committed May 11, 2024
1 parent ceb16e3 commit 5bd4a0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platforms/avr/drivers/spi_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ bool spi_start_extended(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t di
currentSlavePin = slavePin;
current_cs_active_low = cs_active_low;
gpio_set_pin_output(currentSlavePin);
spi_select(currentSlavePin, current_cs_active_low);
spi_select();

return true;
}
Expand Down Expand Up @@ -184,7 +184,7 @@ spi_status_t spi_receive(uint8_t *data, uint16_t length) {
void spi_stop(void) {
if (currentSlavePin != NO_PIN) {
gpio_set_pin_output(currentSlavePin);
spi_unselect(currentSlavePin, current_cs_active_low);
spi_unselect();
currentSlavePin = NO_PIN;
SPSR &= ~(_BV(SPI2X));
SPCR &= ~(currentSlaveConfig);
Expand Down

0 comments on commit 5bd4a0f

Please sign in to comment.