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

This file is the low hardware abstraction layer file. More...

#include "bflb_core.h"
Include dependency graph for bflb_sdio2.h:

Go to the source code of this file.

Data Structures

struct  bflb_sdio2_trans_desc_t
 

Macros

#define SDIO2_DEFAULT_SIZE_MAX   (1024 * 2)
 
#define SDIO2_SIZE_CONSULT_MULTIPLE   (256)
 
#define SDIO2_BYTE_MOD_SIZE_MAX   (512)
 
#define SDIO2_MAX_PORT_NUM   16
 
#define SDIO2_HOST_INT_EVENT_DNLD_RDY   (1 << 0)
 
#define SDIO2_HOST_INT_EVENT_UPLD_RDY   (1 << 1)
 
#define SDIO2_HOST_INT_EVENT_CIS_RDY   (1 << 2)
 
#define SDIO2_HOST_INT_EVENT_IO_RDY   (1 << 3)
 

Functions

int bflb_sdio2_init (struct bflb_device_s *dev, uint32_t dnld_size_max)
 
int bflb_sdio2_check_host_ready (struct bflb_device_s *dev)
 
int bflb_sdio2_get_block_size (struct bflb_device_s *dev)
 
int bflb_sdio2_get_upld_max_size (struct bflb_device_s *dev)
 
int bflb_sdio2_get_dnld_max_size (struct bflb_device_s *dev)
 
int bflb_sdio2_dnld_port_push (struct bflb_device_s *dev, bflb_sdio2_trans_desc_t *trans_desc)
 
int bflb_sdio2_upld_port_push (struct bflb_device_s *dev, bflb_sdio2_trans_desc_t *trans_desc)
 
int bflb_sdio2_dnld_get_waiting (struct bflb_device_s *dev)
 
int bflb_sdio2_dnld_get_available (struct bflb_device_s *dev)
 
int bflb_sdio2_upld_get_waiting (struct bflb_device_s *dev)
 
int bflb_sdio2_upld_get_available (struct bflb_device_s *dev)
 
int bflb_sdio2_dnld_irq_attach (struct bflb_device_s *dev, void(*callback)(void *arg, bflb_sdio2_trans_desc_t *trans_desc), void *arg)
 
int bflb_sdio2_upld_irq_attach (struct bflb_device_s *dev, void(*callback)(void *arg, bflb_sdio2_trans_desc_t *trans_desc), void *arg)
 
int bflb_sdio2_error_irq_attach (struct bflb_device_s *dev, void(*callback)(void *arg, bflb_sdio2_trans_desc_t *trans_desc), void *arg)
 
int bflb_sdio2_trig_host_int (struct bflb_device_s *dev, uint32_t event)
 

Detailed Description

This file is the low hardware abstraction layer file.

Version
V1.0
Date
2022-09-27
Attention

© COPYRIGHT(c) 2022 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_sdio2.h.

Macro Definition Documentation

◆ SDIO2_BYTE_MOD_SIZE_MAX

#define SDIO2_BYTE_MOD_SIZE_MAX   (512)

Definition at line 47 of file bflb_sdio2.h.

◆ SDIO2_DEFAULT_SIZE_MAX

#define SDIO2_DEFAULT_SIZE_MAX   (1024 * 2)

Definition at line 43 of file bflb_sdio2.h.

◆ SDIO2_HOST_INT_EVENT_CIS_RDY

#define SDIO2_HOST_INT_EVENT_CIS_RDY   (1 << 2)

Definition at line 53 of file bflb_sdio2.h.

◆ SDIO2_HOST_INT_EVENT_DNLD_RDY

#define SDIO2_HOST_INT_EVENT_DNLD_RDY   (1 << 0)

Definition at line 51 of file bflb_sdio2.h.

◆ SDIO2_HOST_INT_EVENT_IO_RDY

#define SDIO2_HOST_INT_EVENT_IO_RDY   (1 << 3)

Definition at line 54 of file bflb_sdio2.h.

◆ SDIO2_HOST_INT_EVENT_UPLD_RDY

#define SDIO2_HOST_INT_EVENT_UPLD_RDY   (1 << 1)

Definition at line 52 of file bflb_sdio2.h.

◆ SDIO2_MAX_PORT_NUM

#define SDIO2_MAX_PORT_NUM   16

Definition at line 48 of file bflb_sdio2.h.

◆ SDIO2_SIZE_CONSULT_MULTIPLE

#define SDIO2_SIZE_CONSULT_MULTIPLE   (256)

Definition at line 46 of file bflb_sdio2.h.

Function Documentation

◆ bflb_sdio2_check_host_ready()

int bflb_sdio2_check_host_ready ( struct bflb_device_s dev)

◆ bflb_sdio2_dnld_get_available()

int bflb_sdio2_dnld_get_available ( struct bflb_device_s dev)

◆ bflb_sdio2_dnld_get_waiting()

int bflb_sdio2_dnld_get_waiting ( struct bflb_device_s dev)

◆ bflb_sdio2_dnld_irq_attach()

int bflb_sdio2_dnld_irq_attach ( struct bflb_device_s dev,
void(*)(void *arg, bflb_sdio2_trans_desc_t *trans_desc)  callback,
void *  arg 
)

◆ bflb_sdio2_dnld_port_push()

int bflb_sdio2_dnld_port_push ( struct bflb_device_s dev,
bflb_sdio2_trans_desc_t trans_desc 
)

◆ bflb_sdio2_error_irq_attach()

int bflb_sdio2_error_irq_attach ( struct bflb_device_s dev,
void(*)(void *arg, bflb_sdio2_trans_desc_t *trans_desc)  callback,
void *  arg 
)

◆ bflb_sdio2_get_block_size()

int bflb_sdio2_get_block_size ( struct bflb_device_s dev)

◆ bflb_sdio2_get_dnld_max_size()

int bflb_sdio2_get_dnld_max_size ( struct bflb_device_s dev)

◆ bflb_sdio2_get_upld_max_size()

int bflb_sdio2_get_upld_max_size ( struct bflb_device_s dev)

◆ bflb_sdio2_init()

int bflb_sdio2_init ( struct bflb_device_s dev,
uint32_t  dnld_size_max 
)

◆ bflb_sdio2_trig_host_int()

int bflb_sdio2_trig_host_int ( struct bflb_device_s dev,
uint32_t  event 
)

◆ bflb_sdio2_upld_get_available()

int bflb_sdio2_upld_get_available ( struct bflb_device_s dev)

◆ bflb_sdio2_upld_get_waiting()

int bflb_sdio2_upld_get_waiting ( struct bflb_device_s dev)

◆ bflb_sdio2_upld_irq_attach()

int bflb_sdio2_upld_irq_attach ( struct bflb_device_s dev,
void(*)(void *arg, bflb_sdio2_trans_desc_t *trans_desc)  callback,
void *  arg 
)

◆ bflb_sdio2_upld_port_push()

int bflb_sdio2_upld_port_push ( struct bflb_device_s dev,
bflb_sdio2_trans_desc_t trans_desc 
)