![]() |
![]() |
mmwave Communication Driver Module More...
Functions | |
rlReturnVal_t | rlDriverOsiInit (void) |
Initializes the OSI layer abstraction for mmwavelink. More... | |
rlReturnVal_t | rlDriverAddDevice (rlUInt8_t deviceMap) |
Adds mmwave radar device. More... | |
rlReturnVal_t | rlDriverRemoveDevices (rlUInt8_t deviceMap) |
Disconnects the mmwave radar devices. More... | |
rlReturnVal_t | rlDriverDeInit (void) |
De Initializes the mmwave radar Driver. More... | |
rlDriverData_t * | rlDriverGetHandle (void) |
Returns mmwave radar Driver Global Structure. More... | |
rlUInt8_t | rlDriverGetPlatformId (void) |
Returns RL Platform ID (i.e. where mmWaveLink is executing) More... | |
rlUInt8_t | rlDriverGetArDeviceType (void) |
Returns AR device type which mmWavelink is communicating. More... | |
rlReturnVal_t | rlDriverIsDeviceMapValid (rlUInt8_t deviceMap) |
Checks if given deviecMap is valid wrt to global DeviceMap set to mmWaveLink. More... | |
rlReturnVal_t | rlDriverWaitForResponse (rlUInt8_t devIndex, rlDriverMsg_t *outMsg) |
: Wait for Device's response More... | |
rlReturnVal_t | rlDriverCmdInvoke (rlUInt8_t deviceMap, rlDriverMsg_t inMsg, rlDriverMsg_t *outMsg) |
Invokes a command to mmwave radar Device. Implements mmwave radar Host Communication Protocol(RHCP) More... | |
rlReturnVal_t | rlDriverConfigureCrc (rlCrcType_t crcType) |
Configures the CRC Type in mmwavelink Driver. More... | |
rlReturnVal_t | rlDriverConfigureAckTimeout (rlUInt32_t ackTimeout) |
Configures the Acknowledgement timeout in mmwavelink Driver. More... | |
rlReturnVal_t | rlDriverCalCRC (rlUInt8_t *data, rlUInt16_t dataLen, rlUInt8_t crcType, rlUInt8_t crc[RL_CRC_LEN_MAX]) |
Calculates 16bit/32bit/64bit CRC. More... | |
rlReturnVal_t | rlDriverVerifyCRC (rlUInt8_t *data, rlUInt16_t dataLen, rlUInt8_t crcType, rlUInt8_t crc[RL_CRC_LEN_MAX]) |
Compares received CRC with Calculated CRC. More... | |
void | rlDriverShiftDWord (rlUInt8_t buf[]) |
Shifts one byte in the byte array. More... | |
rlReturnVal_t | rlDriverValidateHdr (rlProtHeader_t protHdr) |
Validates the header by comparing Checksum. More... | |
rlReturnVal_t | rlDriverAsyncEventHandler (rlUInt8_t devIndex, rlUInt16_t nsbc, rlUInt8_t *payload, rlUInt16_t payloadLen) |
Handles asynchronous response/error from mmwave radar device. More... | |
rlUInt8_t | rlDeviceIdentifyCmdDir (rlUInt16_t msgId, rlUInt8_t platform) |
Get the direction of command packet based on MsgID and platform. More... | |
void | rlDriverHostIrqHandler (rlUInt8_t deviceIndex, void *pValue) |
Interrupt Service Routine to handle host interrupt from mmwave radar device. More... | |
rlReturnVal_t | rlDriverMsgReadCmdCtx (rlUInt8_t devIndex) |
Wait and handle command response. More... | |
rlReturnVal_t | rlDriverMsgRead (rlDriverData_t *rlDrvData, rlUInt8_t devIndex) |
Receive and validate protocol header and payload. More... | |
rlReturnVal_t | rlDriverMsgWrite (rlDriverData_t *rlDrvData, rlComIfHdl_t comIfHdl) |
Write command header and payload data over communication channel. More... | |
rlReturnVal_t | rlDriverRxHdrRead (rlUInt8_t hdrBuf[RHCP_HEADER_LEN], rlComIfHdl_t comIfHdl) |
Read SYNC and Header from communication channel. More... | |
void | rlDriverFillPayload (rlUInt16_t msgId, rlUInt16_t sbcID, rlPayloadSb_t *payloadPtr, rlUInt8_t *data, rlUInt16_t inLen) |
: Fill payload based on given message-ID, sub-block ID and data. More... | |
void | rlDriverConstructInMsg (rlUInt16_t msgId, rlDriverMsg_t *inMsg, rlPayloadSb_t *payloadPtr) |
: Construct command packet (inMsg) based on given message-ID and payload More... | |
void | rlDriverConstructOutMsg (rlUInt16_t numSblk, rlDriverMsg_t *outMsg, rlPayloadSb_t *payloadPtr) |
: Construct command packet based on given message-ID and payload More... | |
rlReturnVal_t | rlDriverProcRdMsg (rlUInt8_t devIdx, rlReturnVal_t inVal) |
Process received message for Async event message. More... | |
rlReturnVal_t | rlDriverMsgCmdReply (rlDriverData_t *rlDrvData, rlUInt8_t devIndex) |
Wait and handle command response. More... | |
rlReturnVal_t | rlDriverCmdSendRetry (rlUInt8_t deviceMap, rlDriverMsg_t *outMsg) |
: Send command and wait for response More... | |
mmwave Communication Driver Module
The mmwave radar Host Communication Driver Module implements the mmwave radar communication protocol:
rlUInt8_t rlDeviceIdentifyCmdDir | ( | rlUInt16_t | msgId, |
rlUInt8_t | platform | ||
) |
Get the direction of command packet based on MsgID and platform.
[in] | msgId | - Message ID of data packet |
[in] | platform | - Platform Type where mmWaveLink instance is running |
Returns direction of command packet based on MsgID and platform.
Definition at line 407 of file rl_driver.c.
rlReturnVal_t rlDriverAddDevice | ( | rlUInt8_t | deviceMap | ) |
Adds mmwave radar device.
[in] | deviceMap | - Bitmap of device to be connected |
Adds mmwave radar device Open communication channel, Register Interrupt Handler with device
Definition at line 1880 of file rl_driver.c.
rlReturnVal_t rlDriverAsyncEventHandler | ( | rlUInt8_t | devIndex, |
rlUInt16_t | nsbc, | ||
rlUInt8_t * | payload, | ||
rlUInt16_t | payloadLen | ||
) |
Handles asynchronous response/error from mmwave radar device.
[in] | devIndex | - Device Index |
[in] | nsbc | - No. of Sub-Block in MSG |
[in] | payload | - Protocol payload message data |
[in] | payloadLen | - Length of payload message data |
Handles asynchronous response/error from mmwave radar device
Definition at line 495 of file rl_driver.c.
rlReturnVal_t rlDriverCalCRC | ( | rlUInt8_t * | data, |
rlUInt16_t | dataLen, | ||
rlUInt8_t | crcType, | ||
rlUInt8_t | crc[RL_CRC_LEN_MAX] | ||
) |
Calculates 16bit/32bit/64bit CRC.
[in] | data | - Byte array |
[in] | dataLen | - Length of the byte array |
[in] | crcType | - Type of CRC 16/32/64bit |
[in] | crc | - Received CRC |
Calculates 16bit/32bit/64bit CRC
Definition at line 204 of file rl_driver.c.
rlReturnVal_t rlDriverCmdInvoke | ( | rlUInt8_t | deviceMap, |
rlDriverMsg_t | inMsg, | ||
rlDriverMsg_t * | outMsg | ||
) |
Invokes a command to mmwave radar Device. Implements mmwave radar Host Communication Protocol(RHCP)
[in] | deviceMap | - Bitmap of devices to send the message |
[in] | inMsg | - Command Opcode(Direction, Class, MsgId) and Subblocks |
[out] | outMsg | - Response Opcode(Direction, Class, MsgId) and Subblocks |
Invokes a command to mmwave radar Device. Waits for Response if ACK is requested. Computes CRC/Checksum according to mmwave radar Host Communication Protocol(RHCP)
Definition at line 2406 of file rl_driver.c.
rlReturnVal_t rlDriverCmdSendRetry | ( | rlUInt8_t | deviceMap, |
rlDriverMsg_t * | outMsg | ||
) |
: Send command and wait for response
[in] | deviceMap | - device map contains bitmap of all device connected |
[out] | outMsg | - output msg |
Send command and wait for response
Definition at line 2344 of file rl_driver.c.
rlReturnVal_t rlDriverConfigureAckTimeout | ( | rlUInt32_t | ackTimeout | ) |
Configures the Acknowledgement timeout in mmwavelink Driver.
[in] | ackTimeout | - ACK timeout, 0 - No ACK |
Configures the Acknowledgement timeout in mmwavelink Driver
Definition at line 2572 of file rl_driver.c.
rlReturnVal_t rlDriverConfigureCrc | ( | rlCrcType_t | crcType | ) |
Configures the CRC Type in mmwavelink Driver.
[in] | crcType | - CRC Types |
Configures the CRC Type in mmwavelink Driver
Definition at line 2538 of file rl_driver.c.
void rlDriverConstructInMsg | ( | rlUInt16_t | msgId, |
rlDriverMsg_t * | inMsg, | ||
rlPayloadSb_t * | payloadPtr | ||
) |
: Construct command packet (inMsg) based on given message-ID and payload
[in] | msgId | - message ID of command packet |
[out] | inMsg | - Message strucutre input pointer |
[in] | payloadPtr | - payload data pointer |
Construct Set command packet based on given message-ID and payload
Definition at line 2703 of file rl_driver.c.
void rlDriverConstructOutMsg | ( | rlUInt16_t | numSblk, |
rlDriverMsg_t * | outMsg, | ||
rlPayloadSb_t * | payloadPtr | ||
) |
: Construct command packet based on given message-ID and payload
[in] | numSblk | - number of sub-blocks in message |
[out] | outMsg | - Message strucutre input pointer |
[in] | payloadPtr | - payload data pointer |
Construct Get command packet based on given message-ID and payload
Definition at line 2738 of file rl_driver.c.
rlReturnVal_t rlDriverDeInit | ( | void | ) |
De Initializes the mmwave radar Driver.
DeInitializes the mmwave radar Driver. Clear memory, destroy OS objects, Close communication channel, Unregister Interrupt Handler
Definition at line 2018 of file rl_driver.c.
void rlDriverFillPayload | ( | rlUInt16_t | msgId, |
rlUInt16_t | sbcID, | ||
rlPayloadSb_t * | payloadPtr, | ||
rlUInt8_t * | data, | ||
rlUInt16_t | inLen | ||
) |
: Fill payload based on given message-ID, sub-block ID and data.
[in] | msgId | - message ID of command packet |
[in] | sbcID | - sub block ID of command packet |
[in] | payloadPtr | - payload data pointer |
[out] | data | - data pointer |
[in] | inLen | - lenght of data |
Fill payload based on given message-ID, sub-block ID and data.
Definition at line 2769 of file rl_driver.c.
rlDriverGetArDeviceType | ( | void | ) |
Returns AR device type which mmWavelink is communicating.
Returns AR device type which mmWavelink is communicating
Definition at line 2115 of file rl_driver.c.
rlDriverData_t * rlDriverGetHandle | ( | void | ) |
Returns mmwave radar Driver Global Structure.
Returns mmwave radar Driver Global Structure
Definition at line 2081 of file rl_driver.c.
rlDriverGetPlatformId | ( | void | ) |
Returns RL Platform ID (i.e. where mmWaveLink is executing)
Returns Device run ID (i.e. where mmWaveLink is executing)
Definition at line 2097 of file rl_driver.c.
void rlDriverHostIrqHandler | ( | rlUInt8_t | deviceIndex, |
void * | pValue | ||
) |
Interrupt Service Routine to handle host interrupt from mmwave radar device.
[in] | deviceIndex | - source device Index |
[in] | pValue | - Interrupt Routine Argument |
Interrupt Service Routine to handle host interrupt from mmwave radar device
Definition at line 560 of file rl_driver.c.
rlUInt8_t rlDriverIsDeviceMapValid | ( | rlUInt8_t | deviceMap | ) |
Checks if given deviecMap is valid wrt to global DeviceMap set to mmWaveLink.
[in] | deviceMap | - Bitmap of devices to send the message |
It enables RF/Analog Subsystem.
Definition at line 2134 of file rl_driver.c.
rlReturnVal_t rlDriverMsgCmdReply | ( | rlDriverData_t * | rlDrvData, |
rlUInt8_t | devIndex | ||
) |
Wait and handle command response.
[in] | rlDrvData | - Pointer to mmWaveLink global structure |
[in] | devIndex | - Device index of slave device from where response is expected |
Wait and handle command response
Definition at line 791 of file rl_driver.c.
rlReturnVal_t rlDriverMsgRead | ( | rlDriverData_t * | rlDrvData, |
rlUInt8_t | devIndex | ||
) |
Receive and validate protocol header and payload.
[in] | rlDrvData | - Pointer to mmwavelink global structure |
[in] | devIndex | - Device index of slave device from where data is received |
Receive and validate protocol header and payload
Definition at line 1193 of file rl_driver.c.
rlReturnVal_t rlDriverMsgReadCmdCtx | ( | rlUInt8_t | devIndex | ) |
Wait and handle command response.
[in] | devIndex | - Device index of slave device from where response is expected |
Wait and handle command response
Definition at line 892 of file rl_driver.c.
rlReturnVal_t rlDriverMsgWrite | ( | rlDriverData_t * | rlDrvData, |
rlComIfHdl_t | comIfHdl | ||
) |
Write command header and payload data over communication channel.
[in] | rlDrvData | - Pointer to mmwavelink global structure |
[in] | comIfHdl | - Communication interface handle |
Write command header and payload data over communication channel
Definition at line 1314 of file rl_driver.c.
rlReturnVal_t rlDriverOsiInit | ( | void | ) |
Initializes the OSI layer abstraction for mmwavelink.
Initializes the OS mutex, semaphore and queue interface for mmwavelink
Definition at line 1637 of file rl_driver.c.
rlReturnVal_t rlDriverProcRdMsg | ( | rlUInt8_t | devIdx, |
rlReturnVal_t | inVal | ||
) |
Process received message for Async event message.
[in] | devIdx | - device Index |
[in] | inVal | - status value |
Process received message for Async event message
Definition at line 631 of file rl_driver.c.
rlReturnVal_t rlDriverRemoveDevices | ( | rlUInt8_t | deviceMap | ) |
Disconnects the mmwave radar devices.
[in] | deviceMap | - Bitmap of mmwave devices to be disconnected |
disconnects the mmwave radar devices Close communication channel, Unregister Interrupt Handler
Definition at line 1973 of file rl_driver.c.
rlReturnVal_t rlDriverRxHdrRead | ( | rlUInt8_t | hdrBuf[RHCP_HEADER_LEN], |
rlComIfHdl_t | comIfHdl | ||
) |
Read SYNC and Header from communication channel.
[in] | comIfHdl | - Communication interface handle |
[out] | hdrBuf | - Buffer to hold SyncPattern+header information |
Read SYNC and Header from communication channel
Definition at line 1521 of file rl_driver.c.
void rlDriverShiftDWord | ( | rlUInt8_t | buf[] | ) |
Shifts one byte in the byte array.
[in] | buf | - Byte array |
Shifts one byte in the byte array
Definition at line 174 of file rl_driver.c.
rlReturnVal_t rlDriverValidateHdr | ( | rlProtHeader_t | protHdr | ) |
Validates the header by comparing Checksum.
[in] | protHdr | - Protocol Header |
Validates the header by comparing checksum
Definition at line 361 of file rl_driver.c.
rlReturnVal_t rlDriverVerifyCRC | ( | rlUInt8_t * | data, |
rlUInt16_t | dataLen, | ||
rlUInt8_t | crcType, | ||
rlUInt8_t | crc[RL_CRC_LEN_MAX] | ||
) |
Compares received CRC with Calculated CRC.
[in] | data | - Byte array |
[in] | dataLen | - Length of the byte array |
[in] | crcType | - Type of CRC 16/32/64bit |
[in] | crc | - Received CRC |
Compares received CRC with Calculated CRC
Definition at line 243 of file rl_driver.c.
rlReturnVal_t rlDriverWaitForResponse | ( | rlUInt8_t | devIndex, |
rlDriverMsg_t * | outMsg | ||
) |
: Wait for Device's response
[in] | devIndex | - devIndex is index of device not the deviceMap |
[out] | outMsg | - Driver msg |
Wait for driver response
Definition at line 2177 of file rl_driver.c.