this is pretty close to working together.
This commit is contained in:
parent
e8550f26ba
commit
0dac24e1eb
|
@ -166,7 +166,7 @@ void post_tx(void) {
|
||||||
disable_irq(MACA);
|
disable_irq(MACA);
|
||||||
last_post = TX_POST;
|
last_post = TX_POST;
|
||||||
dma_tx = tx_head;
|
dma_tx = tx_head;
|
||||||
*MACA_TXLEN = (uint32_t)(dma_tx->length + 2);
|
*MACA_TXLEN = (uint32_t)((dma_tx->length) + 2);
|
||||||
*MACA_DMATX = (uint32_t)&(dma_tx->data[0]);
|
*MACA_DMATX = (uint32_t)&(dma_tx->data[0]);
|
||||||
if(dma_rx == 0) {
|
if(dma_rx == 0) {
|
||||||
dma_rx = get_free_packet();
|
dma_rx = get_free_packet();
|
||||||
|
@ -183,17 +183,18 @@ void post_tx(void) {
|
||||||
/* enable complete clock */
|
/* enable complete clock */
|
||||||
*MACA_TMREN = (1 << maca_tmren_cpl);
|
*MACA_TMREN = (1 << maca_tmren_cpl);
|
||||||
/* do the transmit */
|
/* do the transmit */
|
||||||
|
for(i=0; i<1000; i++) { continue; }
|
||||||
enable_irq(MACA);
|
enable_irq(MACA);
|
||||||
/* *MACA_CONTROL = ( (1 << maca_ctrl_prm) | ( 4 << PRECOUNT) |
|
/* *MACA_CONTROL = ( (1 << maca_ctrl_prm) | ( 4 << PRECOUNT) |
|
||||||
(maca_ctrl_mode_no_cca << maca_ctrl_mode) |
|
(maca_ctrl_mode_no_cca << maca_ctrl_mode) |
|
||||||
(1 << maca_ctrl_asap) |
|
(1 << maca_ctrl_asap) |
|
||||||
(maca_ctrl_seq_tx)); */
|
(maca_ctrl_seq_tx)); */
|
||||||
|
// for(i=0; i<1000; i++) { continue; }
|
||||||
*MACA_CONTROL = ( (1 << maca_ctrl_prm) |
|
*MACA_CONTROL = ( (1 << maca_ctrl_prm) |
|
||||||
(maca_ctrl_mode_no_cca << maca_ctrl_mode) |
|
(maca_ctrl_mode_no_cca << maca_ctrl_mode) |
|
||||||
(1 << maca_ctrl_asap) |
|
(1 << maca_ctrl_asap) |
|
||||||
(maca_ctrl_seq_tx));
|
(maca_ctrl_seq_tx));
|
||||||
|
for(i=0; i<1000; i++) { continue; }
|
||||||
for(i=0; i<10; i++) { continue; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tx_packet(volatile packet_t *p) {
|
void tx_packet(volatile packet_t *p) {
|
||||||
|
|
12
tests/per.c
12
tests/per.c
|
@ -47,11 +47,11 @@ uint32_t get_time(void) {
|
||||||
#define random_short_addr() (*MACA_RANDOM & ones(sizeof(short_addr_t)*8))
|
#define random_short_addr() (*MACA_RANDOM & ones(sizeof(short_addr_t)*8))
|
||||||
|
|
||||||
void build_session_req(volatile packet_t *p) {
|
void build_session_req(volatile packet_t *p) {
|
||||||
p->length = 16;
|
p->length = 4;
|
||||||
p->data[0] = 0xff;
|
p->data[0] = 0x01;
|
||||||
p->data[1] = 0x01;
|
p->data[1] = 0x02;
|
||||||
p->data[2] = 0x23;
|
p->data[2] = 0x03;
|
||||||
p->data[3] = 0x45;
|
p->data[3] = 0x04;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ void main(void) {
|
||||||
sesid = open_session(p->addr);
|
sesid = open_session(p->addr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// session_req(my_addr);
|
session_req(my_addr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue