test public
Dependencies: HttpServer_snapshot_mbed-os
WM8978_RBSP Class Reference
WM8978_RBSP class, defined on the I2C master bus. More...
#include <WM8978_RBSP.h>
Inherits AUDIO_RBSP.
Inherited by AUDIO_GRBoard.
Public Member Functions | |
WM8978_RBSP (PinName mosi, PinName miso, PinName sclk, PinName ssel, PinName sck, PinName ws, PinName tx, PinName rx, PinName audio_clk, uint8_t int_level=0x80, int32_t max_write_num=16, int32_t max_read_num=16) | |
Create a WM8978_RBSP object defined on the I2C port. | |
virtual void | power (bool type=true) |
Overloaded power() | |
virtual bool | format (char length) |
Set I2S interface bit length and mode. | |
virtual bool | frequency (int hz) |
Set sample frequency. | |
int32_t | GetSsifChNo (void) |
Get a value of SSIF channel number. | |
virtual int | write (void *const p_data, uint32_t data_size, const rbsp_data_conf_t *const p_data_conf=NULL) |
Enqueue asynchronous write request. | |
virtual int | read (void *const p_data, uint32_t data_size, const rbsp_data_conf_t *const p_data_conf=NULL) |
Enqueue asynchronous read request. | |
virtual bool | outputVolume (float leftVolumeOut, float rightVolumeOut) |
Headphone out volume control. | |
virtual bool | micVolume (float VolumeIn) |
Microphone volume. |
Detailed Description
WM8978_RBSP class, defined on the I2C master bus.
Definition at line 34 of file WM8978_RBSP.h.
Constructor & Destructor Documentation
WM8978_RBSP | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sclk, | ||
PinName | ssel, | ||
PinName | sck, | ||
PinName | ws, | ||
PinName | tx, | ||
PinName | rx, | ||
PinName | audio_clk, | ||
uint8_t | int_level = 0x80 , |
||
int32_t | max_write_num = 16 , |
||
int32_t | max_read_num = 16 |
||
) |
Create a WM8978_RBSP object defined on the I2C port.
- Parameters:
-
mosi SPI Master Out, Slave In pin miso SPI Master In, Slave Out pin sclk SPI Clock pin ssel SPI chip select pin sck SSIF serial bit clock ws SSIF word selection tx SSIF serial data output rx SSIF serial data input audio_clk audio clock int_level Interupt priority (SSIF) max_write_num The upper limit of write buffer (SSIF) max_read_num The upper limit of read buffer (SSIF)
Definition at line 29 of file WM8978_RBSP.cpp.
Member Function Documentation
bool format | ( | char | length ) | [virtual] |
Set I2S interface bit length and mode.
- Parameters:
-
length Set bit length to 16 bits
- Returns:
- true = success, false = failure
Implements AUDIO_RBSP.
Reimplemented in AUDIO_GRBoard.
Definition at line 88 of file WM8978_RBSP.cpp.
bool frequency | ( | int | hz ) | [virtual] |
Set sample frequency.
- Parameters:
-
frequency Sample frequency of data in Hz
- Returns:
- true = success, false = failure
supports frequencies: 44.1kHz Default is 44.1kHz
Implements AUDIO_RBSP.
Reimplemented in AUDIO_GRBoard.
Definition at line 95 of file WM8978_RBSP.cpp.
int32_t GetSsifChNo | ( | void | ) |
Get a value of SSIF channel number.
- Returns:
- SSIF channel number
Definition at line 85 of file WM8978_RBSP.h.
bool micVolume | ( | float | VolumeIn ) | [virtual] |
Microphone volume.
- Parameters:
-
VolumeIn Microphone volume
- Returns:
- Returns "true" for success, "false" if parameters are out of range
Implements AUDIO_RBSP.
Reimplemented in AUDIO_GRBoard.
Definition at line 76 of file WM8978_RBSP.cpp.
bool outputVolume | ( | float | leftVolumeOut, |
float | rightVolumeOut | ||
) | [virtual] |
Headphone out volume control.
- Parameters:
-
leftVolumeOut Left headphone-out volume rightVolumeOut Right headphone-out volume
- Returns:
- Returns "true" for success, "false" if parameters are out of range
Implements AUDIO_RBSP.
Reimplemented in AUDIO_GRBoard.
Definition at line 67 of file WM8978_RBSP.cpp.
void power | ( | bool | type = true ) |
[virtual] |
Overloaded power()
- Parameters:
-
type true=power up, false=power down
Implements AUDIO_RBSP.
Reimplemented in AUDIO_GRBoard.
Definition at line 84 of file WM8978_RBSP.cpp.
virtual int read | ( | void *const | p_data, |
uint32_t | data_size, | ||
const rbsp_data_conf_t *const | p_data_conf = NULL |
||
) | [virtual] |
Enqueue asynchronous read request.
- Parameters:
-
p_data Location of the data data_size Number of bytes to read p_data_conf Asynchronous control block structure
- Returns:
- Number of bytes read on success. negative number on error.
Implements AUDIO_RBSP.
Reimplemented in AUDIO_GRBoard.
Definition at line 107 of file WM8978_RBSP.h.
virtual int write | ( | void *const | p_data, |
uint32_t | data_size, | ||
const rbsp_data_conf_t *const | p_data_conf = NULL |
||
) | [virtual] |
Enqueue asynchronous write request.
- Parameters:
-
p_data Location of the data data_size Number of bytes to write p_data_conf Asynchronous control block structure
- Returns:
- Number of bytes written on success. negative number on error.
Implements AUDIO_RBSP.
Reimplemented in AUDIO_GRBoard.
Definition at line 96 of file WM8978_RBSP.h.
Generated on Wed Jul 13 2022 05:33:38 by 1.7.2