Skip to content

Instantly share code, notes, and snippets.

@NanMetal
Last active June 12, 2021 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NanMetal/9d0f5441a32c0645f67eb08d1f11a6c6 to your computer and use it in GitHub Desktop.
Save NanMetal/9d0f5441a32c0645f67eb08d1f11a6c6 to your computer and use it in GitHub Desktop.
autoexec.ash gpio leds commands SJCAM SJ8 PRO

Autoexec.ash GPIO ids

SJ8 PRO has 4 blue LEDs on the record button and 2 red LEDs on the power button.

GPIO

GPIO Function States Description
25 OUT ON/OFF Front orange LED
26 OUT ON/OFF Front blue LED
56 OUT ON/OFF Top button blue LED #1
61 OUT ON/OFF Top button blue LED #2
63 OUT ON/OFF Top button blue LED #3
64 OUT ON/OFF Top button blue LED #4
65 OUT ON/OFF Side button red LED #1
70 OUT ON/OFF Side button red LED #2

Autoexec.ash example:

t drv gpio 56 out 0
t drv gpio 61 out 0
t drv gpio 63 out 0
t drv gpio 64 out 0

Command

This is the output of the t drv gio command:

Usage: gpio [show|<pin_id>] [option]
       gpio show [all|<pin>] - show the GPIO pin status
       gpio <pin> in - set input mode
       gpio <pin> out [0|1] - output mode with logic low/high
       gpio <pin> alt <func> - alternate pin function
       gpio <pin> pull [up|down|none] - internal resistor control
       gpio <pin> drive [2mA|4mA|8mA|12mA] - set drive strength
       gpio <pin> int [0|1] - set interrupt disable/enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment