Use _BV macros, patch up others
This commit is contained in:
parent
209f5f21e0
commit
ff13070b59
14 changed files with 130 additions and 127 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue