pinebuds/apps/main/apps.h

89 lines
2.4 KiB
C
Raw Permalink Normal View History

2022-08-15 04:20:27 -05:00
/***************************************************************************
*
* Copyright 2015-2019 BES.
* All rights reserved. All unpublished rights reserved.
*
* No part of this work may be used or reproduced in any form or by any
* means, or stored in a database or retrieval system, without prior written
* permission of BES.
*
* Use of this work is governed by a license granted by BES.
* This work contains confidential and proprietary information of
* BES. which is protected by copyright, trade secret,
* trademark and other intellectual property rights.
*
****************************************************************************/
#ifndef __APPS_H__
#define __APPS_H__
#include "app_status_ind.h"
2023-02-05 01:27:13 -06:00
#define STACK_READY_BT 0x01
2022-08-15 04:20:27 -05:00
#define STACK_READY_BLE 0x02
#ifdef __cplusplus
extern "C" {
#endif
#include "plat_types.h"
int app_init(void);
int app_deinit(int deinit_case);
int app_shutdown(void);
int app_reset(void);
int app_status_battery_report(uint8_t level);
2023-02-05 01:27:13 -06:00
int app_voice_report(APP_STATUS_INDICATION_T status, uint8_t device_id);
int app_voice_report_generic(APP_STATUS_INDICATION_T status, uint8_t device_id,
uint8_t isMerging);
2022-08-15 04:20:27 -05:00
int app_voice_stop(APP_STATUS_INDICATION_T status, uint8_t device_id);
/*FixME*/
2023-02-05 01:27:13 -06:00
void app_status_set_num(const char *p);
2022-08-15 04:20:27 -05:00
////////////10 second tiemr///////////////
2023-02-05 01:27:13 -06:00
#define APP_FAST_PAIRING_TIMEOUT_IN_SECOND 120
2022-08-15 04:20:27 -05:00
2023-02-05 01:27:13 -06:00
#define APP_PAIR_TIMER_ID 0
#define APP_POWEROFF_TIMER_ID 1
#define APP_FASTPAIR_LASTING_TIMER_ID 2
2022-08-15 04:20:27 -05:00
void app_stop_10_second_timer(uint8_t timer_id);
void app_start_10_second_timer(uint8_t timer_id);
void app_notify_stack_ready(uint8_t ready_flag);
void app_start_postponed_reset(void);
bool app_is_power_off_in_progress(void);
2023-02-05 01:27:13 -06:00
#define CHIP_ID_C 1
#define CHIP_ID_D 2
2022-08-15 04:20:27 -05:00
void app_disconnect_all_bt_connections(void);
bool app_is_stack_ready(void);
extern uint8_t latency_mode_is_open;
2023-02-05 01:27:13 -06:00
extern uint8_t app_poweroff_flag;
2022-08-15 04:20:27 -05:00
extern bool MobileLinkLose_reboot;
extern bool factory_mode_status;
2023-02-05 01:27:13 -06:00
extern uint8_t app_poweroff_flag;
2022-08-15 04:20:27 -05:00
extern bool MobileLinkLose_reboot;
extern void startclr_info_timer(int ms);
extern void app_enterpairing_timer_start(void);
extern void app_enterpairing_timer_stop(void);
2023-02-05 01:27:13 -06:00
extern void startdelay_report_tone(int ms, APP_STATUS_INDICATION_T status);
2022-08-15 04:20:27 -05:00
extern void box_cmd_app_bt_enter_mono_pairing_mode(void);
extern int app_nvrecord_rebuild(void);
extern void app_bt_power_off_customize();
////////////////////
#ifdef __cplusplus
}
#endif
2023-02-05 01:27:13 -06:00
#endif //__FMDEC_H__