From 9424c395f643ec0aece488a26b6f4ef1e44affd6 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sat, 19 May 2012 20:12:39 +0000 Subject: enable/disable PA and LNA git-svn-id: https://svn.spreadspace.org/mur.sat@439 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/hhd70dongle/spi.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'software/hhd70dongle/spi.c') diff --git a/software/hhd70dongle/spi.c b/software/hhd70dongle/spi.c index 39d3cd8..426684a 100644 --- a/software/hhd70dongle/spi.c +++ b/software/hhd70dongle/spi.c @@ -33,18 +33,6 @@ #include "spi.h" -#define SPI_DDR DDRB -#define SPI_PORT PORTB -#define SPI_PINB_REG PINB -#define CS DDB0 -#define SCK DDB1 -#define MOSI DDB2 -#define MISO DDB3 -#define GDO2 DDB4 -#define GDO0 DDB5 -#define RE DDB6 -#define TE DDB7 - void spi_init(void) { //configure Direction of SS / PB0 , MOSI and SCLK as Output to drive CS of CC1101 @@ -99,4 +87,24 @@ char spi_read_byte(void) { //transmit something so SCLK runs for 8 bits, so that slave can transfer 1 byte return spi_exchange_byte(0); +} + +void hhd70_pa_enable(void) +{ + SPI_PORT |= ~(1<