| 
    ChibiOS
    0.0.0
    
   | 
 
 
 | 
Macros | |
| #define | _m25q_methods _jesd216_flash_methods | 
M25Q specific methods.  More... | |
Version identification | |
| #define | EX_M25Q_VERSION "1.0.0" | 
| M25Q driver version string.  More... | |
| #define | EX_M25Q_MAJOR 1 | 
| M25Q driver version major number.  More... | |
| #define | EX_M25Q_MINOR 0 | 
| M25Q driver version minor number.  More... | |
| #define | EX_M25Q_PATCH 0 | 
| M25Q driver version patch number.  More... | |
Configuration options | |
| #define | M25Q_READ_DUMMY_CYCLES 8 | 
| Number of dummy cycles for fast read (1..15).  More... | |
| #define | M25Q_SWITCH_WIDTH TRUE | 
| Switch QSPI bus width on initialization.  More... | |
| #define | M25Q_NICE_WAITING TRUE | 
| Delays insertions.  More... | |
| #define | M25Q_USE_SUB_SECTORS FALSE | 
| Uses 4kB sub-sectors rather than 64kB sectors.  More... | |
| #define | M25Q_SUPPORTED_MANUFACTURE_IDS {0x20} | 
| Supported JEDEC manufacturer identifiers.  More... | |
| #define | M25Q_SUPPORTED_MEMORY_TYPE_IDS {0xBA, 0xBB} | 
| Supported memory type identifiers.  More... | |
| #define | M25Q_COMPARE_BUFFER_SIZE 32 | 
| Size of the compare buffer.  More... | |
Data Structures | |
| struct | M25QConfig | 
| Type of a M25Q configuration structure.  More... | |
| struct | M25QDriverVMT | 
M25Q virtual methods table.  More... | |
| struct | M25QDriver | 
| Type of M25Q flash class.  More... | |
Functions | |
| void | m25qObjectInit (M25QDriver *devp) | 
| Initializes an instance.  More... | |
| void | m25qStart (M25QDriver *devp, const M25QConfig *config) | 
| Configures and activates N25Q128 driver.  More... | |
| void | m25qStop (M25QDriver *devp) | 
| Deactivates the N25Q128 driver.  More... | |
| void | m25qMemoryMap (M25QDriver *devp, uint8_t **addrp) | 
| Enters the memory Mapping mode.  More... | |
| void | m25qMemoryUnmap (M25QDriver *devp) | 
| Leaves the memory Mapping mode.  More... | |
Variables | |
| static const struct M25QDriverVMT | m25q_vmt | 
| Virtual methods table.  More... | |
| static flash_descriptor_t | m25q_descriptor | 
| N25Q128 descriptor.  More... | |
| #define M25Q_READ_DUMMY_CYCLES 8 | 
Number of dummy cycles for fast read (1..15).
This is the number of dummy cycles to be used for fast read operations.
Definition at line 130 of file m25q.h.
Referenced by m25qMemoryMap(), and m25qStart().
| #define M25Q_SWITCH_WIDTH TRUE | 
Switch QSPI bus width on initialization.
A bus width initialization is performed by writing the Enhanced Volatile Configuration Register. If the flash device is configured using the Non Volatile Configuration Register then this option is not required.
| #define M25Q_NICE_WAITING TRUE | 
| #define M25Q_USE_SUB_SECTORS FALSE | 
| #define M25Q_SUPPORTED_MANUFACTURE_IDS {0x20} | 
| #define M25Q_SUPPORTED_MEMORY_TYPE_IDS {0xBA, 0xBB} | 
| #define M25Q_COMPARE_BUFFER_SIZE 32 | 
Size of the compare buffer.
This buffer is allocated in the stack frame of the function flashVerifyErase() and its size must be a power of two. Larger buffers lead to better verify performance but increase stack usage for that function. 
| #define _m25q_methods _jesd216_flash_methods | 
| void m25qObjectInit | ( | M25QDriver * | devp | ) | 
Initializes an instance.
| [out] | devp | pointer to the M25QDriver object | 
Definition at line 627 of file m25q.c.
References M25QDriver::config, m25q_vmt, osalDbgCheck, and M25QDriver::vmt.
| void m25qStart | ( | M25QDriver * | devp, | 
| const M25QConfig * | config | ||
| ) | 
Configures and activates N25Q128 driver.
| [in] | devp | pointer to the M25QDriver object  | 
| [in] | config | pointer to the configuration | 
Definition at line 644 of file m25q.c.
References M25QDriver::config, M25QDriver::device_id, M25Q_READ_DUMMY_CYCLES, osalDbgAssert, osalDbgCheck, qspiCommand(), qspiReceive(), qspiSend(), and flash_descriptor_t::sectors_count.

| void m25qStop | ( | M25QDriver * | devp | ) | 
Deactivates the N25Q128 driver.
| [in] | devp | pointer to the M25QDriver object | 
Definition at line 735 of file m25q.c.
References M25QDriver::config, osalDbgAssert, and osalDbgCheck.
| void m25qMemoryMap | ( | M25QDriver * | devp, | 
| uint8_t ** | addrp | ||
| ) | 
Enters the memory Mapping mode.
The memory mapping mode is only available when the QSPI mode is selected and the underlying QSPI controller supports the feature.
| [in] | devp | pointer to the M25QDriver object  | 
| [out] | addrp | pointer to the memory start address of the mapped flash or NULL  | 
Definition at line 773 of file m25q.c.
References M25QDriver::config, M25Q_READ_DUMMY_CYCLES, and qspiMapFlash().

| void m25qMemoryUnmap | ( | M25QDriver * | devp | ) | 
Leaves the memory Mapping mode.
| [in] | devp | pointer to the M25QDriver object | 
Definition at line 821 of file m25q.c.
References M25QDriver::config, and qspiUnmapFlash().

      
  | 
  static | 
Virtual methods table.
Definition at line 73 of file m25q.c.
Referenced by m25qObjectInit().
      
  | 
  static |