27 const char cmd_ipmux_help[] =
"IPMux Info - type 'ipmux help' for more info";
30 puts(
" [q] - to quit [h] - show help [r] - Reset to defaults");
31 puts(
" -1 -16 / +1 +16 (use [shift] to step by 16)");
32 puts(
" [z] [Z] [x] [X] - Division ratio");
33 puts(
" [c] [C] [v] [V] - Number words");
34 puts(
" [b] [B] [n] [N] - Number packets\n");
38 printf(
"div-ratio: %dns, num word: %d, num packets %d\n",
44 #define DECR(REG, VALUE) \
45 if (REG >= VALUE) REG -= VALUE; \
48 #define INCR(REG, VALUE) \
49 if (REG <= (0xFFFFFFFF - VALUE)) REG += VALUE; \
78 case 'z': DECR(
IPMPKGEN->DIV_RATIO, 1);
79 case 'Z': DECR(
IPMPKGEN->DIV_RATIO, 16);
80 case 'x': INCR(
IPMPKGEN->DIV_RATIO, 1);
81 case 'X': INCR(
IPMPKGEN->DIV_RATIO, 16);
82 case 'c': DECR(
IPMPKGEN->NUM_WORDS, 1);
83 case 'C': DECR(
IPMPKGEN->NUM_WORDS, 16);
84 case 'v': INCR(
IPMPKGEN->NUM_WORDS, 1);
85 case 'V': INCR(
IPMPKGEN->NUM_WORDS, 16);
86 case 'b': DECR(
IPMPKGEN->NUM_PACKETS, 1);
87 case 'B': DECR(
IPMPKGEN->NUM_PACKETS, 16);
88 case 'n': INCR(
IPMPKGEN->NUM_PACKETS, 1);
89 case 'N': INCR(
IPMPKGEN->NUM_PACKETS, 16);
100 bool cmd_ipmux_exec(
int argc,
const char *args[])
103 if (strcmp(args[0],
"help") == 0) {
104 puts(
"ipmux [option]");
106 puts(
" dump - IPMUX dump registers");
107 puts(
" pkgen - Enter packet gen mode");
108 }
else if (strcmp(args[0],
"dump") == 0) {
110 }
else if (strcmp(args[0],
"pkgen") == 0) {
Low level routines for LM32, including interrupt handling.
Simple task scheduler for tasks.
#define IPMPKGEN
IPMux Control.
void ipMuxDumpRegs()
Debug function to see whats inside.
Manages the global system error.
This file assigns all device structures to memory mapped structures.