?? seg7_driver.c
字號(hào):
/*
* seg7_driver.c - seg7 driver ( low-level )
*
* Author: li ming <admin@lumit.org>
* Date: 2005-6-11
* Copyleft: http://www.lumit.org
*/
#include "seg7_driver.h"
/* set seg7 related gpio */
int seg7_open( void )
{
// do nothing
return 0;
}
int seg7_read( char * buf, int count )
{
// do nothing
return count;
}
int seg7_write( char * buf, int count )
{
int i = 0;
int seg7_value = 0;
// the count has exceeds the count of seg7
if( count > SEG7_NUM )
return -1;
for( i = 0; i < count; i++ )
seg7_value = seg7_value | (buf[i]? ( 1 << i ) : 0) ;
// write the value to 7 segment leds
SEG7 = seg7_value;
return count;
}
int seg7_ioctl( unsigned int cmd, unsigned long arg )
{
// do nothing
return 0;
}
int seg7_release( void )
{
// do nothing
return 0;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -