28,14 → 28,11 |
SPI_BufferIndex = 1; |
DebugOut.Analog[16]++; |
// -- Debug-Output --- |
cli(); |
DebugOut.Analog[20] = FromNaviCtrl.Comp; |
/* DebugOut.Analog[20] = FromNaviCtrl.Comp; |
DebugOut.Analog[21] = FromNaviCtrl.GPS_Nick; |
DebugOut.Analog[22] = FromNaviCtrl.GPS_Roll; |
DebugOut.Analog[23] = FromNaviCtrl.CompassValue; |
sei(); |
|
|
*/ |
//---- |
SPDR = ToNaviCtrl.Comp; // Start transmission |
} |
48,6 → 45,7 |
|
if (SPI_BufferIndex < sizeof(FromNaviCtrl)) |
{ SPI_Buffer[SPI_BufferIndex]= SPDR; // get data |
// if (SPI_BufferIndex < 32 ) DebugOut.Analog[26+SPI_BufferIndex] = SPI_Buffer[SPI_BufferIndex]; |
|
//if(SPDR!= 0x00) DebugOut.Analog[19]++; ; |
} |
59,10 → 57,8 |
else |
{ |
unsigned char *ptr = (unsigned char *)&FromNaviCtrl; |
unsigned char i; |
|
SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); // DeselectSlave |
|
memcpy(ptr, (unsigned char *) SPI_Buffer, sizeof(SPI_Buffer)); |
} |
|