Root/
| 1 | ubbctl - Control UBB signals |
| 2 | ============================ |
| 3 | |
| 4 | ubbctl queries the state of UBB signals and allows the user to change |
| 5 | them. It can run in parallel with any other UBB users. |
| 6 | |
| 7 | |
| 8 | Querying |
| 9 | -------- |
| 10 | |
| 11 | To query the UBB signals, run |
| 12 | |
| 13 | # ubbctl |
| 14 | |
| 15 | This will display something like this: |
| 16 | |
| 17 | nPWR=1 DAT2=F1 DAT3=F1 CMD=F1 CLK=Z1 DAT0=1 DAT1=0 |
| 18 | |
| 19 | "0" means that the pin is driven low. "1" means that is it driven |
| 20 | high. If the pin reads back as something different than what it is |
| 21 | set to, this is indicated as "0!1" (pin is shorted to VDD) or "1!0" |
| 22 | (pin is shorted to ground). |
| 23 | |
| 24 | "Z0" and "Z1" means that the pin is an input without internal |
| 25 | pull-up (note however that all pins but nPWR and CLK) have external |
| 26 | 10 kOhm pull-ups) and that it reads back a low or high, |
| 27 | respectively. |
| 28 | |
| 29 | "R0" and "R1" are like "Z0" and "Z1", except that the internal |
| 30 | pull-up is enabled. |
| 31 | |
| 32 | "F0" and "F1" indicate that the pin configured as a function (i.e., |
| 33 | for the MMC controller) and does not operate as GPIO. If the second |
| 34 | function of the pin is selected, "Fb..." is shown instead of "F...". |
| 35 | |
| 36 | "I..." indicates that the pin is configured as an interrupt. The |
| 37 | next letter defines the type of interrupt, "r" for rising edge, |
| 38 | "f" for falling edge, "h" for high level, and "l" for low level. If |
| 39 | the pull-up is enabled, ubbctl adds an "R". Finally, it shows the |
| 40 | pin status. E.g., "IfR1" would be an interrupt triggering on the |
| 41 | falling edge, with pull-up enabled, and currently inactive. |
| 42 | |
| 43 | ubbctl can run in continuous mode, in which it updates the status |
| 44 | regularly (currently every 200 ms): |
| 45 | |
| 46 | # ubbctl -c |
| 47 | |
| 48 | To exit continuous mode kill the process, e.g., which Ctrl-C. |
| 49 | |
| 50 | |
| 51 | Setting |
| 52 | ------- |
| 53 | |
| 54 | ubbctl can change the configuration of the UBB pins. The syntax is |
| 55 | the same as the one used for the status display except that there |
| 56 | are no readback values. E.g., nPWR=1 would disable power, CLK=R |
| 57 | would configure CLK as input with pull-up, etc. |
| 58 | |
| 59 | A pin can be changed several times. For example, if the idle state |
| 60 | of DAT0 is 0 |
| 61 | |
| 62 | # ubbctl dat0=0 |
| 63 | |
| 64 | then |
| 65 | |
| 66 | # ubbctl dat0=1 dat0=0 |
| 67 | |
| 68 | would send a short positive pulse. |
| 69 | |
| 70 | ubbctl also recognizes the keywords ON and OFF to control power to |
| 71 | the 8:10 interface. They're synonymous to nPWR=0 and nPWR=1, |
| 72 | respectively. |
| 73 |
Branches:
master
