Skip to content

Commit

Permalink
Fixed the _spi_clock_divider
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulZC committed Apr 12, 2020
1 parent b48e703 commit 1c40a85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platforms/apollo3/fastspi_apollo3.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ class APOLLO3HardwareSPIOutput {
}

am_hal_gpio_fastgpio_set(_CLOCK_PIN);
for (int16_t d = (_SPI_CLOCK_DIVIDER >> 1); d > 0; d--) { __NOP(); }
for (uint32_t d = (_SPI_CLOCK_DIVIDER >> 1); d > 0; d--) { __NOP(); }
am_hal_gpio_fastgpio_clr(_CLOCK_PIN);
for (int16_t d = ((_SPI_CLOCK_DIVIDER >> 1) - 1); d > 0; d--) { __NOP(); }
for (uint32_t d = (_SPI_CLOCK_DIVIDER >> 1); d > 0; d--) { __NOP(); }
}

// write a block of uint8_ts out in groups of three. len is the total number of uint8_ts to write out. The template
Expand Down

0 comments on commit 1c40a85

Please sign in to comment.