pentevo
atmturbo
ngs
zxusbnet
tsfmpro
RGBcoder
BK_REmulator
BK_kbd
KoE_projects
BlueGrey
calm
Elegant
Català-Valencià – Catalan
中文 – Chinese (Simplified)
中文 – Chinese (Traditional)
Česky – Czech
Dansk – Danish
Nederlands – Dutch
English – English
Suomi – Finnish
Français – French
Deutsch – German
עברית – Hebrew
हिंदी – Hindi
Magyar – Hungarian
Bahasa Indonesia – Indonesian
Italiano – Italian
日本語 – Japanese
한국어 – Korean
Македонски – Macedonian
मराठी – Marathi
Norsk – Norwegian
Polski – Polish
Português – Portuguese
Português – Portuguese (Brazil)
Русский – Russian
Slovenčina – Slovak
Slovenščina – Slovenian
Español – Spanish
Svenska – Swedish
Türkçe – Turkish
Українська – Ukrainian
Oëzbekcha – Uzbek
Subversion Repositories
pentevo
(root)
/
avr
/
current
/
spi.c
– Rev 126
Rev
Rev 94
|
Blame
|
Compare with Previous
|
Last modification
|
View Log
|
Download
|
RSS feed
#include <avr/io.h>
#include <avr/interrupt.h>
#include "pins.h"
#include "mytypes.h"
void
spi_init
(
void
)
{
SPCR
=
0b01110000
;
// prepare SPI
SPSR
=
0b00000001
;
}
UBYTE spi_send
(
UBYTE byte
)
{
SPDR
=
byte
;
while
(
!
(
SPSR
&
(
1
<<
SPIF
)
)
)
;
return
SPDR
;
}