![]() |
PU2CLR RDA5807 Arduino Library 1.1.9
Arduino Library for RDA5807 Devices - By Ricardo Lima Caratti
|
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. | |
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)
| 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
| R_DELY | If 1, R channel data delay 1T |
| L_DELY | If 1, L channel data delay 1T |
| SCLK_O_EDGE | If 1, invert sclk output when as master |
| SW_O_EDGE | If 1, invert ws output when as master |
| I2S_SW_CNT | Only valid in master mode. See table above |
| WS_I_EDGE | If 0, use normal ws internally; If 1, inverte ws internally |
| DATA_SIGNED | If 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data. |
| SCLK_I_EDGE | If 0, use normal sclk internally;If 1, inverte sclk internally |
| WS_LR | Ws relation to l/r channel; If 0, ws=0 ->r, ws=1 ->l; If 1, ws=0 ->l, ws=1 ->r |
| SLAVE_MASTER | I2S slave or master; 1 = slave; 0 = master |
| OPEN_MODE | Open reserved register mode; 11=open behind registers writing function others: only open behind registers reading function |
| void RDA5807::setI2SDataSigned | ( | bool | value | ) |
If 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data.
| value | true (1) or false (0) |
| void RDA5807::setI2SMaster | ( | bool | value | ) |
| value | true or false |
| 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)
| value | true or false |
| 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
| value | value |