1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

PIOS_RFM22b: No need to set the SPI clock speed in the RFM22b module - it can be set by the driver configuration.

This commit is contained in:
James Cotton 2012-08-25 23:59:07 -05:00
parent 001c43c090
commit b1bd6d8583
2 changed files with 1 additions and 12 deletions

View File

@ -1767,17 +1767,6 @@ int rfm22_resetModule(uint8_t mode, uint32_t min_frequency_hz, uint32_t max_freq
exec_using_spi = true; exec_using_spi = true;
// ****************
// setup the SPI port
// set SPI port SCLK frequency .. 4.5MHz
PIOS_SPI_SetClockSpeed(PIOS_RFM22_SPI_PORT, PIOS_SPI_PRESCALER_16);
// set SPI port SCLK frequency .. 2.25MHz
// PIOS_SPI_SetClockSpeed(PIOS_RFM22_SPI_PORT, PIOS_SPI_PRESCALER_32);
// set SPI port SCLK frequency .. 285kHz .. purely for hardware fault finding
// PIOS_SPI_SetClockSpeed(PIOS_RFM22_SPI_PORT, PIOS_SPI_PRESCALER_256);
// **************** // ****************
// software reset the RF chip .. following procedure according to Si4x3x Errata (rev. B) // software reset the RF chip .. following procedure according to Si4x3x Errata (rev. B)

View File

@ -86,7 +86,7 @@ static const struct pios_spi_cfg pios_spi_rfm22b_cfg =
.SPI_CRCPolynomial = 0, .SPI_CRCPolynomial = 0,
.SPI_CPOL = SPI_CPOL_Low, .SPI_CPOL = SPI_CPOL_Low,
.SPI_CPHA = SPI_CPHA_1Edge, .SPI_CPHA = SPI_CPHA_1Edge,
.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_256, // slowest SCLK .SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_16, // slowest SCLK
}, },
.use_crc = FALSE, .use_crc = FALSE,