![]() |
MAX32665 SDK Documentation
0.2
Software Development Kit Overview and API Documentation
|
Modules | |
| MX25 SPI Command Definitions | |
Macros | |
| #define | MX25_Read_DUMMY 8 |
| Dummy byte sent on a standard read command per the MX25 datasheet. More... | |
| #define | MX25_DREAD_DUMMY 4 |
| Dummy data sent on a fast-read (Dual) read command per the MX25 datasheet. More... | |
| #define | MX25_QREAD_DUMMY 6 |
| Dummy data sent on a fast-read (Quad) read command per the MX25 datasheet. More... | |
| #define | MX25_WIP_MASK 0x01 |
| Status Register. | |
| #define | MX25_WEL_MASK 0x02 |
| Write Enable Latch mask. | |
| #define | MX25_QE_MASK 0x40 |
| Quad-SPI enable mask. | |
| #define | MX25_WP_MASK 0x80 |
| Write protect enable mask. | |
Enumerations | |
| enum | MX25_Erase_t { MX25_Erase_4K, MX25_Erase_32K, MX25_Erase_64K } |
| Enumeration type to select the size for an Erase command. More... | |
Functions | |
| int | MX25_Init (void) |
| Initialize SPI configuration and reset n25q. More... | |
| int | MX25_Reset (void) |
| Reset the MX25 flash memory. More... | |
| uint32_t | MX25_ID (void) |
| Read manufacturer ID. More... | |
| int | MX25_Quad (int enable) |
| Enable/Disable the Quad Enable(QE) bit in the status register. More... | |
| int | MX25_Read (uint32_t address, uint8_t *rx_buf, uint32_t rx_len, spixfc_width_t width) |
| Read data out by using 4-wire SPI mode. More... | |
| int | MX25_Write_Protect (int enable) |
| enable write protection More... | |
| int | MX25_Program_Page (uint32_t address, const uint8_t *tx_buf, uint32_t tx_len, spixfc_width_t width) |
Program the memory to tx_buf and length tx_len, applies to both SPI and QPI modes. More... | |
| int | MX25_Bulk_Erase (void) |
| Bulk erase the MX25 flash memory. More... | |
| int | MX25_Erase (uint32_t address, MX25_Erase_t size) |
| Erase memory segments. More... | |
| int | MX25_Read_SR (uint8_t *buf) |
| Read status register. More... | |
| int | MX25_Write_SR (uint8_t value) |
| Write status register. More... | |
| #define MX25_Read_DUMMY 8 |
| #define MX25_DREAD_DUMMY 4 |
| #define MX25_QREAD_DUMMY 6 |
| enum MX25_Erase_t |
| int MX25_Init | ( | void | ) |
| int MX25_Reset | ( | void | ) |
| uint32_t MX25_ID | ( | void | ) |
| int MX25_Quad | ( | int | enable | ) |
| enable |
|
| int MX25_Read | ( | uint32_t | address, |
| uint8_t * | rx_buf, | ||
| uint32_t | rx_len, | ||
| spixfc_width_t | width | ||
| ) |
| address | Start address to read from |
| rx_buf | Pointer to the buffer of receiving data |
| rx_len | Size of the data to read |
| width | spi_width_t for how many data lines to use |
| int MX25_Write_Protect | ( | int | enable | ) |
| enable | Write protect state |
| int MX25_Program_Page | ( | uint32_t | address, |
| const uint8_t * | tx_buf, | ||
| uint32_t | tx_len, | ||
| spixfc_width_t | width | ||
| ) |
| address | Start address to program. |
| tx_buf | Pointer to the buffer of data to write. |
| tx_len | Size of the data to write. |
| width | spi_width_t for how many data lines to use. |
| int MX25_Bulk_Erase | ( | void | ) |
| int MX25_Erase | ( | uint32_t | address, |
| MX25_Erase_t | size | ||
| ) |
| address | Start address to begin erasing. |
| size | Size to erase, see MX25_Erase_t. |
| int MX25_Read_SR | ( | uint8_t * | buf | ) |
| buf | Pointer to store the value of the status register. |
| int MX25_Write_SR | ( | uint8_t | value | ) |
| value | Value to write to the status register. |