Files
2025-12-04 21:06:43 +08:00

96 lines
1.9 KiB
C

/*
* Copyright 2024 NXP
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/
#ifndef __CUSTOM_H_
#define __CUSTOM_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "gui_guider.h"
#include "stdio.h"
typedef struct _bat_type
{
int32_t index;
char name[50];
}BAT_TYPE_t;
typedef struct _dialog
{
double min;
double max;
int32_t is_dec;
int32_t dec_num;
}DIALOG_t;
typedef struct _function_param
{
double voltage;
double current;
int32_t capcity;
int32_t number;
int32_t type;
int32_t mode;
int32_t runstate;
int32_t balance;
} PARAM_t;
extern PARAM_t param;
extern int info_index;
extern int function_index;
extern unsigned int running_state;
int app_main(void);
void custom_init(lv_ui *ui);
void info_index_add();
void info_index_dec();
void function_mode_set(int32_t mode);
void function_mode_reset(int32_t mode);
void function_start();
void function_stop();
void dialog_ExitWarnning_Cancel();
void dialog_ExitWarnning_Confirm();
void getTypeText();
void dialog_getType_onClicked(char index);
void dialog_getType_show(char *title, int32_t dialog_index);
void dialog_getType_exit();
char *dialog_getType_confirm();
void dialog_getNumber_show(char *title, int32_t dialog_index, int32_t is_en_dec, int32_t dec_num, double min, double max);
void dialog_getNumber_exit();
char *dialog_getNumber_confirm();
void dialog_getNumber_onClicked(char *c, int32_t number);
#ifdef __cplusplus
}
#endif
#endif /* EVENT_CB_H_ */