Copy project

This commit is contained in:
schmelczerandras 2020-04-19 12:48:06 +02:00
commit 26a0fd884f
173 changed files with 157458 additions and 1 deletions

View file

@ -0,0 +1,30 @@
#include "spi.h"
#include <avr/interrupt.h>
#define SWAP_BIT (BV(USIWM0) | BV(USICLK) | BV(USITC) | BV(USICS1))
void sendByteOnSPI(uint8_t byte) {
USIDR = byte;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
USICR = SWAP_BIT;
}