106 lines
2.5 KiB
C
Raw Normal View History

/*************************************************************
*
* Copyright (C) POKA
* All rights reserved.
*
*************************************************************/
#ifndef __APPLICATION_H__
#define __APPLICATION_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
//小智AI OTA URL地址
uint8_t ota_url[128];
uint32_t led_brightness;
uint32_t led_timeout;
uint32_t sleep_timeout;
}app_config_t;
enum AecMode {
kAecOff,
kAecOnDeviceSide,
kAecOnServerSide,
};
enum DeviceState {
kDeviceStateUnknown,
kDeviceStateStarting,
kDeviceStateWifiConfiguring,
kDeviceStateIdle,
kDeviceStateConnecting,
kDeviceStateListening,
kDeviceStateSpeaking,
kDeviceStateUpgrading,
kDeviceStateActivating,
kDeviceStateAudioTesting,
kDeviceStateFatalError
};
enum AbortReason {
kAbortReasonNone,
kAbortReasonWakeWordDetected
};
enum ListeningMode {
kListeningModeAutoStop,
kListeningModeManualStop,
kListeningModeRealtime // 需要 AEC 支持
};
#include "cJSON.h"
/**
* 1.1.1
* OTA升级电量限制 25%
*
* OTA时关闭语音
*
*
* 1.1.3
* 1.
* 2.PWM 100%
* 3.
* 4.IOT上报相关的消息
* 5 .
*
* 1.1.4
* 10
*
* 1.1.5
*
*
* 1.1.6
*
* BLE设置灯光常亮时异常问题
*/
#define APPLICATION_VERSION "1.1.5"
#define APPLICATION_DEFULT_OTA_URL "https://xiaozhi.xa-poka.com/xiaozhi/ota/"
#define APPLICATION_CONFIG_KEY_AI_URL "ai_url"
/**
* 10 - 10
*/
#define APPLICATION_DEFULT_LIGHT_TIMEOUT 10
/**
*
*/
#define APPLICATION_DEFULT_LIGHT_BRIGHTNESS 100
/**
* 10 - 10
*/
#define APPLICATION_DEFULT_SLEEP_TIMEOUT 10
void app_set_ota_url(char * ota_url);
char* app_get_ota_url();
#ifdef __cplusplus
}
#endif
#endif