YB_Platform/inc/osp_rfm.h

111 lines
4.1 KiB
C
Raw Permalink Normal View History

2023-07-13 11:27:03 +08:00
#ifndef __OSP_RFM_INTERFACE_H__
#define __OSP_RFM_INTERFACE_H__
/************************************************************************************/
/* shell相关接口定义 */
/************************************************************************************/
/* shell命令回调函数类型 */
typedef unsigned long (*OSP_FUNCPTR)();
2023-07-13 11:27:03 +08:00
/*
spu_insert_cmd_ext
name : shell命令:_ape:i_ape,7
pfunc : shell命令的回调函数
desc : shell命令的描述
argnum : shell命令的参考个数
shell命令
*/
void spu_insert_cmd_ext(char *name, OSP_FUNCPTR pfunc, char *desc, uint32_t argnum);
2023-07-13 11:27:03 +08:00
/************************************************************************************/
/* 调试信息输出相关 */
/************************************************************************************/
/*
osp_sendLog
level1
pbufbuf地址osp_msg_head预留
size
cell_id
*/
void osp_sendLog(int level, char* pbuf, int size, int cell_id);
/*
osp_sendLog_print
level1
pbufbuf地址osp_msg_head预留
size
cell_id
*/
void osp_sendLog_print(int level,char* pbuf, int size, int cell_id);
/************************************************************************************/
/* 消息通信相关接口 */
/************************************************************************************/
/* calback function type */
typedef void(*ECS_HWQUE_IRQ_FUNC)();
/*
osp_alloc_msg
size
DDR
*/
char *osp_alloc_msg(int size);
/*
osp_send_msg
msg_addr
msg_len
msg_type
src_core_idID
dst_core_idID
src_task_idID
dst_task_idID
*/
int32_t osp_send_msg(uint32_t msg_addr,
uint32_t msg_len,
uint8_t msg_type,
uint8_t src_core_id,
uint8_t dst_core_id,
uint8_t src_task_id,
uint8_t dst_task_id);
/* hw queue callback function */
/*
ecs_hw_que_irq_callback
func
*/
void ecs_hw_que_irq_callback(ECS_HWQUE_IRQ_FUNC func);
/*
spu_get_oam_handle_id
inst_id0/1
OAM队列的handle_id
*/
int32_t spu_get_oam_handle_id(uint8_t inst_id);
/************************************************************************************/
/* 其他相关接口 */
/************************************************************************************/
/*
osp_heap_malloc
DDR里分配内存
size
DDR内存地址
*/
extern char *osp_heap_malloc(uint32_t size);
/*
osp_heap_free
DDR里分配内存
*/
extern void osp_heap_free(char *p);
2023-07-13 11:27:03 +08:00
#endif