Use _BV macros, patch up others

This commit is contained in:
Scott Lahteine
2016-02-27 04:51:44 -08:00
parent 209f5f21e0
commit ff13070b59
14 changed files with 130 additions and 127 deletions

View File

@ -35,8 +35,8 @@
*/
static void spiInit(uint8_t spiRate) {
// See avr processor documentation
SPCR = BIT(SPE) | BIT(MSTR) | (spiRate >> 1);
SPSR = spiRate & 1 || spiRate == 6 ? 0 : BIT(SPI2X);
SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
}
//------------------------------------------------------------------------------
/** SPI receive a byte */