The following diagram shows the pinout for the 40 pin connector. I count 28 GPIO pins if special functions are not selected. Table 3-2 on pages 74 to 77 of the H3 datasheet show the pin multiplexor business. It seems to go like this:
0 - GPIO input (the default) 1 - GPIO output 2 - special function as shown below 3 - alternate special function 6 - external interrupt 7 - disable
If you get tired of counting pin numbers on the above nice diagram, the following will help avoid silly mistakes:
Amazingly, the data sheet states (or seems to) that IO pins can source or sink up to 40 mA. See page 607 of the datasheet, table 9-1.
It won't be immediately disastrous or hopeless. I won't say more. There would certainly be significant driver issues. Procede with caution and dig deep before trying anything along these lines.
The following diagram is for the IO connector on a "Orange Pi 2 (mini)" taken from the above article.
The following diagram is for the 40 pin connector on a Raspberry Pi. Note that older Raspi's used a 26 pin connector.
Tom's electronics pages / email@example.com