- long len = 0;
- int t = 0;
- u32 bit = 0;
- u32 reg = 0;
-
- len = sprintf (buf, "\nDanube Port Settings\n");
-
- len = len + sprintf (buf + len,
- " 3 2 1 0\n");
- len = len + sprintf (buf + len,
- " 10987654321098765432109876543210\n");
- len = len + sprintf (buf + len,
- "----------------------------------------\n");
-
- len = len + sprintf (buf + len, "\nP0-OUT: ");
- PORT_READ_REG (DANUBE_GPIO_P0_OUT, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP1-OUT: ");
- PORT_READ_REG (DANUBE_GPIO_P1_OUT, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP0-IN: ");
- PORT_READ_REG (DANUBE_GPIO_P0_IN, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP1-IN: ");
- PORT_READ_REG (DANUBE_GPIO_P1_IN, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP0-DIR: ");
- PORT_READ_REG (DANUBE_GPIO_P0_DIR, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP1-DIR: ");
- PORT_READ_REG (DANUBE_GPIO_P1_DIR, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP0-STO: ");
- PORT_READ_REG (DANUBE_GPIO_P0_STOFF, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP1-STO: ");
- PORT_READ_REG (DANUBE_GPIO_P1_STOFF, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP0-PUDE:");
- PORT_READ_REG (DANUBE_GPIO_P0_PUDEN, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP1-PUDE:");
- PORT_READ_REG (DANUBE_GPIO_P1_PUDEN, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP0-OD: ");
- PORT_READ_REG (DANUBE_GPIO_P0_OD, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }
-
- len = len + sprintf (buf + len, "\nP1-OD: ");
- PORT_READ_REG (DANUBE_GPIO_P1_OD, reg);
- bit = 0x80000000;
- for (t = 0; t < 32; t++) {
- if ((reg & bit) > 0)
- len = len + sprintf (buf + len, "X");
- else
- len = len + sprintf (buf + len, " ");
- bit = bit >> 1;
- }