pure sdk for main

This commit is contained in:
divadiow
2025-08-27 09:51:58 +01:00
parent f0d033f1c9
commit 0571416e7c
3283 changed files with 1577720 additions and 1 deletions
+39
View File
@@ -0,0 +1,39 @@
#include "sys_config.h"
#include "typesdef.h"
#include "list.h"
#include "dev.h"
#include "devid.h"
#include "string.h"
#include "osal_file.h"
#include "osal/task.h"
#include "osal/string.h"
#include "mp3_decode.h"
static uint8_t play_mode = 0;
char audio_filePath[10];
int32 demon_atcmd_play_mp3(const char *cmd, char *argv[], uint32 argc)
{
if(argc < 2)
{
os_printf("%s argc too small:%d,enter the path and mode\n",__FUNCTION__,argc);
return 0;
}
if(argv[0])
{
memset(audio_filePath,0,sizeof(audio_filePath));
memcpy(audio_filePath,argv[0],strlen(argv[0]));
play_mode = os_atoi(argv[1]);
if(play_mode == 0) {
set_mp3_decode_status(MP3_STOP);
}
else if(play_mode == 1) {
mp3_decode_init(audio_filePath, NULL);
}
}
os_printf("%s %s\n",__FUNCTION__,audio_filePath);
return 0;
}