/*================================================================================================ cc1100.c SiWiCom copyright 2006 v1.0 (2006-05-11) Name: Joakim Nilsson E-mail: mail@jopin.se Name: Christoffer Martinsson E-mail: cm@cmtec.se Description: Routines for cc1100. Uses usart.h as tranceiver Hardware configuration is done by hardware.h witch must contain definitions for: (X=letter i.e PORTX=PORTB, n=number i.e PXn=PB4) GDO0 PXn (Example: #define GDO0 PC1) GDO0_PORT PORTX (Example: #define GDO0_PORT PORTC) GDO0_DDR DDRX (Example: #define GDO0_DDR DDRC) GDO0_PIN PINX (Example: #define GDO0_PIN PINC) GDO2 PXn (Example: #define GDO2 PD3) GDO2_PORT PORTX (Example: #define GDO2_PORT PORTD) GDO2_DDR DDRX (Example: #define GDO2_DDR DDRD) GDO2_PIN PINX (Example: #define GDO2_PIN PIND) CS_CC1100 SPI_CSX_NR (Example: #define CS_CC1100 SPI_CS0_NR) ================================================================================================*/ #include "hardware.h" #include #include #include #include "spi.h" #include "cc1100.h" /*================================================================================================ Functions ================================================================================================*/ /*================================================================================================ cc1100Select Description: Select cc1100 as slave Input: - Output: - ------------------------------------------------------------------------------------------------*/ void cc1100Select(void) { spiChipSelect(CS_CC1100); while(SPI_PIN & (1<