MCUXpresso SDK API Reference Manual  Rev 2.12.1
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
IMU_Adapter

Overview

Data Structures

struct  IMU_Hdr_t
 IMU message header structure. More...
 
struct  IMU_Msg_t
 IMU message structure. More...
 
struct  IMU_Msg_Wrapper_long_t
 IMU message wrapper 1. More...
 
struct  IMU_Msg_Wrapper_short_t
 IMU message wrapper 2. More...
 
struct  rpmsg_std_hdr
 Common header for all rpmsg messages. More...
 
struct  rpmsg_std_msg
 Common message structure. More...
 
struct  hal_rpmsg_state_t
 rpmsg state structure. More...
 
struct  hal_rpmsg_ept_buf_t
 rpmsg ept buf structure. More...
 
struct  IMU_WLAN_TXQ_CTRL_st
 IMU WLAN Tx buffer control structure. More...
 
struct  RPMSG_TXQ_CTRL_st
 RPMSG Tx buffer control structure. More...
 
struct  hal_imu_handle_t
 imu handle structure. More...
 

Macros

#define IRQ_IMU_CPU13   WL_MCI_WAKEUP0_IRQn
 IRQ index should come from board level definition. More...
 
#define IMU_PAYLOAD_SIZE   8
 IMU message payload size. More...
 
#define IS_WLAN_TXBQ_EMPTY(q)   ((q)->writeIndex == (q)->readIndex)
 Checks whether a tx buffer queue is empty.
 
#define IS_WLAN_TXBQ_FULL(q)   ((((q)->writeIndex & (1U<<31)) != ((q)->readIndex & (1U<<31))) && (((q)->writeIndex & IMU_TXQ_ENTRY_MASK) == ((q)->readIndex & IMU_TXQ_ENTRY_MASK)))
 Checks whether a tx buffer queue is full.
 
#define INCR_WLAN_TXBQ_WR_INDEX(q, n)
 Increments write pointer.
 
#define INCR_WLAN_TXBQ_RD_INDEX(q, n)
 Increments read pointer.
 
#define IS_RPMSG_TXBQ_EMPTY(q)   ((q)->writeIndex == (q)->readIndex)
 Checks whether a tx buffer queue is empty.
 
#define IS_RPMSG_TXBQ_FULL(q)   ((((q)->writeIndex & (1U<<31)) != ((q)->readIndex & (1U<<31))) && (((q)->writeIndex & RPMSG_TXQ_ENTRY_MASK) == ((q)->readIndex & RPMSG_TXQ_ENTRY_MASK)))
 Checks whether a tx buffer queue is full.
 
#define INCR_RPMSG_TXBQ_WR_INDEX(q, n)
 Increments write pointer.
 
#define INCR_RPMSG_TXBQ_RD_INDEX(q, n)
 Increments read pointer.
 

Enumerations

enum  imu_init_state_t
 IMU initialization state. More...
 
enum  imu_msg_type_t
 RPMSG type. More...
 
enum  imu_ctrl_msg_subtype_t
 RPMSG control message subtype. More...
 

Functions

hal_rpmsg_status_t HAL_ImuAddWlanTxPacket (uint8_t imuLink, uint8_t *txBuf, uint32_t length)
 Add wlan Tx packet for sending multiple Tx packets within one message. More...
 
hal_rpmsg_status_t HAL_ImuInstallCallback (uint8_t imuLink, imu_callback_t callback, uint8_t type)
 Install wlan callback. More...
 
hal_rpmsg_status_t HAL_ImuSendCommand (uint8_t imuLink, uint8_t *cmdBuf, uint32_t length)
 Send wlan command packet. More...
 
hal_rpmsg_status_t HAL_ImuSendTxData (uint8_t imuLink, uint8_t *txBuf, uint32_t length)
 Add wlan Tx packet for sending one Tx packet within one message. More...
 
hal_rpmsg_status_t HAL_ImuSendMultiTxData (uint8_t imuLink)
 Send multiple Tx packets within one message. More...
 
hal_rpmsg_status_t HAL_ImuNoCopySendEvent (uint8_t imuLink, uint8_t *eventBuf)
 Send wlan event packet. More...
 
hal_rpmsg_status_t HAL_ImuNoCopySendCommandResponse (uint8_t imuLink, uint8_t *cmdRspBuf)
 Send wlan command response packet. More...
 
hal_rpmsg_status_t HAL_ImuNoCopySendRxData (uint8_t imuLink, uint8_t *rxBuf)
 Send wlan Rx packet. More...
 
hal_rpmsg_status_t HAL_ImuLinkIsUp (uint8_t imuLink)
 Check if IMU link is up. More...
 
hal_rpmsg_status_t HAL_ImuInit (imu_link_t link)
 Start IMU link. More...
 
hal_rpmsg_status_t HAL_ImuDeinit (imu_link_t link, uint32_t flag)
 Stop IMU link. More...
 
hal_rpmsg_status_t HAL_ImuAddWlanRxPacket (uint8_t imuLink, uint8_t *rxBuf)
 Add wlan Rx packet for sending multiple Rx packets within one message. More...
 
hal_rpmsg_status_t HAL_ImuSendMultiRxData (uint8_t imuLink)
 Send multiple Rx packets within one message. More...
 
hal_rpmsg_status_t HAL_ImuReturnAllTxBuf (imu_link_t link)
 Return all tx buffer. More...
 
hal_rpmsg_status_t HAL_ImuReceive (uint8_t imuLink)
 Receive IMU message. More...
 

Data Structure Documentation

struct IMU_Hdr_t
struct IMU_Msg_t
struct IMU_Msg_Wrapper_long_t
struct IMU_Msg_Wrapper_short_t
struct rpmsg_std_hdr

