Skip to content

Commit e1e74e9

Browse files
committed
comments
1 parent bb92e01 commit e1e74e9

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

src/AudioTools/AudioLibs/VS1053Stream.h

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,36 @@ class VS1053Config : public AudioInfo {
2828
bits_per_sample = 16;
2929
}
3030
RxTxMode mode = TX_MODE;
31-
/// set to false if it is a pcm stream
31+
/// Operation mode (transmit/receive). Default: TX_MODE (playback).
32+
RxTxMode mode = TX_MODE;
33+
34+
/// Chip-select (control) pin for the VS1053 SPI interface.
35+
/// Set this to the board-specific CS pin (e.g. VS1053_CS).
3236
uint8_t cs_pin = VS1053_CS;
37+
38+
/// Data/command select (DCS) pin used by some VS1053 modules.
3339
uint8_t dcs_pin = VS1053_DCS;
40+
41+
/// Data request (DREQ) pin — used by the VS1053 to signal it can accept
42+
/// more data. Configure this to the board's DREQ pin (e.g. VS1053_DREQ).
3443
uint8_t dreq_pin = VS1053_DREQ;
44+
45+
/// Optional reset pin for the VS1053 module. Set to -1 if unused.
46+
/// When valid the pin will be toggled during initialization.
3547
int16_t reset_pin = VS1053_RESET; // -1 is undefined
48+
49+
/// Optional chip-select pin for an attached SD card (if present).
3650
int16_t cs_sd_pin = VS1053_CS_SD;
37-
/// The data is encoded as WAV, MPEG etc. By default this is false and
38-
/// supports PCM data
51+
52+
/// When true the stream expects encoded input data (MP3/WAV/etc).
53+
/// When false (default) the stream treats input as raw PCM samples.
3954
bool is_encoded_data = false;
40-
/// set true for streaming midi
55+
56+
/// When true enable MIDI streaming mode (this also forces encoded mode).
4157
bool is_midi = false;
42-
/// SPI.begin is called by the driver (default setting)
58+
59+
/// If true the driver will call SPI.begin() during initialization. Set
60+
/// to false if SPI is managed externally by the application.
4361
bool is_start_spi = true;
4462
#if VS1053_EXT
4563
VS1053_INPUT input_device = VS1053_MIC;
@@ -49,8 +67,8 @@ class VS1053Config : public AudioInfo {
4967
/**
5068
* @brief Output Interface which processes PCM data by default using a VS1053
5169
* audio module. If you want to write encoded data set is_encoded_data = true in
52-
* the configuration; Many VS1053 modules also have a built in microphone that
53-
* can be used for recording.
70+
* the configuration. Many VS1053 modules also have a built in microphone that
71+
* can be used for recording: set the mode to RX_MODE to use this.
5472
*
5573
* Depends on https://github.com/pschatzmann/arduino-vs1053
5674
*

0 commit comments

Comments
 (0)