Fix broken sgpio-rx project, broken due to massive changes to how RF path and tuning is done.

This commit is contained in:
Jared Boone
2013-11-20 15:24:50 -08:00
parent 893c20e41f
commit 02ba23bf68
2 changed files with 7 additions and 20 deletions

View File

@ -24,6 +24,8 @@ BINARY = sgpio-rx
SRC = $(BINARY).c \ SRC = $(BINARY).c \
../common/hackrf_core.c \ ../common/hackrf_core.c \
../common/tuning.c \
../common/rf_path.c \
../common/sgpio.c \ ../common/sgpio.c \
../common/si5351c.c \ ../common/si5351c.c \
../common/max2837.c \ ../common/max2837.c \

View File

@ -21,16 +21,12 @@
*/ */
#include <libopencm3/lpc43xx/gpio.h> #include <libopencm3/lpc43xx/gpio.h>
#include <libopencm3/lpc43xx/scu.h>
#include <libopencm3/lpc43xx/sgpio.h> #include <libopencm3/lpc43xx/sgpio.h>
#include <libopencm3/lpc43xx/cgu.h>
#include <libopencm3/cm3/scs.h>
#include <hackrf_core.h> #include <hackrf_core.h>
#include <max5864.h> #include <rf_path.h>
#include <max2837.h>
#include <rffc5071.h>
#include <sgpio.h> #include <sgpio.h>
#include <tuning.h>
void tx_test() { void tx_test() {
sgpio_configure(TRANSCEIVER_MODE_TX, false); sgpio_configure(TRANSCEIVER_MODE_TX, false);
@ -91,27 +87,16 @@ void rx_test() {
int main(void) { int main(void) {
const uint32_t freq = 2700000000U; const uint32_t freq = 2700000000U;
uint8_t switchctrl = 0;
pin_setup(); pin_setup();
enable_1v8_power(); enable_1v8_power();
cpu_clock_init(); cpu_clock_init();
ssp1_init(); ssp1_init();
ssp1_set_mode_max2837(); rf_path_init();
max2837_setup(); rf_path_set_direction(RF_PATH_DIRECTION_RX);
rffc5071_setup();
#ifdef JAWBREAKER
switchctrl = (SWITCHCTRL_AMP_BYPASS | SWITCHCTRL_HP);
#endif
rffc5071_rx(switchctrl);
rffc5071_set_frequency(500); // 500 MHz
max2837_set_frequency(freq); set_freq(freq / 1000000, freq % 1000000);
max2837_start();
max2837_rx();
ssp1_set_mode_max5864();
max5864_xcvr();
rx_test(); rx_test();
gpio_set(PORT_LED1_3, (PIN_LED2)); /* LED2 on */ gpio_set(PORT_LED1_3, (PIN_LED2)); /* LED2 on */