{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = TRUE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = TRUE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = TRUE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = TRUE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = TRUE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_A,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = TRUE,
.maxPayload = 64,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_B,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 32,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_A,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = TRUE,
.maxPayload = 16,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_B,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = TRUE,
.maxPayload = 32,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_A,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 64,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_A,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = TRUE,
.maxPayload = 9,
.msgBufferInterrupt = TRUE,
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 127,
.msgBufferInterrupt = FALSE, // Recomended for FIFO buffers
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 127,
.msgBufferInterrupt = FALSE, // Recomended for FIFO buffers
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 127,
.msgBufferInterrupt = FALSE, // Recomended for FIFO buffers
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 127,
.msgBufferInterrupt = FALSE, // Recomended for FIFO buffers
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 127,
.msgBufferInterrupt = FALSE, // Recomended for FIFO buffers
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 64,
.msgBufferInterrupt = FALSE, // Recommended for FIFO buffers
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 64,
.msgBufferInterrupt = FALSE, // Recommended for FIFO buffers
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 64,
.msgBufferInterrupt = FALSE, // Recommended for FIFO buffers
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 64,
.msgBufferInterrupt = FALSE, // Recommended for FIFO buffers
{
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
+ .fidMask = 0,
.isTx = FALSE,
.maxPayload = 64,
.msgBufferInterrupt = FALSE, // Recommended for FIFO buffers
};;
#define USER_CONFIG_NOT_DONE 0x0
-#define USER_CONFIG_CLUSTER 0x1
+#define USER_CONFIG_CLUSTER 0x1
#define USER_CONFIG_NODE 0x2
static uint8_t user_configuration_state = USER_CONFIG_NOT_DONE;
Fr_TMS570LS_BufferConfigType* fifo_buffer_ptr = &user_fifo_buffer_config[0];
int ret, i;
char channel[3], rej_static_frames[8], rej_null_frames[8];
- unsigned depth, slot, cycleset, maxpayload;
+ unsigned depth, slot, cycleset, maxpayload, mask;
Fr_TMS570LS_BufferConfigType tmp_buffer;
if (fr_initialized) {
return -CMDERR_BADCFG;
}
- ret = sscanf(param[2], "slot%i depth%i %2s cyc%i max%i %10s %10s",
+ ret = sscanf(param[2], "rejslot%i slotmask%i depth%i %2s cyc%i max%i %10s %10s",
&slot,
+ &mask,
&depth,
channel,
&cycleset,
rej_null_frames,
rej_static_frames
);
- if (ret != 7) {
+ if (ret != 8) {
printf("Error parsing parameter %d\n", ret+1);
return -CMDERR_BADPAR;
}
if (slot > 2047)
return badpar("Invalid slot number\n");
tmp_buffer.slotId = slot;
+ if (slot > 2047)
+ return badpar("Invalid mask\n");
+ tmp_buffer.fidMask = mask;
if (strcmp(channel, "A") == 0) tmp_buffer.channel = FR_CHANNEL_A;
else if (strcmp(channel, "B") == 0) tmp_buffer.channel = FR_CHANNEL_B;
else if (strcmp(channel, "AB") == 0) tmp_buffer.channel = FR_CHANNEL_AB;
for (i = 0; i < user_fifo_buffer_depth; i++) {
fifo_buffer_ptr[i].slotId = tmp_buffer.slotId;
+ fifo_buffer_ptr[i].fidMask = tmp_buffer.fidMask;
fifo_buffer_ptr[i].maxPayload = tmp_buffer.maxPayload;
fifo_buffer_ptr[i].channel= tmp_buffer.channel;
fifo_buffer_ptr[i].cycleCounterFiltering = tmp_buffer.cycleCounterFiltering;
fifo_buffer_ptr[i].msgBufferInterrupt = 0;
}
- printf("frbtcfgfifo slot%i depth%i %2s cyc%i max%i %10s %10s\n",
+ printf("frbtcfgfifo rejslot%i slotmask%i depth%i %2s cyc%i max%i %10s %10s\n",
slot,
+ mask,
depth,
channel,
cycleset,
"frbtcfgfifo*","Configure a RX FIFO message buffer in the user configuration",
"=== Command syntax ===\n"
"\n"
- " frbtcfgfifo slot<SLOT> depth<DEPTH> <CHN> cyc<CYC> max<MAX> <REJNULL> <REJSTAT> int<INT>\n"
+ " frbtcfgfifo rejslot<SLOT> slotmask<MASK> depth<DEPTH> <CHN> cyc<CYC> max<MAX> <REJNULL> <REJSTAT>\n"
"where\n"
- "* <SLOT> is the number of the slot,\n"
+ "* <SLOT> is the number of the slot that will be rejected. If it is 0, no slot will be rejected,\n"
+ "* <MASK> is a number specifying which bits of the <SLOT> will be ignored,"
"* <DEPTH> is a number specifying the depth of the FIFO,\n"
"* <CHN> is one of 'A', 'B' or 'AB' and identifies the used channel,\n"
"* <CYC> is the cycle set when to send the buffer,\n"
"* <MAX> is the number determining the maximum payload (in hald-words),\n"
"* <REJNULL> is a string \"rejnull\" for rejecting NULL frames or \"accnull\" for accepting NULL frames,\n"
"* <REJSTAT> is a string \"rejstat\" for rejecting frames in static segment or \"accstat\" for accepting frames from static segment,\n"
- "* <INT> is 0 or 1 and is currently ignored.\n"
"\n"
"=== Description ===\n"
"\n"
"in user configuration. The parameters set by this command are\n"
"applied by the frbtinitU command. Once frbtinit is called, it is no\n"
"longer possible to change the parameters.\n"
+ "Those messages, which are not accepted by any other buffer and pass the\n"
+ "FIFO rejection filter will be stored in the RX FIFO buffer.\n"
"\n"
"=== Example ===\n"
"\n"
- " --> frbtcfgfifo slot0 depth5 AB cyc0 max20 rejnull accstat int1\n"
- " frbtcfgfifo slot0 depth5 AB cyc0 max20 rejnull accstat int1\n",
+ " --> frbtcfgfifo rejslot6 slotmask6 depth5 AB cyc0 max0x20 rejnull accstat\n"
+ " frbtcfgfifo rejslot6 slotmask6 depth5 AB cyc0 max0x20 rejnull accstat\n",
CMD_HANDLER(cmd_do_fr_config_fifo), (void *)&cmd_list_fr_basic_test
};