YB_Platform/public/common/app/inc/app_interface.h
2023-07-13 11:27:03 +08:00

49 lines
1.5 KiB
C

// +FHDR------------------------------------------------------------
// // Copyright (c) 2022 SmartLogic.
// // ALL RIGHTS RESERVED
// // -----------------------------------------------------------------
// // Filename : spu_hw_queue.h
// // Author : lishuang.xie
// // Created On : 2023-02-06
// // Last Modified :
// // -----------------------------------------------------------------
// // Description:
// //
// //
// // -FHDR------------------------------------------------------------
#ifndef __APP_INTERFACE_H__
#define __APP_INTERFACE_H__
#include "spu_hw_queue.h"
int8_t ecs_msg_que_init(uint16_t core_id);
/* malloc message buffer */
char *osp_alloc_msg(int size);
/* send msg into hw_queue */
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);
int32_t osp_send_msg_oam(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 */
void ecs_hw_que_irq_callback(ECS_HWQUE_IRQ_FUNC func);
uint8_t ecs_hw_que_get_info(uint8_t que_id, uint32_t* pmsg_addr, uint32_t* pmsg_size);
#endif