From 413b34eb8677f17c69dcd6f1c8b8305d4d1e407f Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Thu, 1 Nov 2012 22:48:45 -0700 Subject: [PATCH 1/2] Add #includes required for Linux. --- host/libhackrf/examples/hackrf_transfer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/host/libhackrf/examples/hackrf_transfer.c b/host/libhackrf/examples/hackrf_transfer.c index 089fe823..36ef463b 100644 --- a/host/libhackrf/examples/hackrf_transfer.c +++ b/host/libhackrf/examples/hackrf_transfer.c @@ -27,6 +27,8 @@ #include #include +#include +#include #include #include #include From cc5f1c61c714b5e3c1da3818b6ef20c6b2cd54b2 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Fri, 2 Nov 2012 22:34:43 -0700 Subject: [PATCH 2/2] Fix clock edge for TX mode. TX data was completely crapped up due to skew on my Jellybean/Lemondrop board. Hopefully, this also applies to Jawbreaker. I'll recheck once I have hardware in-hand. --- firmware/common/sgpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/common/sgpio.c b/firmware/common/sgpio.c index d53c3f87..a4b74c53 100644 --- a/firmware/common/sgpio.c +++ b/firmware/common/sgpio.c @@ -167,6 +167,7 @@ void sgpio_configure( const bool input_slice = (i == 0) && (transceiver_mode == TRANSCEIVER_MODE_RX); const uint_fast8_t concat_order = (input_slice || single_slice) ? 0 : 3; const uint_fast8_t concat_enable = (input_slice || single_slice) ? 0 : 1; + const uint_fast8_t clk_capture_mode = (transceiver_mode == TRANSCEIVER_MODE_RX) ? 1 : 0; SGPIO_MUX_CFG(slice_index) = SGPIO_MUX_CFG_CONCAT_ORDER(concat_order) @@ -185,7 +186,7 @@ void sgpio_configure( | SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) | SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) | SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(1) - | SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(1) + | SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(clk_capture_mode) | SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) ;