mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-01 14:34:31 +00:00
refactor(spi_flash): Use new spi_flash register sturct and deperecate the old one
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -393,10 +393,10 @@ typedef union {
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** usr_mosi_dbitlen : R/W; bitpos: [9:0]; default: 0;
|
||||
/** usr_mosi_bit_len : R/W; bitpos: [9:0]; default: 0;
|
||||
* The length in bits of write-data. The register value shall be (bit_num-1).
|
||||
*/
|
||||
uint32_t usr_mosi_dbitlen:10;
|
||||
uint32_t usr_mosi_bit_len:10;
|
||||
uint32_t reserved_10:22;
|
||||
};
|
||||
uint32_t val;
|
||||
@@ -407,10 +407,10 @@ typedef union {
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** usr_miso_dbitlen : R/W; bitpos: [9:0]; default: 0;
|
||||
/** usr_miso_bit_len : R/W; bitpos: [9:0]; default: 0;
|
||||
* The length in bits of read-data. The register value shall be (bit_num-1).
|
||||
*/
|
||||
uint32_t usr_miso_dbitlen:10;
|
||||
uint32_t usr_miso_bit_len:10;
|
||||
uint32_t reserved_10:22;
|
||||
};
|
||||
uint32_t val;
|
||||
@@ -807,217 +807,6 @@ typedef union {
|
||||
uint32_t val;
|
||||
} spi1_mem_c_tx_crc_reg_t;
|
||||
|
||||
|
||||
/** Group: Memory data buffer register */
|
||||
/** Type of w0 register
|
||||
* SPI1 memory data buffer0
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf0 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf0:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w0_reg_t;
|
||||
|
||||
/** Type of w1 register
|
||||
* SPI1 memory data buffer1
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf1 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf1:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w1_reg_t;
|
||||
|
||||
/** Type of w2 register
|
||||
* SPI1 memory data buffer2
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf2 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf2:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w2_reg_t;
|
||||
|
||||
/** Type of w3 register
|
||||
* SPI1 memory data buffer3
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf3 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf3:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w3_reg_t;
|
||||
|
||||
/** Type of w4 register
|
||||
* SPI1 memory data buffer4
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf4 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf4:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w4_reg_t;
|
||||
|
||||
/** Type of w5 register
|
||||
* SPI1 memory data buffer5
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf5 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf5:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w5_reg_t;
|
||||
|
||||
/** Type of w6 register
|
||||
* SPI1 memory data buffer6
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf6 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf6:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w6_reg_t;
|
||||
|
||||
/** Type of w7 register
|
||||
* SPI1 memory data buffer7
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf7 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf7:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w7_reg_t;
|
||||
|
||||
/** Type of w8 register
|
||||
* SPI1 memory data buffer8
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf8 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf8:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w8_reg_t;
|
||||
|
||||
/** Type of w9 register
|
||||
* SPI1 memory data buffer9
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf9 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf9:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w9_reg_t;
|
||||
|
||||
/** Type of w10 register
|
||||
* SPI1 memory data buffer10
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf10 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf10:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w10_reg_t;
|
||||
|
||||
/** Type of w11 register
|
||||
* SPI1 memory data buffer11
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf11 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf11:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w11_reg_t;
|
||||
|
||||
/** Type of w12 register
|
||||
* SPI1 memory data buffer12
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf12 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf12:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w12_reg_t;
|
||||
|
||||
/** Type of w13 register
|
||||
* SPI1 memory data buffer13
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf13 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf13:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w13_reg_t;
|
||||
|
||||
/** Type of w14 register
|
||||
* SPI1 memory data buffer14
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf14 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf14:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w14_reg_t;
|
||||
|
||||
/** Type of w15 register
|
||||
* SPI1 memory data buffer15
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
/** buf15 : R/W/SS; bitpos: [31:0]; default: 0;
|
||||
* data buffer
|
||||
*/
|
||||
uint32_t buf15:32;
|
||||
};
|
||||
uint32_t val;
|
||||
} spi1_mem_c_w15_reg_t;
|
||||
|
||||
|
||||
/** Group: Interrupt registers */
|
||||
/** Type of int_ena register
|
||||
* SPI1 interrupt enable register
|
||||
@@ -1208,7 +997,7 @@ typedef union {
|
||||
|
||||
typedef struct spi1_mem_c_dev_s {
|
||||
volatile spi1_mem_c_cmd_reg_t cmd;
|
||||
volatile spi1_mem_c_addr_reg_t addr;
|
||||
volatile uint32_t addr;
|
||||
volatile spi1_mem_c_ctrl_reg_t ctrl;
|
||||
volatile spi1_mem_c_ctrl1_reg_t ctrl1;
|
||||
volatile spi1_mem_c_ctrl2_reg_t ctrl2;
|
||||
@@ -1224,22 +1013,7 @@ typedef struct spi1_mem_c_dev_s {
|
||||
volatile spi1_mem_c_tx_crc_reg_t tx_crc;
|
||||
volatile spi1_mem_c_cache_fctrl_reg_t cache_fctrl;
|
||||
uint32_t reserved_040[6];
|
||||
volatile spi1_mem_c_w0_reg_t w0;
|
||||
volatile spi1_mem_c_w1_reg_t w1;
|
||||
volatile spi1_mem_c_w2_reg_t w2;
|
||||
volatile spi1_mem_c_w3_reg_t w3;
|
||||
volatile spi1_mem_c_w4_reg_t w4;
|
||||
volatile spi1_mem_c_w5_reg_t w5;
|
||||
volatile spi1_mem_c_w6_reg_t w6;
|
||||
volatile spi1_mem_c_w7_reg_t w7;
|
||||
volatile spi1_mem_c_w8_reg_t w8;
|
||||
volatile spi1_mem_c_w9_reg_t w9;
|
||||
volatile spi1_mem_c_w10_reg_t w10;
|
||||
volatile spi1_mem_c_w11_reg_t w11;
|
||||
volatile spi1_mem_c_w12_reg_t w12;
|
||||
volatile spi1_mem_c_w13_reg_t w13;
|
||||
volatile spi1_mem_c_w14_reg_t w14;
|
||||
volatile spi1_mem_c_w15_reg_t w15;
|
||||
volatile uint32_t data_buf[16];
|
||||
volatile spi1_mem_c_flash_waiti_ctrl_reg_t flash_waiti_ctrl;
|
||||
volatile spi1_mem_c_flash_sus_ctrl_reg_t flash_sus_ctrl;
|
||||
volatile spi1_mem_c_flash_sus_cmd_reg_t flash_sus_cmd;
|
||||
@@ -1259,7 +1033,6 @@ typedef struct spi1_mem_c_dev_s {
|
||||
volatile spi1_mem_c_date_reg_t date;
|
||||
} spi1_mem_c_dev_t;
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
_Static_assert(sizeof(spi1_mem_c_dev_t) == 0x400, "Invalid size of spi1_mem_c_dev_t structure");
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user