You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.4 KiB
55 lines
1.4 KiB
#ifndef __DMCU_ADAPT_H__
|
|
#define __DMCU_ADAPT_H__
|
|
|
|
#include "td_type.h"
|
|
#include "drv_ipcm_intf.h"
|
|
#include "soc_log.h"
|
|
|
|
#define DMCU_IPCM_CTRL_SIZE 0x4000
|
|
typedef enum {
|
|
NO_READY = 0,
|
|
READY,
|
|
FREEZE,
|
|
SUSPEND,
|
|
RUNNING,
|
|
STOP,
|
|
INVAILD
|
|
} thread_status;
|
|
|
|
typedef enum {
|
|
DMCU_CMD_VAM_ALLOC,
|
|
DMCU_CMD_VAM_FREE,
|
|
DMCU_CMD_MEM_INIT,
|
|
DMCU_CMD_STARTUP,
|
|
DMCU_CMD_SUSPEND,
|
|
DMCU_CMD_RESUME,
|
|
DMCU_CMD_PROC_WRITE,
|
|
DMCU_CMD_PROC_READ,
|
|
DMCU_CMD_CTRL_MAX
|
|
} dmcu_ctrl_cmd;
|
|
|
|
typedef struct {
|
|
dmcu_ctrl_cmd cmd;
|
|
td_bool need_data;
|
|
td_bool need_ack;
|
|
} dmcu_send_cmd_para;
|
|
|
|
typedef struct dmcu_recieve_cmd_function_ {
|
|
int cmd;
|
|
td_s32 (*handler)(dmcu_ctrl_cmd cmd, td_void *arg, td_u32 length);
|
|
td_char *name;
|
|
} dmcu_recieve_cmd_function;
|
|
|
|
#define dmcu_send_bundle_def(command, need_get_data, need_process_ack) \
|
|
{ \
|
|
.cmd = (command), \
|
|
.need_data = (need_get_data), \
|
|
.need_ack = (need_process_ack), \
|
|
}
|
|
|
|
td_s32 dmcu_adapt_init(td_void);
|
|
td_s32 dmcu_adapt_deinit(td_void);
|
|
td_s32 dmcu_client_send_process(dmcu_ctrl_cmd cmd, td_void *args, td_u32 length);
|
|
|
|
#endif /* __DMCU_ADAPT_H__ */
|