LinuxÖеÄÑÓʱº¯Êý¼°»ñȡϵͳʱ¼äº¯Êý
Ó¦Óò㣺
#include <unistd.h>
1¡¢unsigned int sleep(unsigned int seconds); Ãë¼¶
2¡¢int usleep(useconds_t usec); ΢Ãë¼¶£º1/10^-6
#define _POSIX_C_SOURCE 199309
#include <a(const struct timespec *req, struct timespec *rem);
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
// The value of the nanoseconds field must be in the range 0 to 999999999.
Äں˲㣺
include <linux/delay.h>
1¡¢void ndelay(unsigned long nsecs); ÄÉÃë¼¶£º1/10^-10
2¡¢void udelay(unsigned long usecs); ΢Ãë¼¶: 1/10^-6
3¡¢void mdelay(unsigned long msecs); ºÁÃë¼¶£º1/10^-3
linuxÏ»ñȡʱ¼äµÄÈô¸Éº¯Êý(z)
asctime£¨½«Ê±¼äºÍÈÕÆÚÒÔ×Ö·û´®¸ñʽ±íʾ£©
Ïà¹Øº¯Êý
time£¬ctime£¬gmtime£¬localtime
±íÍ·Îļþ
#include<time.h>
¶¨Ò庯Êý
char * asctime(const struct tm * timeptr);
º¯Êý˵Ã÷
asctime()½«²ÎÊýtimeptrËùÖ¸µÄtm½á¹¹ÖеÄÐÅϢת»»³ÉÕæÊµÊÀ½çËùʹÓõÄʱ¼äÈÕÆÚ±íʾ·½·¨£¬È»ºó½«½á¹ûÒÔ×Ö·û´®ÐÎ̬·µ»Ø¡£´Ëº¯ÊýÒѾÓÉÊ±Çø×ª»»³Éµ±µØÊ±¼ä£¬×Ö·û´®¸ñʽΪ:“Wed Jun 30 21:49:08 1993\n”
·µ»ØÖµ
ÈôÔÙµ÷ÓÃÏà¹ØµÄʱ¼äÈÕÆÚº¯Êý£¬´Ë×Ö·û´®¿ÉÄÜ»á±»ÆÆ»µ¡£´Ëº¯ÊýÓëctime²»Í¬´¦ÔÚÓÚ´«ÈëµÄ²ÎÊýÊDz»Í¬µÄ½á¹¹¡£
¸½¼Ó˵Ã÷
·µ»ØÒ»×Ö
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâÆª·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´Ë×ªÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨ÕâÆª²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
1£® ´´½¨Ä¿Â¼
mkdir –p test/sub
2£® ÔÚ×ÓĿ¼sub/ϱàдhello.cºÍhello.h
/*****hello.c*****/
#include <stdio.h>
#include “hello.h”
void hello()
{
printf(“Hello!\n”);
}
/*****hello.h**** ......
linuxÏÂÓÐרÃŵÄÎļþϵͳÓÃÀ´¶ÔÉ豸½øÐйÜÀí£¬devfsºÍsysfs¾ÍÊÇÆäÖÐÁ½ÖÖ¡£
1£¬devfs£ºdevfsÊÇÔÚ2.4Äں˾ͳöÏÖÁË£¬ËüÊÇÓÃÀ´½â¾ölinuxÖÐÉ豸¹ÜÀí»ìÂÒµÄÎÊÌ⣬linuxÄں˿ª·¢ÈËÔ±¿ª·¢ÁËdevfs¡£
2£¬sysfs£ºÊÇLinux ÄÚºËÖÐÉè¼Æ½ÏеÄÒ»ÖÖÐéÄâµÄ»ùÓÚÄÚ´æµÄÎļþϵͳ£¬ËüµÄ×÷ÓÃÓëproc ÓÐЩÀàËÆ£¬µ« ......
xxxx.tar.gzÎļþʹÓÃtar´øzxvf²ÎÊý£¬¿ÉÒÔÒ»´Î½âѹ¿ª¡£XXXXΪÎļþÃû¡£ ÀýÈ磺
$tar zxvf xxxx.tar.gz
gzip -d
Óï ·¨£ºgzip [-acdfhlLnNqrtvV][-S <ѹËõ×Öβ×Ö·û´®>][-<ѹËõЧÂÊ>][--best/fast][Îļþ...] »ò gzip [-acdfhlLnNqrtvV][-S <ѹËõ×Öβ×Ö·û´®>][-<ѹËõЧÂÊ>][--best/fast][Ŀ¼]
²¹³äË ......