Bouffalo SDK  1.0
Bouffalolab Software Development Kit
bflb_spi_psram.h File Reference

This file is the standard driver header file. More...

#include "bflb_sf_ctrl.h"
Include dependency graph for bflb_spi_psram.h:

Go to the source code of this file.

Data Structures

struct  spi_psram_cfg_type
 Psram ctrl configuration structure type definition. More...
 

Macros

#define PSRAM_DRIVE_STRENGTH_50_OHMS   0
 Psram drive strength type definition. More...
 
#define PSRAM_DRIVE_STRENGTH_100_OHMS   1
 
#define PSRAM_DRIVE_STRENGTH_200_OHMS   2
 
#define PSRAM_BURST_LENGTH_16_BYTES   0
 Psram burst length size type definition. More...
 
#define PSRAM_BURST_LENGTH_32_BYTES   1
 
#define PSRAM_BURST_LENGTH_64_BYTES   2
 
#define PSRAM_BURST_LENGTH_512_BYTES   3
 
#define PSRAM_SPI_CTRL_MODE   0
 Psram ctrl mode type definition. More...
 
#define PSRAM_QPI_CTRL_MODE   1
 

Functions

void bflb_psram_init (struct spi_psram_cfg_type *psram_cfg, struct sf_ctrl_cmds_cfg *cmds_cfg, struct sf_ctrl_psram_cfg *sf_ctrl_psram_cfg)
 
void bflb_psram_readreg (struct spi_psram_cfg_type *psram_cfg, uint8_t *reg_value)
 
void bflb_psram_writereg (struct spi_psram_cfg_type *psram_cfg, uint8_t *reg_value)
 
int bflb_psram_setdrivestrength (struct spi_psram_cfg_type *psram_cfg)
 
int bflb_psram_setburstwrap (struct spi_psram_cfg_type *psram_cfg)
 
void bflb_psram_readid (struct spi_psram_cfg_type *psram_cfg, uint8_t *data)
 
int bflb_psram_enterquadmode (struct spi_psram_cfg_type *psram_cfg)
 
int bflb_psram_exitquadmode (struct spi_psram_cfg_type *psram_cfg)
 
int bflb_psram_toggleburstlength (struct spi_psram_cfg_type *psram_cfg, uint8_t ctrl_mode)
 
int bflb_psram_softwarereset (struct spi_psram_cfg_type *psram_cfg, uint8_t ctrl_mode)
 
int bflb_psram_set_idbus_cfg (struct spi_psram_cfg_type *psram_cfg, uint8_t io_mode, uint32_t addr, uint32_t len)
 
int bflb_psram_cache_write_set (struct spi_psram_cfg_type *psram_cfg, uint8_t io_mode, uint8_t wt_en, uint8_t wb_en, uint8_t wa_en)
 
int bflb_psram_write (struct spi_psram_cfg_type *psram_cfg, uint8_t io_mode, uint32_t addr, uint8_t *data, uint32_t len)
 
int bflb_psram_read (struct spi_psram_cfg_type *psram_cfg, uint8_t io_mode, uint32_t addr, uint8_t *data, uint32_t len)
 

Detailed Description

This file is the standard driver header file.

Version
V1.0
Date
Attention

© COPYRIGHT(c) 2020 Bouffalo Lab

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Bouffalo Lab nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file bflb_spi_psram.h.