Changed to monitor the UART transmitter buffer ready flag instead of the UART transmitter empty flag. This almost doubles the speed of transmitting data to CC2420. Patch by James Brown.

This commit is contained in:
nifi 2009-09-01 09:29:40 +00:00
parent 3a8ee769cb
commit 6680d2c6c2
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/* -*- C -*- */
/* @(#)$Id: contiki-conf.h,v 1.4 2008/12/16 16:53:04 nifi Exp $ */
/* @(#)$Id: contiki-conf.h,v 1.5 2009/09/01 09:29:40 nifi Exp $ */
#ifndef CONTIKI_CONF_H
#define CONTIKI_CONF_H
@ -106,10 +106,12 @@ typedef unsigned long off_t;
#define SPI_TXBUF U0TXBUF
#define SPI_RXBUF U0RXBUF
/* USART0 Tx buffer ready? */
/* USART0 Tx ready? */
#define SPI_WAITFOREOTx() while ((U0TCTL & TXEPT) == 0)
/* USART0 Rx buffer ready? */
#define SPI_WAITFOREORx() while ((IFG1 & URXIFG0) == 0)
/* USART0 Tx buffer ready? */
#define SPI_WAITFOREOTxBUF() while ((IFG1 & UTXIFG0) == 0)
#define SCK 1 /* P3.1 - Output: SPI Serial Clock (SCLK) */
#define MOSI 2 /* P3.2 - Output: SPI Master out - slave in (MOSI) */