¹ØÓÚ s3c2416 hspi spi linux Çý¶¯
×î½üÔÚ×ösamsung
s3c2416
ÔÚlinuxϵÄspiÇý¶¯³ÌÐò£¬²âÊÔÁËÏÂsamsung·¢²¼µÄspiµÄÄÚºËÔ´´úÂ룬ÎÞÂÛÊDzÉÓÃdma»òÕß·Çdmaģʽ¶¼ÎÞ·¨¹¤×÷¡£ÔĶÁ¸ÃÇý¶¯´úÂ룬·¢ÏÖ
ÕâÂëÓ¦¸ÃÊÇÒ»¸öδÍê³ÉµÄ°æ±¾£¬´æÔںܶàµÄbug¡£ÓÚÊÇÔÚÕâ¸ö°æ±¾µÄ»ù´¡ÉϽøÐÐÐ޸ģ¬ÖØдһ¸ö¿ÉÓõġ¢Ö§³ÖÈ«Ë«¹¤µÄͨѶµÄÇý¶¯¡£Ä¿Ç°²âÊÔ»ù±¾Äܹ»Õý³£¹¤×÷£¬
Ö§³Ö°ëË«¹¤¡¢È«Ë«¹¤¡¢spiÓ²¼þÖжÏģʽºÍdmaģʽ¡£
¶Ôhspi-s3c2443.[ch]Ô´Îļþ¸ù¾ÝÊý¾Ý·¢ËͺͽÓÊÕµÄÁ÷³Ì½øÐзÖÎö£¬ÔÚδ²ÉÓÃdmaģʽÏ£¬º¯Êýµ÷ÓõÄÁ÷³Ì£ºs3c_spi_xfer
-> s3c_spi_doxfer -> s3c_spi_message_start ->
down_interruptible(&spi->sem)£¬µ½ÕâÀӲ¼þ»á²úÉúspiÖжϣ¬½øÈëµ½ÖжϷþÎñ³ÌÐò
s3c_spi_irq ÖУ¬ÖжϺ¯Êýµ÷Óà spi_s3c_irq_nextbyte
½øÐÐÊý¾Ý·¢ËÍ£¬¸ù¾Ýspi->stateµÄÖµ×öÏàÓ¦µÄ²Ù×÷£¬Êý¾Ý·¢ËÍ»ò½ÓÊÕÍê³Éºó£¬µ÷Óà s3c_spi_stop
¹Ø±Õspi£¬²¢up(&spi->sem)£¬³ÌÐòÁ÷³Ì»Øµ½ÁËs3c_spi_doxferº¯ÊýµÄ
down_interruptible(&spi->sem)£¬º¯Êý·µ»ØÍ˳ö£¬Ò»¸öspiµÄÊý¾ÝÊÕ·¢Á÷³ÌÍê³É¡£
ÔÚÕâ¸ö·¢ËͽÓÊÕÁ÷³ÌÖУ¬ÖжϷþÎñ³ÌÐò´æÔںܶ಻×ãµÄµØ·½¡£
ÏÈ¿´spi·¢ËÍ£¬·¢ËÍ×îÖÕµ÷ÓõÄÊÇ£º
while(!(tx_msgend(spi)))
s3c_spi_write_fifo(spi);
ÕâÁ½ÐдúÂëµÄ¹¦ÄÜÊÇÅжÏд»º³åÀïÊÇ·ñ»¹ÓÐÊý¾Ý£¬ÓеĻ°¾ÍдÈëµ½spi·¢ËͼĴæÆ÷(S3C_SPI_TX_DATA)ÖС£ÎÒÃÇÖªµÀspiµÄÓ²¼þÄܹ»»º³å64
¸ö×Ö½ÚµÄÊý¾Ý£¬Èç¹ûÎÒÃÇÒ»´Î·¢Ë͵ÄÊý¾Ý³¤¶ÈСÓÚ64¸ö×Ö½Ú£¬²¢ÇÒÏÂÒ»´Î·¢ËÍÊý¾Ýʱ»º³åÖеÄÊý¾Ý·¢ËÍÍê³É£¬ÄÇôÕâ¶Î´úÂë±íÃæÉÏÓ¦¸ÃÊÇûʲôÎÊÌâ¡£Èç¹ûÎÒÃÇ·¢
Ë͵ÄÊý¾Ý³¤¶È´óÓÚ64¸ö×Ö½Ú£¬ÄÇôÕâ¶Î´úÂëÖÁÉÙÔì³ÉµÄºó¹ûÊDzúÉúÒ»¸öSPI transmit over run error¡£
ÔÚ¿´spi½ÓÊÕ£¬½ÓÊÕµ÷ÓõĴúÂëÊÇ£º
while(!(rx_msgend(spi))){
spi->msg->rbuf[spi->msg_rd_pt
Ïà¹ØÎĵµ£º
1# ·¢±íÓÚ 2005-11-15 17:34 Ö»¿´¸Ã×÷Õß
http://www.chinaunix.net ×÷Õß:bierdaci ·¢±íÓÚ£º2004-05-25 18:59:33
²»ÖªµÀ¸Ã²»¸Ã·¢ÕâÀÊÇÎÒ´Óproc¸ÄÀ´µÄ,¶®ÄÚºËÔ´ÂëµÄ½»Á÷½»Á÷
hello.c
[code:1:3adb123188]
#include "hello.h"
struct inode * hello_get_inode(struct s ......
Linux select()Ïê½â
selectϵͳµ÷ÓÃÊÇÓÃÀ´ÈÃÎÒÃǵijÌÐò¼àÊÓ¶à¸öÎļþ¾ä±ú(file descriptor)µÄ״̬±ä»¯µÄ¡£³ÌÐò»áÍ£ÔÚselectÕâÀïµÈ´ý£¬Ö±µ½±»¼àÊÓµÄÎļþ¾ä±úÓÐijһ¸ö»ò¶à¸ö·¢ÉúÁË״̬¸Ä±ä¡£
ÎļþÔÚ¾ä±úÔÚLinuxÀïºÜ¶à£¬Èç¹ûÄãmanij¸öº¯Êý£¬ÔÚº¯Êý·µ»ØÖµ²¿·Ö˵µ½³É¹¦ºóÓÐÒ»¸öÎļþ¾ä±ú±»´´½¨µÄ¶¼ÊÇ ......
ubuntu ϱàÒë linux fetion Ó¦ÓóÌÐòdemo
×¢£ºÕâÀï¸ø³ö½çÃæÄ£¿éµÄÔ´´úÂ룬¶ølibfetion¿â(32λ)ÔòÊÇÒÔ¾²Ì¬¿âµÄÐÎʽ·Å½øÈ¥ÁË¡£
1£º½¨Á¢±àÒë»·¾³£º
ÔÚÖÕ¶ËÖ´ÐÐÒÔÏÂÃüÁ
sudo apt-get install automake
sudo apt-get install libc-dev
sudo apt-get install g++
sudo apt-get install libcurl4-openssl-dev
sudo ......
×Ô¼ºÊ¹ÓÃvim±à¼´úÂëÒ²ÊÇÓÐÒ»¶Îʱ¼äÀ´£¬Ä¿Ç°ÔĶÁ¡¢Ð޸ġ¢Ð´´úÂë»ù±¾¶¼Àë²»¿ªËûÁË¡£±¾ÈËʹÓùýµÄ±à¼Æ÷ºÜÉÙ£¬ÒÔÇ°Ò»°ã¶¼ÊÇʹÓóÌÐò¿ª·¢IDE×Ô´øµÄ±à¼Æ÷Щ´úÂ룬û¾õµÃʲô·½±ã¡£¿ªÊ¼Ê¹ÓÃvimµÄ¸Õ¸Õ½Ó´¥linux³ÌÐò¿ª·¢µÄʱºò£¬ÄÇʱ¿´µ½ÆäËûÈËÒ»°ã¶¼ÊÇÔÚwindowsÏÂʹÓÃSource Insight ±à¼´úÂ룬ȻºóÔÚÐéÄâ»úlinuxÏÂmake¡£ÎұȽ ......