2,7 → 2,7 |
#ifndef _SPI_H |
#define _SPI_H |
|
//#define USE_SPI_COMMUNICATION |
//#define USE_SPI_COMMUNICATION |
|
#define SPI_PROTOCOL_COMP 1 |
|
11,36 → 11,36 |
#define DD_SS PB4 |
#define DD_SCK PB7 |
#define DD_MOSI PB5 |
#define DD_MISO PB6 |
#define DD_MISO PB6 |
|
// for compatibility reasons gcc3.x <-> gcc4.x |
#ifndef SPCR |
// for compatibility reasons gcc3.x <-> gcc4.x |
#ifndef SPCR |
#define SPCR SPCR0 |
#endif |
#ifndef SPE |
#endif |
#ifndef SPE |
#define SPE SPE0 |
#endif |
#ifndef MSTR |
#endif |
#ifndef MSTR |
#define MSTR MSTR0 |
#endif |
#ifndef SPR1 |
#endif |
#ifndef SPR1 |
#define SPR1 SPR01 |
#endif |
#ifndef SPR0 |
#endif |
#ifndef SPR0 |
#define SPR0 SPR00 |
#endif |
#ifndef SPIE |
#endif |
#ifndef SPIE |
#define SPIE SPIE0 |
#endif |
#ifndef SPDR |
#endif |
#ifndef SPDR |
#define SPDR SPDR0 |
#endif |
#ifndef SPIF |
#endif |
#ifndef SPIF |
#define SPIF SPIF0 |
#endif |
#ifndef SPSR |
#endif |
#ifndef SPSR |
#define SPSR SPSR0 |
#endif |
#endif |
// ------------------------- |
|
#define SLAVE_SELECT_DDR_PORT DDRC |
51,20 → 51,20 |
{ |
unsigned char Sync1, Sync2; |
unsigned char Comp; |
int IntegralNick; |
int IntegralPitch; |
int IntegralRoll; |
char StickNick,StickRoll,StickGier; |
char StickPitch,StickRoll,StickYaw; |
unsigned char ChkSum; |
}; |
}; |
|
struct str_FromNaviCtrl |
{ |
unsigned int Dummy; |
unsigned char Comp; |
int GPS_Nick; |
int GPS_Pitch; |
int GPS_Roll; |
int CompassValue; |
}; |
int CompassHeading; |
}; |
|
#ifdef USE_SPI_COMMUNICATION |
extern struct str_ToNaviCtrl ToNaviCtrl; |
79,7 → 79,7 |
|
|
// -------------------------------- Dummy ----------------------------------------- |
#define SPI_MasterInit() ; |
#define SPI_MasterInit() ; |
#define SPI_StartTransmitPacket() ; |
#define UpdateSPI_Buffer() ; |
#define SPI_TransmitByte() ; |