File: 0009-W25Q80BV-Make-flash-command-details-private.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 (58 lines) | stat: -rw-r--r-- 1,745 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From 2dd0283549df3948d15469d69ba6b9ac8bae118d Mon Sep 17 00:00:00 2001
From: Jared Boone <jboone@earfeast.com>
Date: Tue, 4 Nov 2014 17:07:11 -0800
Subject: [PATCH 09/68] W25Q80BV: Make flash command details private.

---
 firmware/common/w25q80bv.c | 11 +++++++++++
 firmware/common/w25q80bv.h | 12 ------------
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/firmware/common/w25q80bv.c b/firmware/common/w25q80bv.c
index a325b46..b9c5461 100644
--- a/firmware/common/w25q80bv.c
+++ b/firmware/common/w25q80bv.c
@@ -31,6 +31,17 @@
 #include "w25q80bv.h"
 #include "w25q80bv_drv.h"
 
+#define W25Q80BV_WRITE_ENABLE 0x06
+#define W25Q80BV_CHIP_ERASE   0xC7
+#define W25Q80BV_READ_STATUS1 0x05
+#define W25Q80BV_PAGE_PROGRAM 0x02
+#define W25Q80BV_DEVICE_ID    0xAB
+#define W25Q80BV_UNIQUE_ID    0x4B
+
+#define W25Q80BV_STATUS_BUSY  0x01
+
+#define W25Q80BV_DEVICE_ID_RES  0x13 /* Expected device_id for W25Q80BV */
+
 /*
  * Set up pins for GPIO and SPI control, configure SSP0 peripheral for SPI.
  * SSP0_SSEL is controlled by GPIO in order to handle various transfer lengths.
diff --git a/firmware/common/w25q80bv.h b/firmware/common/w25q80bv.h
index d58802d..0bcf6bf 100644
--- a/firmware/common/w25q80bv.h
+++ b/firmware/common/w25q80bv.h
@@ -30,18 +30,6 @@
 #define W25Q80BV_NUM_PAGES    4096U
 #define W25Q80BV_NUM_BYTES    1048576U
 
-#define W25Q80BV_WRITE_ENABLE 0x06
-#define W25Q80BV_CHIP_ERASE   0xC7
-#define W25Q80BV_READ_STATUS1 0x05
-#define W25Q80BV_PAGE_PROGRAM 0x02
-#define W25Q80BV_DEVICE_ID    0xAB
-#define W25Q80BV_UNIQUE_ID    0x4B
-
-#define W25Q80BV_STATUS_BUSY  0x01
-
-
-#define W25Q80BV_DEVICE_ID_RES  0x13 /* Expected device_id for W25Q80BV */
-
 typedef union
 {
 	uint64_t id_64b;
-- 
2.1.4