Estoy aprendiendo a usar la iMX53 QSB con s.o ubuntu, que viene con el kit.
Quisiera conseguir algun ejemplo, sencillo de como usar los interruptores de usuario 1 y 2, para manipular el encendido del LED para usuario (D16), para hacer un ejemplo de como programarlos.
Saludos
Hi Victor
please start with link below
In file mx53_loco.c file the GPIO2_14 and GPIO2_15 are
configured and registered under gpio-keys. If you want to control
this GPIO using SYS interface you need to comment out the next lines
static struct gpio_keys_button loco_buttons[] = {
GPIO_BUTTON(MX53_nONKEY, KEY_POWER, 1, "power", 0),
/* GPIO_BUTTON(USER_UI1, KEY_VOLUMEUP, 1, "volume-up", 0),
GPIO_BUTTON(USER_UI2, KEY_VOLUMEDOWN, 1, "volume-down", 0), */
};
Moreover, be sure that you have selected
--Device Drivers
---GPIO Support
-- /sys/class/gpio (sysfs interface)
Recompile your kernel and replace it by the current one and you would
control these GPIO as the LED on the QSB.
Using KEY_ROW4 GPIO4[15] : 32*3 +15=111
echo 111 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio111/direction
value=/sys/class/gpio/gpio111/value
echo 1 > $value;
echo 0 > $value ;
Best regards
chip
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
"In theory there is no difference between theory and practice, but in practice there is." [Murphy's laws]
Por ser principiante en el uso del iMX53 QSB tengo preguntas muy básicas, a la respuesta dada.
1.- Donde se encuentran los archivos In file mx53_loco.c file?
2.- Lo referente a "Moreover, be sure that you have selected" en que parte lo tengo que seleccionar?.
3.- "Recompile your kernel and replace it by the current one" Como se debe realizar, con que instrucción y si esta es ejecutada desde la terminal de Ubuntu, ?
4.- Using KEY_ROW4 GPIO4[15] : 32*3 +15=111 a que se refiere?
Sorry, Victor
seems you chose incorrect
selection in your google translator.
Please select "english" tab. :smileyhappy:
Best regards
chip
Due to I'm begginer in imx53 i have some basic question.
1.- Where can I found files mx53_loco.c file?
2.- About "Moreover, be sure that you have selected" in which part I have to select this?.
3.- "Recompile your kernel and replace it by the current one" As you must realize, that if this instruction is executed from the terminal of Ubuntu?
4.- Using KEY_ROW4 GPIO4[15] : 32*3 +15=111 referred to this instruction? Where can i to do this?
Best Regards
Hi Victor
I would suggest to start with 1) [Where can I found files mx53_loco.c file]
and build ltib.
L2.6.35_11_09_ER_SOURCE : Linux 2.6.35 Source Code Files and documentation
11.09. Supports MCIMX53-START and MCIMX53-START-R.
http://cache.freescale.com/files/dsp/doc/app_note/AN3875.pdf
Building a Linux Image and Downloading onto i.MX Processors Using a Virtual ... (REV 1)
Please read documentation and try to build ltib, in sources you will find
mx53_loco.c file. AN3875 explains how to use ltib.
Best regards
chip