TestDoxygen  1.0.21
Test for Doxygen
TestMAX7456/SPI.h
Go to the documentation of this file.
00001 
00004 /*
00005   MRU JR 1110704
00006   110704 Removed SPI_SET
00007   101220 Added SPI_SET
00008   101219 Added SPI_PORT definition
00009 
00010 */
00011 #ifndef _AVRSPI_H_
00012 #define _AVRSPI_H_
00013 
00014 #include <avr/io.h>
00015 #include <inttypes.h>
00016 
00017 /* Pin/register definitions for SPI, this is when I'm master SPI
00018   This is specific for ATmega48 etc.
00019 */
00020 #define SPI_PORT  PORTB     
00021 #define SPI_DDR   DDRB      
00022 #define SPI_PINR  PINB      
00023 #define SPI_SS    PB2       
00024 #define SPI_MOSI  PB3       
00025 #define SPI_MISO  PB4       
00026 #define SPI_SCK   PB5       
00028 /* Initialise SPI HW is INIT_SPI in SIMRCV.h */
00029 
00030 /* SPIread returns the value in the SPDR */
00031 uint8_t SPIread(void);
00032 
00033 /* SPIwrite writes a byte to SPI, and returns the value which was
00034   shifted from the slave into the SPDR, might be needed
00035 */
00036 uint8_t SPIwrite(uint8_t data);
00037 
00038 #endif /* _AVRSPI_H_ */
 All Data Structures Files Functions Variables Enumerations Defines