LIXIAOTIAN
Newbie level 4
I creat a systime.c and a systime.h .
which says,
Code:
#include "config.h"
#include "ntrxtypes.h"
#include "SysTime.h"
void SysTimeInit()
{
TOIE0=1; /*定时器x开中断*/
TCCR0=0; /*普通模式选择*/
TCNT0=6; /*初值设定*/
CS0=3; /*时钟源选择 启动时钟?/
}
static MyDword32T SysTime=0;
MyDword32T GetSysTime()
{
return SysTime;
}
SIGNAL(SIG_OVERFLOW0) /*1ms中断一次*/
{
TCNT0 = 6; /*重设初值 */
; /*启动计数器x*/
SysTime++;
}
AND
Code:
#include "config.h"
#include "ntrxtypes.h"
extern void SysTimeInit(void);
extern MyDword32T GetSysTime(void);
BUT when i use the function SysTimeInit() in app.c like this:
Code:
...
#include "SysTime.h"
...
void InitApplication(void)
{
...
SysTimeInit();
}
AND the program says
app.c:86: undefined reference to `SysTimeInit'
i think i have done all that needed , BUT WHAT IS THEN PROBLEM??