ÎÊÌâÒÀ¾É¡£¡£ÒÔΪ×Ô¼º½â¾öÁË
Ϊʲô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ÊÇÓÉÓÚ´ÓÆ÷¼þûÓÐÓ¦´ð£¬ÓÃʾ²¨Æ÷¿´ÁËÏ£¬È·ÊµÊÇÕâÑù¡£
Ïà¹ØÎÊ´ð£º
×î½üͻȻÏë×Ô¼ºÀ´ÊµÏÖÒ»¸öÎå×ÓÆå³ÌÐò,µ«²»ÖªµÀÔõô¿ªÊ¼,×Ô¼ºÒ²Ã»Ñ§»Í¼Ðκ¯Êý,ÄÜÔÚ¿ØÖÆ̨ÏÂÖ±½ÓдÂð>>>?????
¿ØÖÆ̨£¿±ÈͼÐνçÃæ¸üÂé·³¡£
http://search.download.csdn.net/search/%E4%BA%94%E5%AD%90% ......
´ó¼ÒºÃ£¡ÎÒÊÇһλC°®ºÃÕߣ¬Ïò´ó¼ÒÇë½ÌÏ£¬C³ÌÐòÔ±¿ÉºÃÕÒ¹¤×÷£¿¹«Ë¾ÓÃC¸ÉЩʲô£¿
ÎÞËùνºÃ²»ºÃÕÒ¹¤×÷£¬Ò»°ãͨÐÅ¡¢ÏµÍ³¡¢Ç¶Èëʽ¡¢Ó²¼þ·½ÃæÓõĶ࣬¶øÇÒÓÉÓÚCµÄµ×²ãÌØÐÔ£¬Ñ§»áºóÔÚѧÆäËûµÄ»á±È½ÏÈÝÒ×
²»¹ÜÓÃʲôÓï ......
//C ½Ó¿Ú
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//ÎÒÔÚC#ÖÐÉùÃ÷
//µ÷ÓÃC DLL Öеĺ¯Êý
[DllImport("OCRapi.dll&quo ......
ÎÊÌâ:¹¤µØÉÏÐèÒª³¤¶ÈΪA1µÄ¸Ö½îX¸ù,³¤¶ÈΪA2µÄ¸Ö½îY¸ù,³¤¶ÈΪA3µÄ¸Ö½îZ¸ù......ÒÔ´ÎÀàÍÆ.
ÆäÖÐA1,A2,A3,...³¤¶ÈÈÎÒâÖ¸¶¨,X,Y,Z,...ÊýÁ¿Ò²ÈÎÒâÖ¸¶¨.
µ«²Ö¿âÖеĸֽîΪ±ê×¼³¤¶È,Ö»ÓÐ9Ã׺Í15Ã×Á½ÖÖ³¤¶È,ÊýÁ¿² ......
×î½üÔÚ¿´Ò»¸öÓÃbisonʵÏÖµÄC parser,OSÊÇopensolaris¡£µ±ÓÃËüÀ´½âÎöÒ»¸ö¼òµ¥µÄhello.cʱ£¬³öÏÖ¡°/usr/include/sys/va_list.h: parse error before __gnuc_va_list¡±¡£´ò¿ªÎļþva_list.hºó·¢ÏÖÕâÑùÒ»ÐС°typedef __bu ......