資源簡介
應(yīng)用于ATMEL芯片硬件平臺,使用12M(8M、1M)晶振,產(chǎn)生各種數(shù)字機頂盒遙控器碼,控制數(shù)字機頂盒,實現(xiàn)最常用的操作。

代碼片段和文件信息
#include?“config.h“
#define?_eeprom_func_FILE_C_
#include?“eeprom_func.h“
#ifdef??SURPPORT_HW_EEPROM
#include?“all_head.h“
void?SINO_EEPROM_Init(void)
{
EECR=0x00;
}
/*********************************************
?*?Routine?name:void?EEPROM_Write(short?addr)
?*?Description?:Read?eeprom?data
?*
?*?Arguments????:address?&?data?
?*
?*?Return?value?:none
?*?History??????:Creat?it?by?paddy
?*********************************************/
void?SINO_EEPROM_Write(unsigned?short?addr?uchar?data)
{
/*?等待上一次寫操作結(jié)束?*/
while(EECR?&?(1< cli();
/*?設(shè)置地址和數(shù)據(jù)寄存器?*/
EEAR?=?addr;
EEDR?=?data;
/*?置位EEMWE?*/
EECR?|=?(1< /*?置位EEWE?以啟動寫操作E?*/
EECR?|=?(1<
//delay?4ms
#if?defined(FREQUENCY_8M)||defined(FREQUENCY_12M)?
exact_delay10us(400);
#elif?defined(FREQUENCY_1M)
Sys1MHZ_exact_delay10us_8To1000(400);
//exact_delay40us(100);
#endif
sei();
#if?0
#ifdef?MX_EE
#ifdef?EEWE
??while?(test_bit(EECR?EEWE));
#else
??while?(test_bit(EECR?EEPE));
#endif
??cli();
??eeprom_write_byte((uchar?*)&addr?data);
??sei();
#else
#pragma?error?Chip?does?not?have?EEPROM?memory
#endif
#endif
?
}
/*********************************************
?*?Routine?name:char?EEPROM_Read(short?addr)
?*?Description?:Read?eeprom?data
?*
?*?Arguments????:address?
?*
?*?Return?value?:data
?*?History??????:Creat?it?by?paddy
?*********************************************/
uchar?SINO_EEPROM_Read(unsigned?short?addr)
{
/*?等待上一次寫操作結(jié)束?*/
while(EECR?&?(1< cli();
/*?設(shè)置地址寄存器?*/
EEAR?=?addr;
/*?設(shè)置EERE?以啟動讀操作?*/
EECR?|=?(1< /*?自數(shù)據(jù)寄存器返回數(shù)據(jù)?*/
sei();
return?EEDR;
#if?0
char?bData?=?0;
#ifdef?MX_EE
#ifdef?EEWE
??while?(test_bit(EECR?EEWE));
#else
??while?(test_bit(EECR?EEPE));
#endif
??bData?=?eeprom_read_byte((uchar?*)&addr);
#else
#pragma?error?“Chip?does?not?have?EEPROM?memory“
#endif
return?(bData);
#endif
}
#endif
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2911??2008-12-30?16:22??ir\.dep\eeprom_func.o.d
?????文件???????1725??2008-12-30?16:22??ir\.dep\evb_test.o.d
?????文件???????2937??2008-12-30?16:21??ir\.dep\ir_send.o.d
?????文件???????2894??2008-12-30?16:21??ir\.dep\key_scan.o.d
?????文件???????2878??2008-12-30?16:21??ir\.dep\Main.o.d
?????文件???????2895??2008-12-30?16:22??ir\.dep\oddebug.o.d
?????文件???????2918??2008-12-30?16:22??ir\.dep\power_managuge.o.d
?????文件???????6009??2008-12-23?11:47??ir\CCTV_IR.aps
?????文件????????519??2008-12-29?18:06??ir\cctv_ir.aws
?????文件?????????13??2008-12-30?16:22??ir\cctv_ir.eep
?????文件??????27248??2008-12-30?16:22??ir\cctv_ir.elf
?????文件??????10789??2008-12-30?16:22??ir\cctv_ir.hex
?????文件?????104917??2008-12-30?16:22??ir\cctv_ir.lss
?????文件??????33870??2008-12-30?16:22??ir\cctv_ir.map
?????文件???????3963??2008-12-30?16:22??ir\cctv_ir.sym
?????文件???????2063??2008-12-29?10:57??ir\eeprom_func.c
?????文件???????7865??2008-12-30?15:54??ir\evb_test.c
?????文件???????3711??2008-12-30?15:06??ir\include\all_head.h
?????文件???????2622??2008-12-30?14:10??ir\include\config.h
?????文件????????406??2008-12-20?13:07??ir\include\eeprom_func.h
?????文件????????314??2008-12-30?14:53??ir\include\Evb_test.h
?????文件???????1641??2008-12-18?15:26??ir\include\globle.h
?????文件???????7487??2008-12-30?11:35??ir\include\ir_send.h
?????文件???????1801??2008-12-30?09:15??ir\include\key_scan.h
?????文件??????????0??2008-10-23?10:35??ir\include\key_sscan.h
?????文件????????437??2008-12-20?11:39??ir\include\main.h
?????文件???????1704??2008-10-23?10:35??ir\include\malata_typedef.h
?????文件???????3258??2008-12-20?13:59??ir\include\oddebug.h
?????文件???????1355??2008-12-30?14:03??ir\include\power_managuge.h
?????文件????????499??2008-10-23?10:35??ir\include\power_micro_config.h
............此處省略65個文件信息
評論
共有 條評論