- 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;
- }
-
- len = len + sprintf (buf + len, "\nP0-PUDS:");
- PORT_READ_REG (DANUBE_GPIO_P0_PUDSEL, 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-PUDS:");
- PORT_READ_REG (DANUBE_GPIO_P1_PUDSEL, 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_ALT0:");
- PORT_READ_REG (DANUBE_GPIO_P0_ALTSEL0, 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_ALT1:");
- PORT_READ_REG (DANUBE_GPIO_P0_ALTSEL1, 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_ALT0:");
- PORT_READ_REG (DANUBE_GPIO_P1_ALTSEL0, 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_ALT1:");
- PORT_READ_REG (DANUBE_GPIO_P1_ALTSEL1, 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;
- }