if(*wait < 10) { *wait = 10; }\r
\r
// for(c = 0; c < *wait;) {\r
-// if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
-// SSC_TRANSMIT_HOLDING = 0x00; // For exact timing!\r
+// if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+// AT91C_BASE_SSC->SSC_THR = 0x00; // For exact timing!\r
// c++;\r
// }\r
-// if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
-// volatile DWORD r = SSC_RECEIVE_HOLDING;\r
+// if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
+// volatile DWORD r = AT91C_BASE_SSC->SSC_RHR;\r
// (void)r;\r
// }\r
// WDT_HIT();\r
\r
c = 0;\r
for(;;) {\r
- if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
- SSC_TRANSMIT_HOLDING = cmd[c];\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+ AT91C_BASE_SSC->SSC_THR = cmd[c];\r
c++;\r
if(c >= len) {\r
break;\r
}\r
}\r
- if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
- volatile DWORD r = SSC_RECEIVE_HOLDING;\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
+ volatile DWORD r = AT91C_BASE_SSC->SSC_RHR;\r
(void)r;\r
}\r
WDT_HIT();\r
\r
c = 0;\r
for(;;) {\r
- if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
- SSC_TRANSMIT_HOLDING = cmd[c];\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+ AT91C_BASE_SSC->SSC_THR = cmd[c];\r
c++;\r
if(c >= len) {\r
break;\r
}\r
}\r
- if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
- volatile DWORD r = SSC_RECEIVE_HOLDING;\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
+ volatile DWORD r = AT91C_BASE_SSC->SSC_RHR;\r
(void)r;\r
}\r
WDT_HIT();\r
c = 0;\r
getNext = FALSE;\r
for(;;) {\r
- if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
- SSC_TRANSMIT_HOLDING = 0x43;\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+ AT91C_BASE_SSC->SSC_THR = 0x43;\r
}\r
- if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
SBYTE b;\r
- b = (SBYTE)SSC_RECEIVE_HOLDING;\r
+ b = (SBYTE)AT91C_BASE_SSC->SSC_RHR;\r
\r
// The samples are correlations against I and Q versions of the\r
// tone that the tag AM-modulates, so every other sample is I,\r
c = 0;\r
getNext = FALSE;\r
for(;;) {\r
- if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
- SSC_TRANSMIT_HOLDING = 0x43;\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+ AT91C_BASE_SSC->SSC_THR = 0x43;\r
}\r
- if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
SBYTE b;\r
- b = (SBYTE)SSC_RECEIVE_HOLDING;\r
+ b = (SBYTE)AT91C_BASE_SSC->SSC_RHR;\r
\r
// The samples are correlations against I and Q versions of the\r
// tone that the tag AM-modulates, so every other sample is I,\r
\r
c = 0;\r
for(;;) {\r
- if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
- SSC_TRANSMIT_HOLDING = ToSend[c];\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+ AT91C_BASE_SSC->SSC_THR = ToSend[c];\r
c++;\r
if(c == ToSendMax+3) {\r
break;\r
}\r
}\r
- if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
- volatile DWORD r = SSC_RECEIVE_HOLDING;\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
+ volatile DWORD r = AT91C_BASE_SSC->SSC_RHR;\r
(void)r;\r
}\r
WDT_HIT();\r
c = 0;\r
getNext = FALSE;\r
for(;;) {\r
- if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
- SSC_TRANSMIT_HOLDING = 0x43;\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+ AT91C_BASE_SSC->SSC_THR = 0x43;\r
}\r
- if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
+ if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
SBYTE b;\r
- b = (SBYTE)SSC_RECEIVE_HOLDING;\r
+ b = (SBYTE)AT91C_BASE_SSC->SSC_RHR;\r
\r
// The samples are correlations against I and Q versions of the\r
// tone that the tag AM-modulates, so every other sample is I,\r