Skip to content

Commit 38c935a

Browse files
committed
Add audio resource enum
Also default tone_id and nof_repeat to 0 in playAudioResource()
1 parent 1c0007a commit 38c935a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/sfe_ublox_cellular_voice.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ const char* const UBX_CELL_COMMAND_PLAY_AUDIO = "+UPAR"; // Play audio resour
1010
const char* const UBX_CELL_COMMAND_STOP_AUDIO = "+USAR"; // Stop audio resource
1111
const char* const UBX_CELL_COMMAND_GENERATE_TONE = "+UTGN"; // Tone generator
1212

13+
typedef enum
14+
{
15+
UBX_CELL_AUDIO_RESOURCE_TONE = 0,
16+
UBX_CELL_AUDIO_RESOURCE_MIDI = 1,
17+
UBX_CELL_AUDIO_RESOURCE_LOOPBACK = 2
18+
} UBX_CELL_audio_resource_t;
19+
1320
// Base class for any modules supporting voice calls
1421
template <typename T>
1522
class UBX_CELL_VOICE
@@ -60,7 +67,7 @@ class UBX_CELL_VOICE
6067
nullptr, UBX_CELL_STANDARD_RESPONSE_TIMEOUT);
6168
}
6269

63-
UBX_CELL_error_t playAudioResource(uint8_t audio_resource, uint8_t tone_id, uint8_t nof_repeat)
70+
UBX_CELL_error_t playAudioResource(uint8_t audio_resource, uint8_t tone_id = 0, uint8_t nof_repeat = 0)
6471
{
6572
UBX_CELL_error_t err;
6673
char *command;

0 commit comments

Comments
 (0)