PU2CLR RDA5807 Arduino Library 1.1.8
Arduino Library for RDA5807 Devices - By Ricardo Lima Caratti
Loading...
Searching...
No Matches
I2S Functions

Functions

void RDA5807::setI2SAllParameters (uint8_t R_DELY, uint8_t L_DELY, uint8_t SCLK_O_EDGE, uint8_t SW_O_EDGE, uint8_t I2S_SW_CNT, uint8_t WS_I_EDGE, uint8_t DATA_SIGNED, uint8_t SCLK_I_EDGE, uint8_t WS_LR, uint8_t SLAVE_MASTER, uint8_t OPEN_MODE)
 Configures all parameters for I2S.
 
void RDA5807::setI2SOn (bool value)
 Enables I2S setup.
 
void RDA5807::setI2SMaster (bool value)
 
void RDA5807::setI2SSpeed (uint8_t value)
 Sets the speed in kbps. You can use the predefined constantes: I2S_WS_STEP_48, I2S_WS_STEP_44_1, I2S_WS_STEP_32,.
 
void RDA5807::setI2SDataSigned (bool value)
 If 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data.
 

Detailed Description

I2S

When setting I2S_ENABLE (register 04) bit is high, the RDA5807FP can get the output signals SCK, WS, SD signals from GPIO3, GPIO1 and GPIO2 (I2S master)

Function Documentation

◆ setI2SAllParameters()

void RDA5807::setI2SAllParameters ( uint8_t  R_DELY,
uint8_t  L_DELY,
uint8_t  SCLK_O_EDGE,
uint8_t  SW_O_EDGE,
uint8_t  I2S_SW_CNT,
uint8_t  WS_I_EDGE,
uint8_t  DATA_SIGNED,
uint8_t  SCLK_I_EDGE,
uint8_t  WS_LR,
uint8_t  SLAVE_MASTER,
uint8_t  OPEN_MODE 
)

Configures all parameters for I2S.

I2S setup must be enabled

I2S_SW_CNT can be: I2S_WS_STEP_48, I2S_WS_STEP_44_1, I2S_WS_STEP_32, I2S_WS_STEP_24, I2S_WS_STEP_22_05, I2S_WS_STEP_16, I2S_WS_STEP_12, I2S_WS_STEP_11_025 or I2S_WS_STEP_8

Parameters
R_DELYIf 1, R channel data delay 1T
L_DELYIf 1, L channel data delay 1T
SCLK_O_EDGEIf 1, invert sclk output when as master
SW_O_EDGEIf 1, invert ws output when as master
I2S_SW_CNTOnly valid in master mode. See table above
WS_I_EDGEIf 0, use normal ws internally; If 1, inverte ws internally
DATA_SIGNEDIf 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data.
SCLK_I_EDGEIf 0, use normal sclk internally;If 1, inverte sclk internally
WS_LRWs relation to l/r channel; If 0, ws=0 ->r, ws=1 ->l; If 1, ws=0 ->l, ws=1 ->r
SLAVE_MASTERI2S slave or master; 1 = slave; 0 = master
OPEN_MODEOpen reserved register mode; 11=open behind registers writing function others: only open behind registers reading function
See also
RDA microelectronics RDA5807FP - SINGLE-CHIP BROADCAST FM RADIO TUNER pages 11 and 12
setI2SOn

Definition at line 1386 of file RDA5807.cpp.

◆ setI2SOn()

void RDA5807::setI2SOn ( bool  value)

Enables I2S setup.

When setting I2S_ENABLE (register 04) bit is high, the RDA5807FP you can get the output signals SCK, WS, SD signals from GPIO3, GPIO1 and GPIO2 (I2S master)

Parameters
valuetrue or false

Definition at line 1410 of file RDA5807.cpp.

◆ setI2SMaster()

void RDA5807::setI2SMaster ( bool  value)
Parameters
valuetrue or false

Definition at line 1422 of file RDA5807.cpp.

◆ setI2SSpeed()

void RDA5807::setI2SSpeed ( uint8_t  value)

Sets the speed in kbps. You can use the predefined constantes: I2S_WS_STEP_48, I2S_WS_STEP_44_1, I2S_WS_STEP_32,.

/

I2S_WS_STEP_24, I2S_WS_STEP_22_05, I2S_WS_STEP_16, I2S_WS_STEP_12, I2S_WS_STEP_11_025 or I2S_WS_STEP_8

Parameters
valuevalue

Definition at line 1435 of file RDA5807.cpp.

◆ setI2SDataSigned()

void RDA5807::setI2SDataSigned ( bool  value)

If 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data.

Parameters
valuetrue (1) or false (0)

Definition at line 1447 of file RDA5807.cpp.