mirror of
https://gitee.com/Vancouver2017/luban-lite.git
synced 2025-12-23 20:48:55 +00:00
84 lines
2.4 KiB
C
84 lines
2.4 KiB
C
|
|
/**
|
||
|
|
******************************************************************************
|
||
|
|
*
|
||
|
|
* @file ipc_host.h
|
||
|
|
*
|
||
|
|
* @brief IPC module.
|
||
|
|
*
|
||
|
|
* Copyright (C) ASR
|
||
|
|
*
|
||
|
|
******************************************************************************
|
||
|
|
*/
|
||
|
|
#ifndef _IPC_HOST_H_
|
||
|
|
#define _IPC_HOST_H_
|
||
|
|
|
||
|
|
/*
|
||
|
|
* INCLUDE FILES
|
||
|
|
******************************************************************************
|
||
|
|
*/
|
||
|
|
#include "ipc_shared.h"
|
||
|
|
//#ifndef __KERNEL__
|
||
|
|
#ifdef LWIP
|
||
|
|
#include "arch.h"
|
||
|
|
#endif
|
||
|
|
//#else
|
||
|
|
//#include "ipc_compat.h"
|
||
|
|
//#endif
|
||
|
|
|
||
|
|
#include "uwifi_ipc_host.h"
|
||
|
|
|
||
|
|
extern const int nx_txdesc_cnt[];
|
||
|
|
extern const int nx_txuser_cnt[];
|
||
|
|
|
||
|
|
/**
|
||
|
|
******************************************************************************
|
||
|
|
* @brief Initialize the IPC running on the Application CPU.
|
||
|
|
*
|
||
|
|
* This function:
|
||
|
|
* - initializes the IPC software environments
|
||
|
|
* - enables the interrupts in the IPC block
|
||
|
|
*
|
||
|
|
* @param[in] env Pointer to the IPC host environment
|
||
|
|
*
|
||
|
|
* @warning Since this function resets the IPC Shared memory, it must be called
|
||
|
|
* before the LMAC FW is launched because LMAC sets some init values in IPC
|
||
|
|
* Shared memory at boot.
|
||
|
|
*
|
||
|
|
******************************************************************************
|
||
|
|
*/
|
||
|
|
#if 0
|
||
|
|
void ipc_host_init(struct ipc_host_env_tag *env,
|
||
|
|
struct ipc_host_cb_tag *cb,
|
||
|
|
void *pthis);
|
||
|
|
#endif
|
||
|
|
/**
|
||
|
|
******************************************************************************
|
||
|
|
* @brief Handle all IPC interrupts on the host side.
|
||
|
|
*
|
||
|
|
* The following interrupts should be handled:
|
||
|
|
* Tx confirmation, Rx buffer requests, Rx packet ready and kernel messages
|
||
|
|
*
|
||
|
|
* @param[in] env Pointer to the IPC host environment
|
||
|
|
*
|
||
|
|
******************************************************************************
|
||
|
|
*/
|
||
|
|
int ipc_host_irq(struct ipc_host_env_tag *env, int* type);
|
||
|
|
|
||
|
|
/**
|
||
|
|
******************************************************************************
|
||
|
|
* @brief Send a message to the embedded side
|
||
|
|
*
|
||
|
|
* @param[in] env Pointer to the IPC host environment
|
||
|
|
* @param[in] msg_buf Pointer to the message buffer
|
||
|
|
* @param[in] msg_len Length of the message to be transmitted
|
||
|
|
*
|
||
|
|
* @return Non-null value on failure
|
||
|
|
*
|
||
|
|
******************************************************************************
|
||
|
|
*/
|
||
|
|
int ipc_host_msg_push(struct ipc_host_env_tag *env, void *msg_buf, uint16_t len);
|
||
|
|
|
||
|
|
void asr_rx_to_os_task(struct asr_hw *asr_hw);
|
||
|
|
|
||
|
|
#endif // _IPC_HOST_H_
|