Header file containing functions prototypes of SPI LL library. More...
#include "gr55xx.h"
#include "math.h"
Go to the source code of this file.
Classes | |
struct | _ll_ospi_x_init_t |
OSPI init structure. More... | |
Macros | |
#define | LL_OSPI_X_TCEM_TIME_IGNORE_DISABLE 0x00 |
#define | LL_OSPI_X_TCEM_TIME_IGNORE_ENABLE 0x01 |
#define | LL_OSPI_X_TXHS_TIME_IGNORE_DISABLE 0x00 |
#define | LL_OSPI_X_TXHS_TIME_IGNORE_ENABLE 0x01 |
#define | LL_OSPI_X_ACCESS_TYPE_MEMORY_ARRAY 0x00 |
#define | LL_OSPI_X_ACCESS_TYPE_MODE_REGISTER 0x01 |
#define | LL_OSPI_X_TXDPD_TIME_IGNORE_DISABLE 0x00 |
#define | LL_OSPI_X_TXDPD_TIME_IGNORE_ENABLE 0x01 |
#define | LL_OSPI_X_READ_PREFETCH_DISABLE 0x00 |
#define | LL_OSPI_X_READ_PREFETCH_ENABLE 0x01 |
#define | LL_OSPI_X_INTERRUPT_DISABLE 0x00 |
#define | LL_OSPI_X_INTERRUPT_ENABLE 0x01 |
#define | LL_OSPI_X_MEM_PAGE_SIZE_64Bytes 0x06 |
#define | LL_OSPI_X_MEM_PAGE_SIZE_128Bytes 0x07 |
#define | LL_OSPI_X_MEM_PAGE_SIZE_256Bytes 0x08 |
#define | LL_OSPI_X_MEM_PAGE_SIZE_512Bytes 0x09 |
#define | LL_OSPI_X_MEM_PAGE_SIZE_1024Bytes 0x0A |
#define | LL_OSPI_X_MEM_PAGE_SIZE_2048Bytes 0x0B |
#define | LL_OSPI_X_MEM_PAGE_SIZE_4096Bytes 0x0C |
Typedefs | |
typedef struct _ll_ospi_x_init_t | ll_ospi_x_init_t |
OSPI init structure. More... | |
Functions | |
__STATIC_INLINE void | ll_ospi_x_set_mem_base_address (ospi_x_regs_t *OSPIx, uint32_t base_address) |
Set memory base address --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_mem_base_address (ospi_x_regs_t *OSPIx) |
Get memory base address --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_mem_top_address (ospi_x_regs_t *OSPIx, uint32_t top_address) |
Set memory top address --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_mem_top_address (ospi_x_regs_t *OSPIx) |
Get memory top address --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_trst_count (ospi_x_regs_t *OSPIx, uint32_t trst_cnt) |
Set clock count for tRST --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_trst_count (ospi_x_regs_t *OSPIx) |
Get clock count for tRST --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_enable_global_reset (ospi_x_regs_t *OSPIx) |
Trigger Global Reset Command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_access_type (ospi_x_regs_t *OSPIx, uint32_t access_type) |
Set access type for PSRAM --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_access_type (ospi_x_regs_t *OSPIx) |
Get access type for PSRAM --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_tcem_ignore (ospi_x_regs_t *OSPIx, uint32_t is_ignore) |
Set ignoring the tcem or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_tcem_ignore (ospi_x_regs_t *OSPIx) |
Get whether ignoring the tcem or not --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_tcem_count (ospi_x_regs_t *OSPIx, uint32_t tcem_cnt) |
Set clock count for the tcem --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_tcem_count (ospi_x_regs_t *OSPIx) |
Get clock count for the tcem --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_trc_count (ospi_x_regs_t *OSPIx, uint32_t trc_cnt) |
Set clock count for the tRC --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_trc_count (ospi_x_regs_t *OSPIx) |
Get clock count for the tRC --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_tcph_count (ospi_x_regs_t *OSPIx, uint32_t tcph_cnt) |
Set clock count for the tCPH --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_tcph_count (ospi_x_regs_t *OSPIx) |
Get clock count for the tCPH --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_mem_page_size (ospi_x_regs_t *OSPIx, uint32_t mem_page_size) |
Set memory page size --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_mem_page_size (ospi_x_regs_t *OSPIx) |
Get memory page size --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_entry_dpd (ospi_x_regs_t *OSPIx) |
Trigger the entry deep power down command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_exit_dpd (ospi_x_regs_t *OSPIx) |
Trigger the exit deep power down command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_txdpd_ignore (ospi_x_regs_t *OSPIx, uint32_t is_ignore) |
Set ignoring the txdpd or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_txdpd_ignore (ospi_x_regs_t *OSPIx) |
Get whether ignoring the txdpd or not --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_txdpd_count (ospi_x_regs_t *OSPIx, uint32_t txdpd_cnt) |
Set clock count for the tXDPD --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_txdpd_count (ospi_x_regs_t *OSPIx) |
Get clock count for the tXDPD --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_txpdpd_count (ospi_x_regs_t *OSPIx, uint32_t txpdpd_cnt) |
Set clock count for the tXPDPD --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_txpdpd_count (ospi_x_regs_t *OSPIx) |
Get clock count for the tXPDPD --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_entry_half_sleep (ospi_x_regs_t *OSPIx) |
Trigger the entry half sleep command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_exit_half_sleep (ospi_x_regs_t *OSPIx) |
Trigger the exit half sleep command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_txhs_ignore (ospi_x_regs_t *OSPIx, uint32_t is_ignore) |
Set ignoring the tXHS or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_txhs_ignore (ospi_x_regs_t *OSPIx) |
Get whether ignoring the tXHS or not --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_txhs_count (ospi_x_regs_t *OSPIx, uint32_t txhs_count) |
Set clock count for the tXHS --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_txhs_count (ospi_x_regs_t *OSPIx) |
Get clock count for the tXHS --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_txphs_count (ospi_x_regs_t *OSPIx, uint32_t txphs_count) |
Set clock count for the tXPHS --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_txphs_count (ospi_x_regs_t *OSPIx) |
Get clock count for the tXPHS --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_global_rst_interrupt (ospi_x_regs_t *OSPIx, uint32_t intr) |
Enable the global reset interrupt or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_global_rst_interrupt_enabled (ospi_x_regs_t *OSPIx) |
Check whether the global reset interrupt is enabled or not --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_half_sleep_entry_interrupt (ospi_x_regs_t *OSPIx, uint32_t intr) |
Enable the half sleep entry interrupt or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_half_sleep_entry_interrupt_enabled (ospi_x_regs_t *OSPIx) |
Check whether the half sleep entry interrupt is enabled or not --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_half_sleep_exit_interrupt (ospi_x_regs_t *OSPIx, uint32_t intr) |
Enable the half sleep exit interrupt or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_half_sleep_exit_interrupt_enabled (ospi_x_regs_t *OSPIx) |
Check whether the half sleep exit interrupt is enabled or not --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_dpd_entry_interrupt (ospi_x_regs_t *OSPIx, uint32_t intr) |
Enable the deep power down entry interrupt or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_dpd_entry_interrupt_enabled (ospi_x_regs_t *OSPIx) |
Check whether the deep power down entry interrupt is enabled or not --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_dpd_exit_interrupt (ospi_x_regs_t *OSPIx, uint32_t intr) |
Enable the deep power down exit interrupt or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_dpd_exit_interrupt_enabled (ospi_x_regs_t *OSPIx) |
Check whether the deep power down exit interrupt is enabled or not --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_dqs_timeout_interrupt (ospi_x_regs_t *OSPIx, uint32_t intr) |
Enable the dqs timeout interrupt or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_dqs_timeout_interrupt_enabled (ospi_x_regs_t *OSPIx) |
Check whether the dqs timeout interrupt is enabled or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_global_rst_done (ospi_x_regs_t *OSPIx) |
Check whether the global reset is done or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_half_sleep_entry_done (ospi_x_regs_t *OSPIx) |
Check whether the half sleep entry operation is done or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_half_sleep_exit_done (ospi_x_regs_t *OSPIx) |
Check whether the half sleep exit operation is done or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_dpd_entry_done (ospi_x_regs_t *OSPIx) |
Check whether the deep power down entry operation is done or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_dpd_exit_done (ospi_x_regs_t *OSPIx) |
Check whether the deep power down exit operation is done or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_dqs_timeout_err (ospi_x_regs_t *OSPIx) |
Check whether the dqs timeout error happen or not --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_sync_read_cmd (ospi_x_regs_t *OSPIx, uint32_t cmd) |
Set sync read command --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_sync_read_cmd (ospi_x_regs_t *OSPIx) |
Get sync read command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_sync_write_cmd (ospi_x_regs_t *OSPIx, uint32_t cmd) |
Set sync write command --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_sync_write_cmd (ospi_x_regs_t *OSPIx) |
Get sync write command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_burst_read_cmd (ospi_x_regs_t *OSPIx, uint32_t cmd) |
Set linear burst read command --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_burst_read_cmd (ospi_x_regs_t *OSPIx) |
Get linear burst read command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_burst_write_cmd (ospi_x_regs_t *OSPIx, uint32_t cmd) |
Set linear burst write command --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_burst_write_cmd (ospi_x_regs_t *OSPIx) |
Get linear burst write command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_register_read_cmd (ospi_x_regs_t *OSPIx, uint32_t cmd) |
Set register mode read command --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_register_read_cmd (ospi_x_regs_t *OSPIx) |
Get register mode read command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_register_write_cmd (ospi_x_regs_t *OSPIx, uint32_t cmd) |
Set register mode write command --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_register_write_cmd (ospi_x_regs_t *OSPIx) |
Get register mode write command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_global_rst_cmd (ospi_x_regs_t *OSPIx, uint32_t cmd) |
Set global reset command --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_global_rst_cmd (ospi_x_regs_t *OSPIx) |
Get global reset command --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_dqs_timeout (ospi_x_regs_t *OSPIx, uint32_t timeout_clk) |
Set clock count for DQS timeout --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_dqs_timeout (ospi_x_regs_t *OSPIx) |
Get clock count for DQS timeout --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_read_prefetch (ospi_x_regs_t *OSPIx, uint32_t is_prefetch) |
Enable the read prefetch feature or not --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_is_read_prefetch_enabled (ospi_x_regs_t *OSPIx) |
Check whether the read prefetch feature is enabled or not --------------------------. More... | |
__STATIC_INLINE void | ll_ospi_x_set_phy_delay (ospi_x_regs_t *OSPIx, uint32_t phy_delay) |
Set the Phy Delay TAP --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_phy_delay (ospi_x_regs_t *OSPIx) |
Get the Phy Delay TAP --------------------------. More... | |
__STATIC_INLINE uint32_t | ll_ospi_x_get_xip_base_address (ospi_x_regs_t *OSPIx) |
Get memory starting address in AHB --------------------------. More... | |
error_status_t | ll_ospi_x_init (ospi_x_regs_t *OSPIx, ll_ospi_x_init_t *p_ospi_x_init) |
Configure the ospi_x unit. More... | |
error_status_t | ll_ospi_x_deinit (ospi_x_regs_t *OSPIx) |
Set OSPI registers to their reset values. More... | |
Header file containing functions prototypes of SPI LL library.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 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. Neither the name of GOODIX 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 COPYRIGHT HOLDERS AND 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 gr55xx_ll_ospi_x.h.