Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:guide-developer:add.new.device [2020/07/20 01:16] – [Adding new device support] adrianschmutzler | docs:guide-developer:add.new.device [2022/03/23 12:00] (current) – adding filename for scripts, so that when users post their result they will be able to refer a specific output associated with which script aterik | ||
|---|---|---|---|
| Line 44: | Line 44: | ||
| To speed up testing all GPIOs one by one you can use following bash script. Please note you have to follow LEDs state and console output. If the USB LED turns on and the last console message is '' | To speed up testing all GPIOs one by one you can use following bash script. Please note you have to follow LEDs state and console output. If the USB LED turns on and the last console message is '' | ||
| - | <code># | + | <file bash gpio-test.sh># |
| GPIOCHIP=0 | GPIOCHIP=0 | ||
| BASE=$(cat / | BASE=$(cat / | ||
| Line 66: | Line 66: | ||
| } | } | ||
| gpio=$((gpio+1)) | gpio=$((gpio+1)) | ||
| - | done</code> | + | done |
| + | </file> | ||
| + | * Save the above content as a file '' | ||
| + | * to make it executable, run: '' | ||
| ==== GPIO buttons ==== | ==== GPIO buttons ==== | ||
| Line 78: | Line 81: | ||
| For dumping GPIO values following script can be used: | For dumping GPIO values following script can be used: | ||
| - | <code># | + | <file bash gpio-dump.sh># |
| GPIOCHIP=0 | GPIOCHIP=0 | ||
| BASE=$(cat / | BASE=$(cat / | ||
| Line 92: | Line 95: | ||
| } | } | ||
| gpio=$((gpio+1)) | gpio=$((gpio+1)) | ||
| - | done</code> | + | done |
| + | </file> | ||
| + | * Save the above content as a file '' | ||
| + | * to make it executable, run: '' | ||
| If GPIO value changes from 1 to 0 while pressing the button, it's active low. Otherwise it's active high. | If GPIO value changes from 1 to 0 while pressing the button, it's active low. Otherwise it's active high. | ||
| Line 120: | Line 126: | ||
| For creating the OpenWrt firmware your [[docs: | For creating the OpenWrt firmware your [[docs: | ||
| - | - Obtain the [[docs: | + | - Obtain the [[docs: |
| - During **menuconfig** select the correct target system. | - During **menuconfig** select the correct target system. | ||
| - Next generate the board_bcm963xx.c file for the selected platform with all board parameters execute the following command: \\ < | - Next generate the board_bcm963xx.c file for the selected platform with all board parameters execute the following command: \\ < | ||
| Line 151: | Line 157: | ||
| & | & | ||
| </ | </ | ||
| - | - Finish the [[docs: | + | - Finish the [[docs: |
| ==== Ramips Platform ==== | ==== Ramips Platform ==== | ||