Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚLINUXµÄ I2C,¸ßÊÖËٶȽø£¡

ÎÊÌâÒÀ¾É¡£¡£ÒÔΪ×Ô¼º½â¾öÁË
Ϊʲôioctl(fd,I2C_SLAVE,0x50) ÕýÈ·£¬Õâ¸öÊÇEEPROM
¶øioctl(fd,I2C_SLAVE,0xea) ÔòÌáʾINVALID ARGUMENT£¿ Õâ¸öÊÇI/OÀ©Õ¹Æ÷¼þ
¿ÉÒԿ϶¨µÄÊÇ£¬Ó²¼þûÎÊÌâµÄ£¬ÒòΪ±ðµÄCPU²»ÓÃlinux¿ÉÒÔ¿ØÖÆÕâÁ½¸öÆ÷¼þ
¹À¼ÆÊǵØÖ·²»¶Ô£¬ÄãÓ¦¸Ã¸øµÄÊǸß6λµÄµØÖ·£¬È»ºó¼Ó¶Áд룬
±ÈÈ磺 0x50Æäʵ¶ÔÓ¦µÄÊÇ0xA0£¬
¹À¼ÆÄãÓ¦¸ÃËÍ0x75(0xEA>>1);

ÄÚºËÀï¹ØÓÚI2CµÄioctlÓÐÕâôһ¶Î£º
switch(cmd){
case I2C_SLAVE:
case I2C_SLAVE_FORCE:
    if((arg>0x3ff)||
    (((client->flags&I2C_M_TEN)==0)&&arg>0x7f)
    return -EINVAL;
.....

ÆäÖÐarg¾ÍÊÇioctl´«µÝµÄÆ÷¼þµØÖ·£¬ÎÒÉèÖÃ0x7f֮ǰ¶¼ÊÇ¿ÉÒԵģ¬µ«ÊÇ0x7fÖ®ºóµÄµØÖ·¶¼»á³öÏÖ-EINVALµÄ´íÎó£¬0x7fÊÇÒ»¸öʲôֵ£¿  ΪʲôÉ趨µÄÊÇÕâ¸öÖµ£¿£¿

ÄǾͶÔÁË£¬ÒòΪÕâÀï¸øµÄÊǸß7룬CPU»á×Ô¶¯ÔÚ×îºóһλ¼ÓÉÏR/W룬Õâ¸öÊǺÍCPU¼Ü¹¹Ïà¹ØµÄ¡£
±ÈÈç˵Èç¹ûÊÇslaveµØÖ·ÊÇ0xA0,ÄÇôÄãÖ»ÐèÒª¸ø0x50£¨0xA0>>1£©,
CPU»òÕß¿ÉÄÜÇý¶¯»á×öÕâÑùµÄ´¦Àí£º (0x50 < < 1) | R/W,Õâ¾ÍÊÇ×îÖյĵØÖ·¡£



ÕâÀﻹÓëÀ©Õ¹µÄʮλµØÖ·ºÍ7λµØÖ·Óйصģ¬7λµØÖ·×î´óÖ»Äܵ½0x7f¡£Â¥Ö÷ÕâÀïÓ¦¸ÃÊÇ7λµØַģʽ¡£

¶÷£¬Â¥ÉϵÄ˵µÄû´í£¬²»¹ýÎÒËÍ0x75µØÖ·£¬¶ÁдµÄʱºò³öÏÖ
at91_i2c: timeout 3

¶øwriteº¯ÊýÈ´·µ»Øsuccess

ÕâÊÇɶԭÒò£¿

ÄÇÄã¾Í¿´¿´´úÂ룬¿´Õâ¸ötimeoutÊÇʲôԭÒòµ¼Öµġ£



¿´ÁËÏ£¬TIMEOUTÊÇÓÉÓÚ´ÓÆ÷¼þûÓÐÓ¦´ð£¬ÓÃʾ²¨Æ÷¿´ÁËÏ£¬È·ÊµÊÇÕâÑù¡£


Ïà¹ØÎÊ´ð£º

PHPÀ©Õ¹CʱµÄÎÊÌâ

ÎÒÓÃPHPÀ©Õ¹Cʱ£¬ÓõÄÊÇÔ´ÂëextĿ¼ÏµÄ./ext_skel
×îºó±àÒë×ÜÊDz»ÄÜÉú³ÉÀ©Õ¹Ä£¿éµÄ.so¶¯Ì¬¿â£¬ÎÒÓõİ汾ÊÇ5.3.0£¬
ÕâÊÇÔõô»ØÊ£¬¸ßÊÖ½â´ðÏÂ

²»ÄÜÉú³ÉʱÓÐɶÌáʾÐÅÏ¢£¿

ÔËÐÐÁË/ext_skel --extname=Ä ......

cÖеÄתÒå×Ö·ûÎÊÌâ

    '\108'×÷Ϊ×Ö·û³£Á¿¶Ô²»¶Ô£¿
תÒå×Ö·û'\ddd'±íʾ3λ8½øÖÆËù´ú±íµÄ×Ö·û¡£ µ«ÊÇ108²»ÊÇÕýÈ·µÄ8½øÖƱíʾ·½·¨£¬Òò´ËÓ¦¸ÃÊÇ´íÎóµÄ¡£
µ«ÊÇchar a='\108'; Ϊʲô±àÒë²»³ö´íÄØ£¿
\108 û³¬¹ý ......

C#µ÷Óà C DLLÎÊÌ⣬¶®µÄÀ´ÇÀ·ÖÁË

//C ½Ó¿Ú
extern "C"
{
  TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);  
}
//ÎÒÔÚC#ÖÐÉùÃ÷
//µ÷ÓÃC DLL Öеĺ¯Êý
[DllImport("OCRapi.dll&quo ......

Çó½âANSI/ISO CÖеÄÒ»¾ä»°

ANSI/ISO C ±ê×¼ÕâÑùÃèÊö:

ÔÚÉÏÒ»¸öºÍÏÂÒ»¸öÐòÁеãÖ®¼ä, Ò»¸ö¶ÔÏóËù±£´æµÄÖµÖÁ¶àÖ»Äܱ»±í

´ïʽµÄ¼ÆËãÐÞ¸ÄÒ»´Î¡£¶øÇÒÇ°Ò»¸öÖµÖ»ÄÜÓÃÓÚ¾ö¶¨½«Òª±£´æµÄÖµ¡£

ʵÔÚ²»Àí½âÕâ¾ä»°£¬Çë´ó¼ÒÒ»Æð˵˵£¿£¿ ......

c,c++Á¬½Ómysql ÕÒ²»µ½Í·²¿Îļþ£¨ÐÂÊÖ£©

±àÒëÆ÷£ºC-Free4
mysql µ¥¶À°²×°µÄ£¬ÏÖÔÚΪapache+php+mysql¿ÉÒÔʹÓá£
×î½üÔÚÁ·Ï°c£¬c++£»ÏëÓÃc£¬c++Á¬½ÓÏÂÎÒµÄmysql£¬ºÃ¶àµØ·½¶à˵mysql.hÕÒ²»µ½¡£¶øÇÒÎÒmysqlûÓÐËùνµÄincludeÎļþ¼Ð°¡¡£
Íü¸ßÊÖÖ¸µãÒ»¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