misc update
This commit is contained in:
@@ -45,13 +45,11 @@ typedef struct
|
||||
* @brief create a FIFO queue
|
||||
* @param queue The new queue
|
||||
* @param queue_capacity maximum size of the queue
|
||||
* @param a pool to allocate queue from
|
||||
*/
|
||||
bool CircQueueCreate(CIRC_QUEUE **queue, uint32_t queue_capacity);
|
||||
|
||||
/**
|
||||
* @brief free queue memory -- call after destroy
|
||||
* @note we do not free in destroy() to follow pthreads convention
|
||||
*/
|
||||
void CircQueueFree(CIRC_QUEUE *queue);
|
||||
|
||||
@@ -72,9 +70,8 @@ bool isCircQueueEmpty(CIRC_QUEUE *queue);
|
||||
*
|
||||
* @param queue the queue
|
||||
* @param data the data
|
||||
* @return RPA_EINTR the blocking was interrupted (try again)
|
||||
* @return RPA_EOF the queue has been terminated
|
||||
* @return RPA_SUCCESS on a successful push
|
||||
* @return True on a successful push
|
||||
* @return False push failed
|
||||
*/
|
||||
bool CircQueuePush(CIRC_QUEUE *queue, void *data);
|
||||
|
||||
@@ -83,9 +80,8 @@ bool CircQueuePush(CIRC_QUEUE *queue, void *data);
|
||||
*
|
||||
* @param queue the queue
|
||||
* @param data the data
|
||||
* @return RPA_EINTR the blocking was interrupted (try again)
|
||||
* @return RPA_EOF if the queue has been terminated
|
||||
* @return RPA_SUCCESS on a successful pop
|
||||
* @return false pop failed
|
||||
* @return true on a successful pop
|
||||
*/
|
||||
bool CircQueuePop(CIRC_QUEUE *queue, void **data);
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@ L2_CONFIG linkConfig = {
|
||||
.clustId = 1,
|
||||
.myId = 1,
|
||||
.headId = 1,
|
||||
.bkpHeadId = 0,
|
||||
.netScale = 2,
|
||||
.phyInstPtr = NULL, // physical layer reference
|
||||
.tmcInstPtr = NULL
|
||||
@@ -86,14 +85,13 @@ L2_CONFIG linkConfig = {
|
||||
// .clustId = 1,
|
||||
// .myId = 2,
|
||||
// .headId = 1,
|
||||
// .bkpHeadId = 0,
|
||||
// .netScale = 2,
|
||||
// .phyInstPtr = NULL, // physical layer reference
|
||||
// .tmcInstPtr = NULL
|
||||
// };
|
||||
|
||||
static PHY_CONFIG phyConfig = {
|
||||
.devId = 0,
|
||||
.devId = PHY_DEVICE_ID,
|
||||
.baseAddr = PHY_BASEADDR,
|
||||
.antBramId = PHY_ANTCONFIG_BRAM_DEVICE_ID,
|
||||
.antInfoBramId = PHY_ANTINFO_BRAM_DEVICE_ID,
|
||||
|
||||
@@ -1146,8 +1146,7 @@ int32_t L2_SteerBeam2Node(L2_INST *instPtr, uint8_t nodeId)
|
||||
* @param txrxMode tx/rx state for next slot
|
||||
* @param frameType frame type of next slot.
|
||||
*
|
||||
* @return Corresponding frame length
|
||||
* L2_FRAME_NONE_LEN if the frame type code cannot be recognized.
|
||||
* @return SUCCESS/FAILURE
|
||||
*
|
||||
******************************************************************************/
|
||||
int32_t L2_SetupNextSlot(L2_INST *instPtr, L2_TOR_TYPE txrxMode, L2_FRAME_TYPE frameType)
|
||||
|
||||
@@ -39,11 +39,9 @@
|
||||
typedef struct
|
||||
{
|
||||
L2_NODE_TYPE myType; ///< node type
|
||||
bool isInterHead; ///< indicate if node is head node
|
||||
uint8_t clustId; ///< node cluster id
|
||||
uint8_t myId; ///< node id
|
||||
uint8_t headId; ///< head node id
|
||||
uint8_t bkpHeadId; ///< backup head id
|
||||
uint8_t netScale; ///< net scale
|
||||
PHY_INST *phyInstPtr; ///< pointer to system physical layer instance
|
||||
TMC_INST *tmcInstPtr; ///< pointer to system timer controller layer instance
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#include "error.h"
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
/**
|
||||
* @brief Get the node list length
|
||||
* @param list pointer to node list
|
||||
*/
|
||||
inline uint32_t L2_GetNodeListLen(NODE_LIST *list)
|
||||
{
|
||||
ASSERT(list != NULL);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* @addtogroup SystemBus
|
||||
* @{
|
||||
*/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -53,8 +53,8 @@ typedef struct
|
||||
SYSBUS_UART *uartInst; ///< physical uart controller instance
|
||||
CIRC_QUEUE *txQueue; ///< tx queue
|
||||
CIRC_QUEUE *rxQueue; ///< rx queue
|
||||
bool isRxDone; ///< tx done indicator
|
||||
bool isTxDone; ///< rx done indicator
|
||||
bool isTxDone; ///< tx done indicator
|
||||
bool isRxDone; ///< rx done indicator
|
||||
} SYSBUS;
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* Lab of Communication and Network
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/**
|
||||
* @addtogroup SystemBus
|
||||
* @{
|
||||
|
||||
Reference in New Issue
Block a user