Fix long-standing example projects breakage due to tuning and SGPIO API and dependency changes.

This commit is contained in:
Jared Boone
2014-01-02 18:24:55 -08:00
parent 7c2f252d37
commit 574056c495
9 changed files with 35 additions and 12 deletions

View File

@ -26,7 +26,10 @@ BINARY = blinky
SRC = $(BINARY).c \
../common/hackrf_core.c \
../common/sgpio.c \
../common/rf_path.c \
../common/si5351c.c \
../common/max2837.c
../common/max2837.c \
../common/max5864.c \
../common/rffc5071.c
include ../common/Makefile_inc.mk

View File

@ -4,9 +4,11 @@ BINARY = mixertx
SRC = $(BINARY).c \
../common/hackrf_core.c \
../common/rf_path.c \
../common/sgpio.c \
../common/si5351c.c \
../common/max2837.c \
../common/max5864.c \
../common/rffc5071.c
include ../common/Makefile_inc.mk

View File

@ -29,7 +29,8 @@
#include <tuning.h>
void tx_test() {
sgpio_configure(TRANSCEIVER_MODE_TX, false);
sgpio_set_slice_mode(false);
sgpio_configure(TRANSCEIVER_MODE_TX);
// LSB goes out first, samples are 0x<Q1><I1><Q0><I0>
volatile uint32_t buffer[] = {
@ -50,7 +51,8 @@ void tx_test() {
}
void rx_test() {
sgpio_configure(TRANSCEIVER_MODE_RX, false);
sgpio_set_slice_mode(false);
sgpio_configure(TRANSCEIVER_MODE_RX);
volatile uint32_t buffer[4096];
uint32_t i = 0;
@ -86,7 +88,7 @@ void rx_test() {
int main(void) {
const uint32_t freq = 2700000000U;
const uint64_t freq = 2700000000U;
pin_setup();
enable_1v8_power();
@ -95,7 +97,7 @@ int main(void) {
rf_path_init();
rf_path_set_direction(RF_PATH_DIRECTION_RX);
set_freq(freq / 1000000, freq % 1000000);
set_freq(freq);
rx_test();
gpio_set(PORT_LED1_3, (PIN_LED2)); /* LED2 on */

View File

@ -24,9 +24,11 @@ BINARY = sgpio_test
SRC = $(BINARY).c \
../common/hackrf_core.c \
../common/rf_path.c \
../common/sgpio.c \
../common/si5351c.c \
../common/max2837.c \
../common/max5864.c
../common/max5864.c \
../common/rffc5071.c
include ../common/Makefile_inc.mk

View File

@ -31,7 +31,8 @@
#include <sgpio.h>
void tx_test() {
sgpio_configure(TRANSCEIVER_MODE_TX, false);
sgpio_set_slice_mode(false);
sgpio_configure(TRANSCEIVER_MODE_TX);
// LSB goes out first, samples are 0x<Q1><I1><Q0><I0>
volatile uint32_t buffer[] = {
@ -52,7 +53,8 @@ void tx_test() {
}
void rx_test() {
sgpio_configure(TRANSCEIVER_MODE_RX, false);
sgpio_set_slice_mode(false);
sgpio_configure(TRANSCEIVER_MODE_RX);
volatile uint32_t buffer[4096];
uint32_t i = 0;

View File

@ -4,8 +4,11 @@ BINARY = simpletx
SRC = $(BINARY).c \
../common/hackrf_core.c \
../common/rf_path.c \
../common/sgpio.c \
../common/si5351c.c \
../common/max2837.c
../common/max2837.c \
../common/max5864.c \
../common/rffc5071.c
include ../common/Makefile_inc.mk

View File

@ -4,8 +4,11 @@ BINARY = startup
SRC = $(BINARY).c \
../common/hackrf_core.c \
../common/rf_path.c \
../common/sgpio.c \
../common/si5351c.c \
../common/max2837.c
../common/max2837.c \
../common/max5864.c \
../common/rffc5071.c
include ../common/Makefile_inc.mk

View File

@ -4,8 +4,11 @@ BINARY = startup_systick
SRC = $(BINARY).c \
../common/hackrf_core.c \
../common/rf_path.c \
../common/sgpio.c \
../common/si5351c.c \
../common/max2837.c
../common/max2837.c \
../common/max5864.c \
../common/rffc5071.c
include ../common/Makefile_inc.mk

View File

@ -5,8 +5,11 @@ BINARY = startup_systick_perfo_SPIFI
SRC = startup_systick.c \
perf_mips.c \
../common/hackrf_core.c \
../common/rf_path.c \
../common/sgpio.c \
../common/si5351c.c \
../common/max2837.c
../common/max2837.c \
../common/max5864.c \
../common/rffc5071.c
include ../common/Makefile_inc.mk