linux中DSP打印信息,LINUX用户态代码如何访问DSP对应消息

1. Linux

The IPC layer never allocates any memory, the application invoking IPC should pre-allocate memory and attach to the

channel.

For example:

• - For MSG_CH, the consumer application when calling fsl_ipc_configure_channel, should set the msg_ring memory

equal to the msg_size*depth and aligned to the msg_size

• - For TXREQ_CH, the producer application should call fsl_ipc_configure_txreq to provide buffers where linearization

should be done by DMA.

2. SmartDSP OS

The IPC layer will allocate OS internal structures for optimizing the access to the IPC control area. Buffers, used by

message channels, are to be pre-allocated by the application and the memory manager (os_mem_part_t*) handle will

be passed during opening the channel.

int fsl_ipc_configure_channel(uint32_t channel_id,

uint32_t depth,

ipc_ch_type_t channel_type,

unsigned long msg_ring_paddr,

uint32_t msg_size,

ipc_cbfunc_t cbfunc,

fsl_ipc_t ipc);

channel_id - [IN][M]unique id of the channel

*

* depth - [IN][M]user configurable number of entries in the ring.

* depth <= max depth

*

* channel_type - [IN][M]either of IPC_PTR_CH/IPC_MSG_CH

*

* msg_ring_paddr - [IN]Physical address of the message ring. Required

* only for IPC_MSG_CH

*

* msg_size - [IN]max size of each message.

* For PTR_CH, msg_ring_vaddr, msg_ring_paddr, msg_size

* are all NULL. Required only for IPC_MSG_CH

*

* cbfunc - [IN]The callback function called on receiving interrupt

* from the producer. If cbfunc is NULL, channel does not

* support notifications.

*

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值