View Full Version : درایور نویسی در لینوکس
mehranFX
یک شنبه 25 دی 1384, 14:20 عصر
آیا کسی SDK یا API -ی شبیه DDK در لینوکس سراغ داره ؟!!! ممنون
Inprise
یک شنبه 25 دی 1384, 14:40 عصر
برای توسعه Kernel Module روی لینوکس باید سورس کرنل رو نصب کنی ، تنها چیز دیگری که بهش احتیاج داری ، هیچ چیزه .
mehranFX
یک شنبه 25 دی 1384, 20:12 عصر
جناب اینپرایز لطفا بیشتر توضیح بدید ممنون می شم !!!
shaniaki
یک شنبه 02 بهمن 1384, 02:10 صبح
با عرض ادب:
اسمش تو لینوکس device driver هست. اگر کارت با نوشتن ساده تو پورت های سریال و موازی راه می افته تنها چیزی که لازم داری چند تا دستور سی هست. داریم:
http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html
اگر کار پدر و مادر دار می خواهی انجام بدی نیاز به کمی دانش در خصوص سورس لینوکس، نحوه کامپایلش، ساختمان داده های مربوطه و همچنین انواع درایورها تو لینوکس هست. کتاب هایی مثل undrestanding linux kernel اینجا مفیدند. سرچ در گوگل و howto ها فراموش نشود.
تو آدرس زیر یه برنامه ای معرفی شده که با نصب و اجراش اول دستگاهت رو شناسایی می کنی و بعد بهت سورس قابل کامپایل می ده:
http://www.jungo.com/linux.html
لعلکم تفلحون...
یه ... ...
sajjadG
سه شنبه 03 شهریور 1388, 10:35 صبح
با سلام
من تو برنامه نویسی دراور usb-hid تحت لینوکس با مشکل مواجه شدم .
توضیح :
من ۲ راه اسه این کار پیدا کردم
۱ - استفاده از کتابخانه های خود لینوکس مثل input.h و hiddev.h
۲- استفاده از کتابخونه ی opensource به نام libhid
تو راه اول مشکلم اینه که از تابع open() استفاده میکنم و آدرس "/dev/input/eventX" یا "/dev/usb/hiddevX" رو بهش میدم
سپس از تابع ioctl() برای گرفتن اطلاعات مربوط به vendr ID و غیره استفاده میکنم ولی جوابی که می گیرم اشتباس
کجای کارم اشتباس
تو راه دوم مشکلم اینه که نمیدونم چطور میشه libhid رو به eclipse یا netbeans اضافه کرد. و باهاشون کد زد.
کسی می تونه کمکم کنه یا کسی رو سراغ دارین که بتونه؟
متشکر و ممنون میشم اگه کمکم کنید.
مرسی.
sajjadG
یک شنبه 08 شهریور 1388, 11:41 صبح
سلام
من فهمیدم چطوری میشه libhid رو به eclipse و netbeans اضافه کرد.
روشو پایین نوشتم:
-------------- notes on compiling libhid --------------------
>>to compile your code with GCC in terminal you should define libhid for GCC by adding "-lhid" to your command :
gcc test_libhid.c -lhid
netbeans users:::
>> if your using netbeans and you want to use libhid with it you should add "-lhid" to gcc linker in order to gcc could use libhid when its compiling your code
follow the steps:
1)on the project Explorer panel , R-click on your project select propertise (last option)
2)expand "build" and select linker
3)in command line->additional Options (last item) enter "-lhid"
eclipse users:::
>>if your using eclipse and you want to use libhid with it you should add "-lhid" to gcc linker in order to gcc could use libhid when its compiling your code
follow the steps:
1)on the project Explorer panel , R-click on your project select propertise (last option)
or select your project and press Alt+Enter
2)in the left panel expand "c/c++ build" and select "setting"
3)in the right side select "tool setting" tab
4)you should see GCC C compiler and GCC C linker and GCC assembler in there .
expand GCC C linker and select Libraries
5)after selecting in the right side you should see 2 boxes: Libraries(-l) and Library search path(-L)
int the Libraries(-l) add "hid"
note:netbeans and eclipse use GCC to compile your codes when you do this steps netbeans and eclipse add "-lhid" parameter to gcc to able it recognizing the libhid.
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.