setClockDivider() sets the SPI clock divider relative to the system clock. The default setting is SPI_CLOCK_DIV4, which sets the SPI clock to one-quarter the frequency of the system clock (4 MHz for boards running at 16 MHz).
On AVR based boards, the available dividers are 2, 4, 8, 16, 32, 64, or 128. On the Arduino Due, the system clock can be divided by values from 1 to 255 (default value is 21, which sets the clock to 4 MHz).
This function is part of the SPI library. See the SPI main page for more information.
SPI.setClockDivider(divider)SPI.setClockDivider(chipSelectPin, divider) (Arduino Due only)divider: the clock divider. On AVR boards, allowed values are: SPI_CLOCK_DIV2, SPI_CLOCK_DIV4, SPI_CLOCK_DIV8, SPI_CLOCK_DIV16, SPI_CLOCK_DIV32, SPI_CLOCK_DIV64, SPI_CLOCK_DIV128. On Arduino Due, a number from 1 to 255.chipSelectPin: peripheral device chip select pin (Arduino Due only).Nothing.
This function is deprecated and should not be used in new projects. Use SPISettings with SPI.beginTransaction() to configure SPI parameters.