AVR: Remove warning pragma from SPI freq function

The function for updating the spi frequency included a #warning
pragma because the divider registers are computed but not used
it is not clear what needs to be done here to implement this
but the warning has been removed and replaced with a comment
in the function.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
This commit is contained in:
Brennan Ashton 2020-07-19 17:21:36 +00:00 committed by Alan Carvalho de Assis
parent fe0b5df223
commit 8319078887
1 changed files with 5 additions and 3 deletions

View File

@ -188,11 +188,15 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev,
FAR struct avr_spidev_s *priv = (FAR struct avr_spidev_s *)dev;
uint32_t actual;
/* TODO: This is missing the actual logic to update the frequency.
* The divider bits are computed but not actually used.
*/
/* Has the request frequency changed? */
if (frequency != priv->frequency)
{
/* Read the SPI status and control registers, clearing all divider bits */
/* Read the SPI status and control registers, clearing all div bits */
uint8_t spcr = SPCR & ~((1 << SPR0) | (1 << SPR1));
uint8_t spsr = SPSR & ~(1 << SPI2X);
@ -236,8 +240,6 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev,
actual = BOARD_CPU_CLOCK / 128;
}
#warning REVISIT: spcr/spsr are never used
/* Save the frequency setting */
priv->frequency = frequency;