====== OpenWRT und Anpassungen ====== ===== I2C Bus ===== ^ RJ11-Pin ^ Molex Pin ^ Funktion ^ Farbe ^ | 1 | - | - | | 2 | 4 |+5V | Rot | | 3 | 3 | SDA | Violett | | 4 | 2 | SCL | Blau | | 5 | 1 | Ground | Schwarz | | 6 | - | - | ==== Modul starten ==== | | [[tl-mr3020|MR3020]] | [[tl-wr1043nd|TL-1043ND]] | [[tl-wdr4300|WDR4300]] | | SDA | 7 | 0 | 11 | | SCL | 29 | 20 | 12 | # rmmod leds_gpio # LED-Modul entfernen falls dieses mit I2C-GPIOs kollidiert # insmod i2c-gpio-custom bus0=0,11,12 # I2C Bus starten # insmod i2c-dev # I2C-Device Interface laden ===== Quilt ===== Mit Quilt können Patches eingespielt werden. joky@fileserver:~$ cd ~/openwrt/trunk/attitude_adjustment/target/linux/ar71xx/files/arch/mips/ath79 joky@fileserver:~/openwrt/trunk/attitude_adjustment/target/linux/ar71xx/files/arch/mips/ath79$ quilt diff --- a/mach-tl-mr3020.c +++ b/mach-tl-mr3020.c @@ -30,6 +30,8 @@ #define TL_MR3020_GPIO_BTN_WPS 11 #define TL_MR3020_GPIO_BTN_SW1 18 #define TL_MR3020_GPIO_BTN_SW2 20 +#define TL_MR3020_GPIO_BTN_3 7 +#define TL_MR3020_GPIO_BTN_4 29 #define TL_MR3020_GPIO_USB_POWER 8 @@ -92,6 +94,22 @@ static struct gpio_keys_button tl_mr3020 .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL, .gpio = TL_MR3020_GPIO_BTN_SW2, .active_low = 0, + }, + { + .desc = "sw3", + .type = EV_KEY, + .code = BTN_2, + .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL, + .gpio = TL_MR3020_GPIO_BTN_3, + .active_low = 0, + }, + { + .desc = "sw4", + .type = EV_KEY, + .code = BTN_3, + .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL, + .gpio = TL_MR3020_GPIO_BTN_4, + .active_low = 0, } }; joky@fileserver:~/openwrt/trunk/attitude_adjustment/target/linux/ar71xx/files/arch/mips/ath79$ quilt edit mach-tl-mr3020.c joky@fileserver:~/openwrt/trunk/attitude_adjustment/target/linux/ar71xx/files/arch/mips/ath79$ quilt refresh joky@fileserver:~/openwrt/trunk/attitude_adjustment/target/linux/ar71xx/files/arch/mips/ath79$ cd ../../../../../../../ joky@fileserver:~/openwrt/trunk/attitude_adjustment$ make