projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Chipcon packet handling is coming along, but transmissions are still dropped. Maybe...
[goodfet]
/
shellcode
/
chipcon
/
cc1110
/
txpacket.c
diff --git
a/shellcode/chipcon/cc1110/txpacket.c
b/shellcode/chipcon/cc1110/txpacket.c
index
fa0ad98
..
e41ce49
100644
(file)
--- a/
shellcode/chipcon/cc1110/txpacket.c
+++ b/
shellcode/chipcon/cc1110/txpacket.c
@@
-6,7
+6,18
@@
char __xdata at 0xfe00 packet[256] ;
//! Transmit a packet out of the radio from 0xFE00.
void main(){
unsigned char len=packet[0], i=0;
//! Transmit a packet out of the radio from 0xFE00.
void main(){
unsigned char len=packet[0], i=0;
+
+ //Disable interrupts.
+ RFTXRXIE=0;
+
+ //idle a bit.
+ RFST=RFST_SIDLE;
+ while(MARCSTATE!=MARC_STATE_IDLE);
+
+
RFST=RFST_STX; //Begin transmit.
RFST=RFST_STX; //Begin transmit.
+ while(MARCSTATE!=MARC_STATE_TX);
+
while(i!=len+1){
while(!RFTXRXIF); //Wait for byte to be ready.
while(i!=len+1){
while(!RFTXRXIF); //Wait for byte to be ready.