timeptrs.c

来自「实时嵌入式操作系统内部关于定时器的应用」· C语言 代码 · 共 35 行

C
35
字号
/*
 * c1_stubs.c
 *
 * Copyright (C) SGS-THOMSON Microelectronics Ltd. 1997
 *
 * Timer functions called via functions on the C1. Functions should
 * be set up be a seperate timer library.
 *
 * see: examples/dcu/c1timer/
 */

#include "c1timer.h"
#include "c1timeri.h"

#pragma ST_translate (fatal, "fatal%c")
extern void fatal(int,char *);

void def_function(void)
{
  fatal(0,"timer device driver not installed");
}

int  (*time_now_ptr)(void) = ( int (*)(void) )  &def_function;
void (*task_delay_ptr)(unsigned int) = ( void (*)(unsigned int) )&def_function;
void (*task_delay_until_ptr)(unsigned int) = ( void (*)(unsigned int)) &def_function;

void (*timer_raise_int_ptr)(void)  = ( void (*)(void) )  &def_function;
void (*timer_enable_int_ptr)(void) = ( void (*)(void) )  &def_function; 
void (*timer_disable_int_ptr)(void)= ( void (*)(void) )  &def_function;
void (*timer_set_ptr)(int)         = ( void (*)(int) )   &def_function;
int  (*timer_read_ptr)(void)       = ( int (*)(void) )   &def_function;



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?