arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
VS1053Config Class Reference

Configuration for VS1053Stream. More...

#include <VS1053Stream.h>

Inheritance diagram for VS1053Config:
AudioInfo

Public Member Functions

virtual void clear ()
 
void copyFrom (AudioInfo info)
 Same as set.
 
bool equals (AudioInfo alt)
 Returns true if alt values are the same like the current values.
 
bool equalsExSampleRate (AudioInfo alt)
 Checks if only the sample rate is different.
 
virtual void logInfo (const char *source="")
 
 operator bool ()
 Returns true if all components are defined (no component is 0)
 
bool operator!= (AudioInfo alt)
 Returns true if alt values are the different from the current values.
 
bool operator== (AudioInfo alt)
 Returns true if alt values are the same like the current values.
 
void set (AudioInfo info)
 Copies the values from info.
 
void setAudioInfo (AudioInfo info)
 Same as set.
 

Public Attributes

uint8_t bits_per_sample = DEFAULT_BITS_PER_SAMPLE
 Number of bits per sample (int16_t = 16 bits)
 
uint16_t channels = DEFAULT_CHANNELS
 Number of channels: 2=stereo, 1=mono.
 
uint8_t cs_pin = VS1053_CS
 
int16_t cs_sd_pin = VS1053_CS_SD
 Optional chip-select pin for an attached SD card (if present).
 
uint8_t dcs_pin = VS1053_DCS
 Data/command select (DCS) pin used by some VS1053 modules.
 
uint8_t dreq_pin = VS1053_DREQ
 
bool is_encoded_data = false
 
bool is_midi = false
 When true enable MIDI streaming mode (this also forces encoded mode).
 
bool is_start_spi = true
 
RxTxMode mode = TX_MODE
 Operation mode (transmit/receive). Default: TX_MODE (playback).
 
int16_t reset_pin = VS1053_RESET
 
sample_rate_t sample_rate = DEFAULT_SAMPLE_RATE
 Sample Rate: e.g 44100.
 

Detailed Description

Configuration for VS1053Stream.

Author
Phil Schatzmann

Member Data Documentation

◆ cs_pin

uint8_t cs_pin = VS1053_CS

Chip-select (control) pin for the VS1053 SPI interface. Set this to the board-specific CS pin (e.g. VS1053_CS).

◆ dreq_pin

uint8_t dreq_pin = VS1053_DREQ

Data request (DREQ) pin — used by the VS1053 to signal it can accept more data. Configure this to the board's DREQ pin (e.g. VS1053_DREQ).

◆ is_encoded_data

bool is_encoded_data = false

When true the stream expects encoded input data (MP3/WAV/etc). When false (default) the stream treats input as raw PCM samples.

◆ is_start_spi

bool is_start_spi = true

If true the driver will call SPI.begin() during initialization. Set to false if SPI is managed externally by the application.

◆ reset_pin

int16_t reset_pin = VS1053_RESET

Optional reset pin for the VS1053 module. Set to -1 if unused. When valid the pin will be toggled during initialization.


The documentation for this class was generated from the following file: