Created
October 24, 2012 10:38
-
-
Save dancollins/3945393 to your computer and use it in GitHub Desktop.
Microchip Application Library Gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Continue the loop till you find SPI Baud Rate Register Value */ | |
while (1) { | |
/* SPI Clock Calculation as per PIC32 Manual */ | |
SPI_Clk_Freq = pbFreq / (2 * (SPI_Brg + 1)); | |
if (SPI_Clk_Freq <= MAX_SPI_CLK_FREQ_FOR_P2P) | |
break; | |
SPI_Brg++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment