Skip to content

Commit 1a12c0f

Browse files
author
Kyle Kearney
committed
Restore old qspi_alt_size_t values as compatibility macros
1 parent 71d4554 commit 1a12c0f

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

TESTS/mbed_hal/qspi/qspi_test_utils.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ struct Qspi {
102102
#define ADDR_SIZE_24 QSPI_CFG_ADDR_SIZE_24
103103
#define ADDR_SIZE_32 QSPI_CFG_ADDR_SIZE_32
104104

105-
#define ALT_SIZE_8 8u
106-
#define ALT_SIZE_16 16u
107-
#define ALT_SIZE_24 24u
108-
#define ALT_SIZE_32 32u
105+
#define ALT_SIZE_8 QSPI_CFG_ALT_SIZE_8
106+
#define ALT_SIZE_16 QSPI_CFG_ALT_SIZE_16
107+
#define ALT_SIZE_24 QSPI_CFG_ALT_SIZE_24
108+
#define ALT_SIZE_32 QSPI_CFG_ALT_SIZE_32
109109

110110
#define STATUS_REG QSPI_CMD_RDSR
111111
#define CONFIG_REG0 QSPI_CMD_RDCR0

hal/qspi_api.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ typedef enum qspi_address_size {
6262
*/
6363
typedef uint8_t qspi_alt_size_t;
6464

65+
// The following defines are provided for backwards compatibilty. New code should explicitly
66+
// specify the required number of alt bits.
67+
#define QSPI_CFG_ALT_SIZE_8 8u
68+
#define QSPI_CFG_ALT_SIZE_16 16u
69+
#define QSPI_CFG_ALT_SIZE_24 24u
70+
#define QSPI_CFG_ALT_SIZE_32 32u
71+
6572
/** QSPI command
6673
*
6774
* Defines a frame format. It consists of instruction, address, alternative, dummy count and data

0 commit comments

Comments
 (0)