ESP32_RTOS_SDK V1.1.0

- Main Page
- Modules
- Data Structures
- Files

Data Structures | Macros | Functions
I2S Driver APIs
Driver APIs

I2S driver APIs. More...

## Data Structures

struct | sdio_queue

## Macros

#define | TX_MASTER 0
#define | TX_SLAVE 1
#define | RX_MASTER 2
#define | RX_SLAVE 3
#define | ETS_SLC_INTR_ENABLE() xt_ints_on(1 << ETS_SLC_INUM)
#define | CONF_RXLINK_ADDR(addr)
#define | CONF_TXLINK_ADDR(addr)
#define | START_RXLINK() SET_PERI_REG_MASK(I2SRX_LINK, I2S_I2S_RXLINK_START)
#define | START_TXLINK() SET_PERI_REG_MASK(I2STX_LINK, I2S_I2S_TXLINK_START)

## Functions

void | i2s_GPIO_init (uint8 mode)
| GPIO initialization, including config DATA, WS and BCK GPIO pin. More...
void | i2s_init (void)
| I2S module initialization, including FIFO, M/S mode, data format, clock frequency. More...
void | slc_init (void)
| DMA module initialization, including DMA mode and interrupt. More...
void | slc_isr (void *para)
| Process data received/treansmitted when interrupt occurs. More...
void | create_one_link (uint8 own, uint8 eof, uint8 sub_sof, uint16 size, uint16 length, uint32 *buf_ptr, struct sdio_queue *nxt_ptr, struct sdio_queue *i2s_queue)
| Create DMA buffer descriptors. More...
void | i2s_test (void)
| Functional DEMO for i2s module. More...

## Detailed Description

I2S driver APIs.

## Macro Definition Documentation

#define CONF_RXLINK_ADDR | ( |  | addr | ) |

Value:
CLEAR_PERI_REG_MASK(I2SRX_LINK, I2S_I2S_RXLINK_ADDR);\
SET_PERI_REG_MASK(I2SRX_LINK, ((uint32)(addr)) & I2S_I2S_RXLINK_ADDR)

#define CONF_TXLINK_ADDR | ( |  | addr | ) |

Value:
CLEAR_PERI_REG_MASK(I2STX_LINK, I2S_I2S_TXLINK_ADDR);\
SET_PERI_REG_MASK(I2STX_LINK, ((uint32)(addr)) & I2S_I2S_TXLINK_ADDR)

## Function Documentation

void create_one_link | ( | uint8 | own,
|  | uint8 | eof,
|  | uint8 | sub_sof,
|  | uint16 | size,
|  | uint16 | length,
|  | uint32 * | buf_ptr,
|  | struct sdio_queue * | nxt_ptr,
|  | struct sdio_queue * | i2s_queue
| ) |  |

Create DMA buffer descriptors.

Parameters

  uint8 | own : select the owner of the current link to be either software or hardware
  uint8 | eof : mark for end of file
  uint8 | sub_sof : mark for sub start of file
  uint16 | size : the actual size of the buffer
  uint16 | length : the total size of the buffer
  uint32* | buf_ptr : the start address of the buffer
  struct | sdio_queue* nxt_ptr : the address of the next descriptor
  struct | sdio_queue* i2s_queue : the address of the current descriptor

Returns
  null

void i2s_GPIO_init | ( | uint8 | mode | ) |

GPIO initialization, including config DATA, WS and BCK GPIO pin.

Attention
  This API can be called only once per mode.

Parameters

  uint8 | mode : i2s mode select between TX_MASTER, TX_SLAVE, RX_MASTER, RX_SLAVE;

Returns
  null

void i2s_init | ( | void |  | ) |

I2S module initialization, including FIFO, M/S mode, data format, clock frequency.

Attention
  This API can be called only once per mode.

Parameters

  null |

Returns
  null

void i2s_test | ( | void |  | ) |

Functional DEMO for i2s module.

Parameters

  null |

Returns
  null

void slc_init | ( | void |  | ) |

DMA module initialization, including DMA mode and interrupt.

Attention
  This API can be called only once per mode.

Parameters

  null |

Returns
  null

void slc_isr | ( | void * | para | ) |

Process data received/treansmitted when interrupt occurs.

Attention
  This API can be called only once per mode.

Parameters

  void | *para: pointer to parameter

Returns
  null