File: 0017-RFFC5071-Delay-switching-data-direction-until-after-.patch

package info (click to toggle)
hackrf 2015.07.2-11
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 69,764 kB
  • ctags: 9,327
  • sloc: ansic: 13,907; python: 696; vhdl: 218; sh: 32; makefile: 15
file content (29 lines) | stat: -rw-r--r-- 911 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 487b8cc16893ffbac136e827eb0a92b0b6987b98 Mon Sep 17 00:00:00 2001
From: Jared Boone <jboone@earfeast.com>
Date: Sat, 8 Nov 2014 23:28:26 -0800
Subject: [PATCH 17/68] RFFC5071: Delay switching data direction until after
 target unselected.

---
 firmware/common/rffc5071_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/firmware/common/rffc5071_drv.c b/firmware/common/rffc5071_drv.c
index 81ee297..41d748c 100644
--- a/firmware/common/rffc5071_drv.c
+++ b/firmware/common/rffc5071_drv.c
@@ -157,10 +157,10 @@ void rffc5071_spi_transfer(rffc5071_driver_t* const drv, uint16_t* const data, c
 		rffc5071_spi_sck();
 	}
 	data[1] = rffc5071_spi_exchange_word(data[1], 16);
-	rffc5071_spi_direction_out();
 
 	rffc5071_spi_serial_delay();
 	rffc5071_target_unselect();
+	rffc5071_spi_direction_out();
 
 	/*
 	 * The device requires a clock while ENX is high after a serial
-- 
2.1.4