Every message sent/received on the rpmsg bus begins with this header.

Data Fields

uint32_t src
 source endpoint address
 
uint32_t dst
 destination endpoint address
 
struct rpmsg_hdr_reserved reserved
 reserved for future use
 
uint16_t len
 length of payload (in bytes)
 
uint16_t flags
 message flags
 
struct rpmsg_std_msg

Contains the header and the payload.

Data Fields

struct rpmsg_std_hdr hdr
 RPMsg message header.
 
uint32_t data
 bytes of message payload data
 
struct hal_rpmsg_state_t
struct hal_rpmsg_ept_buf_t
struct IMU_WLAN_TXQ_CTRL_st
struct RPMSG_TXQ_CTRL_st
struct hal_imu_handle_t

Data Fields

uint8_t imuLink
 Word 0.
 
bool cmd_buffer_available
 Word 1.
 
uint32_t * cmd_buffer
 Word 2.
 
IMU_WLAN_TXQ_CTRL_st wlanTxqCtl
 Word 3.
 
uint32_t imuMsgBuf [IMU_PAYLOAD_SIZE]
 Word 37.
 
LIST_ELEM_st eptList
 Word 45.
 
RPMSG_TXQ_CTRL_st rpmsgTxqCtl
 Word 47.
 
imu_callback_t imuHandler [IMU_MSG_MAX]
 Word 57.
 

Macro Definition Documentation

#define IRQ_IMU_CPU13   WL_MCI_WAKEUP0_IRQn

Remove following definition after RPMSG code integration.

#define IMU_PAYLOAD_SIZE   8

Enumeration Type Documentation

Function Documentation

hal_rpmsg_status_t HAL_ImuAddWlanTxPacket ( uint8_t  imuLink,
uint8_t *  txBuf,
uint32_t  length 
)

This function is used to add a wlan Tx packet for IMU_MSG_MULTI_TX_DATA.

Parameters
imuLinkIMU link ID.
txBufTx buffer to be sent.
lengthLength of Tx data.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuInstallCallback ( uint8_t  imuLink,
imu_callback_t  callback,
uint8_t  type 
)

This function is used to imstall wlan callback

Parameters
imuLinkIMU link ID.
callbackCallback to be installed.
typeCallback type.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuSendCommand ( uint8_t  imuLink,
uint8_t *  cmdBuf,
uint32_t  length 
)

This function is used to send wlan command packet

Parameters
imuLinkIMU link ID.
cmdBufCommand buffer to be sent.
lengthLength of command data.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuSendTxData ( uint8_t  imuLink,
uint8_t *  txBuf,
uint32_t  length 
)

This function is used to send a wlan Tx packet.

Parameters
imuLinkIMU link ID.
txBufTx buffer to be sent.
lengthLength of Tx data.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuSendMultiTxData ( uint8_t  imuLink)

This function is used to send multiple wlan Tx packets within one IMU message, which have been added by HAL_ImuAddWlanTxPacket already.

Parameters
imuLinkIMU link ID.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuNoCopySendEvent ( uint8_t  imuLink,
uint8_t *  eventBuf 
)

This function is used to send wlan event packet. Event buffer is already in SHMEM, so data copy is not required.

Parameters
imuLinkIMU link ID.
eventBufCommand buffer to be sent.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuNoCopySendCommandResponse ( uint8_t  imuLink,
uint8_t *  cmdRspBuf 
)

This function is used to send wlan command response packet. Command response buffer is already in SHMEM, so data copy is not required.

Parameters
imuLinkIMU link ID.
cmdRspBufCommand response buffer to be sent.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuNoCopySendRxData ( uint8_t  imuLink,
uint8_t *  rxBuf 
)

This function is used to send wlan Rx packet. Rx buffer is already in SHMEM, so data copy is not required.

Parameters
imuLinkIMU link ID.
rxBufRx buffer to be sent.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuLinkIsUp ( uint8_t  imuLink)

This function is used to check if IMU link is up.

Parameters
imuLinkIMU link ID.
Return values
kStatus_HAL_RpmsgSuccessfor IMU link up or kStatus_HAL_RpmsgError for IMU link not up.
hal_rpmsg_status_t HAL_ImuInit ( imu_link_t  link)

This function is used to start specified IMU link.

Parameters
imuLinkIMU link ID.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuDeinit ( imu_link_t  link,
uint32_t  flag 
)

This function is used to stop specified IMU link.

Parameters
imuLinkIMU link ID.
flagflag with bits to control. flag bit0: control if need send imu msg to fw (imu tx return /imu shutdown) flag bit1: control if need destroy ImuTask and ImuQFlagsRef
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuAddWlanRxPacket ( uint8_t  imuLink,
uint8_t *  rxBuf 
)

This function is used to add a wlan Rx packet for IMU_MSG_MULTI_RX_DATA.

Parameters
imuLinkIMU link ID.
rxBufRx buffer to be sent.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuSendMultiRxData ( uint8_t  imuLink)

This function is used to send multiple wlan Rx packets within one IMU message, which have been added by HAL_ImuAddWlanRxPacket already.

Parameters
imuLinkIMU link ID.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuReturnAllTxBuf ( imu_link_t  link)

This function is used to return all tx buffer to CPU1.

Parameters
imuLinkIMU link ID.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.
hal_rpmsg_status_t HAL_ImuReceive ( uint8_t  imuLink)

This function is used to receive and process IMU message

Parameters
imuLinkIMU link ID.
Return values
kStatus_HAL_RpmsgSuccessor kStatus_HAL_RpmsgError.