hello my new friends! I'm new to the world of the embedded programming . but I'm an expert Qt developer for desktop applications. Now i have bought a mini2440 friendly arm board since last week and i ran my hello world program with my board wow :) . but i don't have any idea how to communicate with outputs or inputs .for example how can i send my outputs to the LEDs? or buzzer or or serial port or how can i get the inputs from buttons ? thanks for your helps My English writing skill is horrible :) isn't it?
LEDs , buttons, IOs, help me
i've found this code for leds but it is for TQ2440. can some body help me?
void beep::beep_init()
{
int temp = beep_slider->value( );
//把滑块(微调&#
24320;关)的值赋给
temp 变量
fd = open("/dev/EmbedSky-Beep", O_RDWR); //打开设备
if (fd < 0)
{
perror("open device EmbedSky-BEEP");
close();
}
printf("times = %d \n",temp);
ioctl(fd, temp, 4);
//因为有初始值&#
65292;所以初始化完&a
mp;#27605;蜂鸣器就按ୗ
1;初值鸣叫
//
qWarning( "beep::beep_init(): Not implemented yet!" );
}
void beep::beep_set()
{
int temp = beep_slider->value( );
printf("times = %d \n",temp);
ioctl(fd, temp, 4);
//
qWarning( "beep::beep_set(): Not implemented yet!" );
}
GPIO: "/sys/class/gpio/gpio<number>/value" LED: "/sys/class/leds/<led name>/brightness" Buttons: "/dev/input/event0" Buzzer: Like GPIO
thanks a lot for your reply but what are these ? :) can u give a reference? for other concepts too ! thanks a lot again
GPIO: Read kernel's Documentation/gpio.txt Buttons: Read kernel's Documentation/input/input.txt LED: Read kernel's Documentation/leds/leds-class.txt


