85 lines
3.2 KiB
C
85 lines
3.2 KiB
C
#ifndef __OSP_RFM_INTERFACE_H__
|
||
#define __OSP_RFM_INTERFACE_H__
|
||
|
||
/************************************************************************************/
|
||
/* shell相关接口定义 */
|
||
/************************************************************************************/
|
||
/* shell命令回调函数类型 */
|
||
typedef unsigned long (*OSP_FUNCPTR)();
|
||
|
||
/*
|
||
函数名称: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);
|
||
|
||
/************************************************************************************/
|
||
/* 调试信息输出相关 */
|
||
/************************************************************************************/
|
||
/*
|
||
函数名称:osp_sendLog
|
||
函数入参:level,固定传1
|
||
函数入参:pbuf,申请的buf地址,osp_msg_head预留
|
||
函数入参:size,消息大小
|
||
函数入参:cell_id,小区标识
|
||
函数功能:调试信息输出(字符串型接口)
|
||
*/
|
||
void osp_sendLog(int level, char* pbuf, int size, int cell_id);
|
||
|
||
/*
|
||
函数名称:osp_sendLog_print
|
||
函数入参:level,固定传1
|
||
函数入参:pbuf,申请的buf地址,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_id,源核ID
|
||
函数入参:dst_core_id,目的核ID
|
||
函数入参:src_task_id,源任务ID
|
||
函数入参:dst_task_id,目的任务ID
|
||
函数功能:将消息通过硬件队列发给到指定硬件队列中
|
||
*/
|
||
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);
|
||
|
||
#endif
|
||
|