Here's a bit of beta code. I included it here for other readers than are
not using RPi3. This is only for the power and activity leds.

You will need to grab the couple of off lines of code.


Code:
--------------------
    
#========================================================================================
  # LEDS
  #  - ACT LED = /sys/class/leds/led0
  #  - PWR LED = /sys/class/leds/led1
  
#----------------------------------------------------------------------------------------
  pcp_rpi_leds() {
        local OPTION="$1"
  
        case "$OPTION" in
                on|ON)
                        pcp_rpi_leds_on
                ;;
                off|OFF)
                        pcp_rpi_leds_off
                ;;
                *)
                        echo "Invalid option: $OPTION"
                ;;
        esac
  }
  
  pcp_rpi_leds_on() {
        pcp_rpi_details
        case "$TYPE" in
                0)
                        echo 1 | sudo tee /sys/class/leds/led0/brightness
                ;;
                1)
                        echo "Not supported on RPi1"
                ;;
                *)
                        echo 1 | sudo tee /sys/class/leds/led0/brightness
                        echo 1 | sudo tee /sys/class/leds/led1/brightness
                ;;
        esac
  }
  
  pcp_rpi_leds_off() {
        pcp_rpi_details
        case "$TYPE" in
                0)
                        echo 0 | sudo tee /sys/class/leds/led0/brightness
                ;;
                1)
                        echo "Not supported on RPi1"
                ;;
                *)
                        echo 0 | sudo tee /sys/class/leds/led0/brightness
                        echo 0 | sudo tee /sys/class/leds/led1/brightness
                ;;
        esac
  }
--------------------


Off code:


Code:
--------------------
                        echo 0 | sudo tee /sys/class/leds/led0/brightness
                        echo 0 | sudo tee /sys/class/leds/led1/brightness
--------------------


Looks like the HiFiBerry AMP audio driver doesn't have params for the
leds. 


Code:
--------------------
    Name:   hifiberry-amp
  Info:   Configures the HifiBerry Amp and Amp+ audio cards
  Load:   dtoverlay=hifiberry-amp
  Params: <None>
  
--------------------


There is an HiFiBerry AMP100 driver that does have param for the leds
but I don't know it that driver works for the AMP2?


------------------------------------------------------------------------
Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403
View this thread: http://forums.slimdevices.com/showthread.php?t=114449

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to