Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPIO on SUNXI H3



On Sat, 8 Jul 2017, wilde%sha-bang.de@localhost wrote:

(and yes, the actual behavior of the leds is the same: the red one glows
after setting it to on, the green one doesn't)

So I've got a board here that uses the same GPIOs for LEDs -- PA15 and PL10. I commited a few things last night:

 - There was a bug in sunxi_gpio that meant you could never set an output
   pin's state to 0. This is now fixed.
 - I added a simple LED framework, so GPIO LEDs from your board show up in
   sysctl.

Can you update your kernel and do 'sysctl hw.led' to see if you have the controls, and then see if changing the states of those sysctl knobs works?

  sunxi# sysctl hw.led
  hw.led.orangepi_green_pwr = 1
  hw.led.orangepi_red_status = 0
  sunxi# sysctl -w hw.led.orangepi_red_status=1
  hw.led.orangepi_red_status: 0 -> 1
  sunxi# sysctl hw.led
  hw.led.orangepi_green_pwr = 1
  hw.led.orangepi_red_status = 1

Cheers,
Jared


Home | Main Index | Thread Index | Old Index