Quad Serial Peripheral Interface (QSPI) driver for SAMV71.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include "qspi.h"
Functions | |
static void | _qspi_memcpy (uint8_t *dst, uint8_t *src, uint32_t count) |
Memory copy function. More... | |
static void | qspi_disable_wait_data_read_before_transfer (Qspi *qspi) |
Disable waiting RX_EMPTY before transfer starts. More... | |
static void | qspi_enable_wait_data_read_before_transfer (Qspi *qspi) |
Enable waiting RX_EMPTY before transfer starts. More... | |
static void | qspi_end_transfer (Qspi *qspi) |
Ends ongoing transfer by releasing CS of QSPI peripheral. More... | |
enum status_code | qspi_flash_access_memory (struct qspid_t *qspid, enum qspi_access read_write, uint8_t scramble_flag) |
Writes or reads the QSPI memory (0x80000000) to trasmit or receive data from Flash memory. More... | |
enum status_code | qspi_flash_execute_command (struct qspid_t *qspid, enum qspi_access read_write) |
Send instruction over QSPI with data. More... | |
void | qspi_get_config_default (struct qspi_config_t *qspi_config) |
Get default config. More... | |
enum status_code | qspi_initialize (Qspi *qspi, struct qspi_config_t *qspi_config) |
Config qspi according the config struct. More... | |
enum status_code | qspi_read (Qspi *qspi, uint16_t *us_data, uint32_t num_of_bytes) |
Qspi read data. More... | |
static uint16_t | qspi_read_spi (Qspi *qspi) |
Read QSPI RDR register for SPI mode. More... | |
static void | qspi_set_bits_per_transfer (Qspi *qspi, uint32_t bits) |
Set the number of data bits transferred. More... | |
static void | qspi_set_chip_select_mode (Qspi *qspi, uint32_t csmode) |
Set Chip Select Mode. More... | |
static enum status_code | qspi_set_config (Qspi *qspi, struct qspi_config_t *qspi_config) |
Config qspi according the config struct. More... | |
static void | qspi_set_delay_between_consecutive_transfers (Qspi *qspi, uint32_t uc_dlycs) |
Set qspi delay between consecutive transfers. More... | |
void | qspi_set_instruction_frame (Qspi *qspi, struct qspi_inst_frame_t instruction_frame) |
Set qspi instruction frame. More... | |
static void | qspi_set_memory_mode (Qspi *qspi) |
Set QSPI to Memory mode. More... | |
static void | qspi_set_minimum_inactive_qcs_delay (Qspi *qspi, uint8_t uc_dlybct) |
Set qspi minimum inactive QCS delay. More... | |
static void | qspi_set_spi_mode (Qspi *qspi) |
Set QSPI to SPI mode (Master mode only). More... | |
static void | qspi_set_transfer_delay (Qspi *qspi, uint8_t uc_dlybs) |
Set qspi clock transfer delay. More... | |
enum status_code | qspi_write (Qspi *qspi, uint16_t *us_data, uint32_t num_of_bytes) |
Qspi write data. More... | |
static void | qspi_write_spi (Qspi *qspi, uint16_t w_data) |
Write to QSPI Tx register in SPI mode. More... | |