@@ -33,7 +33,7 @@ extern "C" {
33
33
* @{
34
34
*/
35
35
36
- /** QSPI HAL object declaration
36
+ /** QSPI HAL object
37
37
*/
38
38
typedef struct qspi_s qspi_t ;
39
39
@@ -47,7 +47,7 @@ typedef enum qspi_bus_width {
47
47
QSPI_CFG_BUS_QUAD ,
48
48
} qspi_bus_width_t ;
49
49
50
- /** Address size
50
+ /** Address size in bits
51
51
*/
52
52
typedef enum qspi_address_size {
53
53
QSPI_CFG_ADDR_SIZE_8 ,
@@ -56,7 +56,7 @@ typedef enum qspi_address_size {
56
56
QSPI_CFG_ADDR_SIZE_32 ,
57
57
} qspi_address_size_t ;
58
58
59
- /** Alternative size
59
+ /** Alternative size in bits
60
60
*/
61
61
typedef enum qspi_alt_size {
62
62
QSPI_CFG_ALT_SIZE_8 ,
@@ -65,9 +65,9 @@ typedef enum qspi_alt_size {
65
65
QSPI_CFG_ALT_SIZE_32 ,
66
66
} qspi_alt_size_t ;
67
67
68
- /** QSPI command declaration
68
+ /** QSPI command
69
69
*
70
- * Defines a frame format
70
+ * Defines a frame format. It consists of instruction, address, alternative, dummy count and data
71
71
*/
72
72
typedef struct qspi_command {
73
73
struct {
@@ -148,35 +148,33 @@ qspi_status_t qspi_frequency(qspi_t *obj, int hz);
148
148
* @param obj QSPI object
149
149
* @param command QSPI command
150
150
* @param data TX buffer
151
- * @param[in,out] in - length TX buffer length in bytes, out - number of bytes written
151
+ * @param[in,out] length in - TX buffer length in bytes, out - number of bytes written
152
152
* @return QSPI_STATUS_OK if the data has been succesfully sent
153
153
QSPI_STATUS_INVALID_PARAMETER if invalid parameter found
154
154
QSPI_STATUS_ERROR otherwise
155
155
*/
156
156
qspi_status_t qspi_write (qspi_t * obj , const qspi_command_t * command , const void * data , size_t * length );
157
157
158
- /** Send a command (and optionally data) and get the response. Can be used to send/receive device specific commands.
158
+ /** Send a command (and optionally data) and get the response. Can be used to send/receive device specific commands
159
159
*
160
160
* @param obj QSPI object
161
161
* @param command QSPI command
162
162
* @param tx_data TX buffer
163
- * @param tx_length pointer to variable holding TX buffer length
164
- * @param rx_data TX buffer
165
- * @param rx_length pointer to variable holding TX buffer length
163
+ * @param tx_length TX buffer length in bytes
164
+ * @param rx_data RX buffer
165
+ * @param rx_length RX buffer length in bytes
166
166
* @return QSPI_STATUS_OK if the data has been succesfully sent
167
167
QSPI_STATUS_INVALID_PARAMETER if invalid parameter found
168
168
QSPI_STATUS_ERROR otherwise
169
169
*/
170
-
171
170
qspi_status_t qspi_command_transfer (qspi_t * obj , const qspi_command_t * command , const void * tx_data , size_t tx_size , void * rx_data , size_t rx_size );
172
171
173
-
174
172
/** Receive a command and block of data
175
173
*
176
174
* @param obj QSPI object
177
175
* @param command QSPI command
178
176
* @param data RX buffer
179
- * @param[in,out] in - length RX buffer length in bytes, out - number of bytes read
177
+ * @param[in,out] length in - RX buffer length in bytes, out - number of bytes read
180
178
* @return QSPI_STATUS_OK if data has been succesfully received
181
179
QSPI_STATUS_INVALID_PARAMETER if invalid parameter found
182
180
QSPI_STATUS_ERROR otherwise
0 commit comments