aboutsummaryrefslogtreecommitdiff
path: root/spiflash_n25q128.h
diff options
context:
space:
mode:
Diffstat (limited to 'spiflash_n25q128.h')
-rw-r--r--spiflash_n25q128.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/spiflash_n25q128.h b/spiflash_n25q128.h
index 50243bd..926be56 100644
--- a/spiflash_n25q128.h
+++ b/spiflash_n25q128.h
@@ -70,13 +70,13 @@ struct spiflash_ctx {
uint16_t cs_n_pin;
};
-extern int n25q128_check_id(struct spiflash_ctx *ctx);
-extern int n25q128_read_data(struct spiflash_ctx *ctx, uint32_t offset, uint8_t *buf, const uint32_t len);
-extern int n25q128_write_page(struct spiflash_ctx *ctx, uint32_t page_offset, const uint8_t *page_buffer);
-extern int n25q128_write_data(struct spiflash_ctx *ctx, uint32_t offset, const uint8_t *buf, const uint32_t len);
-extern int n25q128_erase_subsector(struct spiflash_ctx *ctx, uint32_t subsector_offset);
-extern int n25q128_erase_sector(struct spiflash_ctx *ctx, uint32_t sector_offset);
-extern int n25q128_erase_bulk(struct spiflash_ctx *ctx);
+extern HAL_StatusTypeDef n25q128_check_id(struct spiflash_ctx *ctx);
+extern HAL_StatusTypeDef n25q128_read_data(struct spiflash_ctx *ctx, uint32_t offset, uint8_t *buf, const uint32_t len);
+extern HAL_StatusTypeDef n25q128_write_page(struct spiflash_ctx *ctx, uint32_t page_offset, const uint8_t *page_buffer);
+extern HAL_StatusTypeDef n25q128_write_data(struct spiflash_ctx *ctx, uint32_t offset, const uint8_t *buf, const uint32_t len);
+extern HAL_StatusTypeDef n25q128_erase_subsector(struct spiflash_ctx *ctx, uint32_t subsector_offset);
+extern HAL_StatusTypeDef n25q128_erase_sector(struct spiflash_ctx *ctx, uint32_t sector_offset);
+extern HAL_StatusTypeDef n25q128_erase_bulk(struct spiflash_ctx *ctx);
#define n25q128_read_page(ctx, page_offset, page_buffer) \
n25q128_read_data(ctx, page_offset * N25Q128_PAGE_SIZE, page_buffer, N25Q128_PAGE_SIZE)
'>257033e
6c6a0f2
257033e




5af178d

257033e















49ac884
257033e




6f479d8

257033e














6c6a0f2
257033e




6c6a0f2
257033e







6c6a0f2
257033e




6c6a0f2
257033e









6c6a0f2
257033e

eda8dae
257033e

6c6a0f2

257033e


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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154