mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-10-03 11:57:28 +00:00
fixed naming of SPI and CC2420 related code
This commit is contained in:
parent
80942abaf7
commit
705f8cc451
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)$Id: cc2420-arch-sfd.c,v 1.3 2010/01/26 10:20:16 adamdunkels Exp $
|
||||
* @(#)$Id: cc2420-arch-sfd.c,v 1.4 2010/06/23 10:19:15 joxe Exp $
|
||||
*/
|
||||
|
||||
#include <io.h>
|
||||
@ -34,6 +34,7 @@
|
||||
|
||||
#include "dev/spi.h"
|
||||
#include "dev/cc2420.h"
|
||||
#include "contiki-conf.h"
|
||||
|
||||
volatile uint8_t cc2420_arch_sfd_counter;
|
||||
volatile uint16_t cc2420_arch_sfd_start_time;
|
||||
@ -48,7 +49,7 @@ cc24240_timerb1_interrupt(void)
|
||||
ENERGEST_ON(ENERGEST_TYPE_IRQ);
|
||||
/* always read TBIV to clear IFG */
|
||||
tbiv = TBIV;
|
||||
if(SFD_IS_1) {
|
||||
if(CC2420_SFD_IS_1) {
|
||||
cc2420_arch_sfd_counter++;
|
||||
cc2420_arch_sfd_start_time = TBCCR1;
|
||||
} else {
|
||||
@ -62,7 +63,7 @@ void
|
||||
cc2420_arch_sfd_init(void)
|
||||
{
|
||||
/* Need to select the special function! */
|
||||
P4SEL = BV(SFD);
|
||||
P4SEL = BV(CC2420_SFD_PIN);
|
||||
|
||||
/* start timer B - 32768 ticks per second */
|
||||
TBCTL = TBSSEL_1 | TBCLR;
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)$Id: cc2420-arch.c,v 1.8 2010/05/10 11:32:44 nifi Exp $
|
||||
* @(#)$Id: cc2420-arch.c,v 1.9 2010/06/23 10:19:15 joxe Exp $
|
||||
*/
|
||||
|
||||
#include <io.h>
|
||||
@ -47,7 +47,7 @@
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
interrupt(PORT1_VECTOR)
|
||||
interrupt(CC2420_IRQ_VECTOR)
|
||||
cc24240_port1_interrupt(void)
|
||||
{
|
||||
ENERGEST_ON(ENERGEST_TYPE_IRQ);
|
||||
@ -64,12 +64,14 @@ cc2420_arch_init(void)
|
||||
spi_init();
|
||||
|
||||
/* all input by default, set these as output */
|
||||
P4DIR |= BV(CSN) | BV(VREG_EN) | BV(RESET_N);
|
||||
CC2420_CSN_PORT(DIR) |= BV(CC2420_CSN_PIN);
|
||||
CC2420_VREG_PORT(DIR) |= BV(CC2420_VREG_PIN);
|
||||
CC2420_RESET_PORT(DIR) |= BV(CC2420_RESET_PIN);
|
||||
|
||||
#if CONF_SFD_TIMESTAMPS
|
||||
cc2420_arch_sfd_init();
|
||||
#endif
|
||||
|
||||
SPI_DISABLE(); /* Unselect radio. */
|
||||
CC2420_SPI_DISABLE(); /* Unselect radio. */
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
Loading…
Reference in New Issue
Block a user