28typedef void (*tlib_isr_t)(
void *data);
31 TLIB_FLAGS_BROADCAST = 0x01
36 void (*reset)(
struct tlib_dev *hand);
39 unsigned int *basefreq,
40 unsigned int *tickrate);
41 int (*set_freq)(
struct tlib_dev *hand,
unsigned int tickrate);
42 void (*irq_reg)(
struct tlib_dev *hand, tlib_isr_t func,
void *data,
int flags);
43 void (*irq_unreg)(
struct tlib_dev *hand, tlib_isr_t func,
void *data);
44 void (*start)(
struct tlib_dev *hand,
int once);
46 void (*restart)(
struct tlib_dev *hand);
47 void (*get_counter)(
struct tlib_dev *hand,
unsigned int *counter);
48 int (*custom)(
struct tlib_dev *hand,
int cmd,
void *arg);
49 int (*int_pend)(
struct tlib_dev *hand,
int ack);
50 void (*get_widthmask)(
struct tlib_dev *hand,
unsigned int *widthmask);
62#ifdef RTEMS_DRVMGR_STARTUP
67extern void Clock_timer_register(
int timer_number);
75extern int tlib_dev_reg(
struct tlib_dev *newdev);
81extern void *tlib_open(
int timer_no);
84extern void tlib_close(
void *hand);
87extern int tlib_ntimer(
void);
89static inline void tlib_reset(
void *hand)
99static inline void tlib_get_freq(
101 unsigned int *basefreq,
102 unsigned int *tickrate)
106 dev->drv->get_freq(dev, basefreq, tickrate);
110static inline int tlib_set_freq(
void *hand,
unsigned int tickrate)
114 return dev->drv->set_freq(dev, tickrate);
118static inline void tlib_irq_unregister(
void *hand)
122 if ( dev->isr_func ) {
123 dev->drv->irq_unreg(dev, dev->isr_func, dev->isr_data);
124 dev->isr_func =
NULL;
129static inline void tlib_irq_register(
void *hand, tlib_isr_t func,
void *data,
int flags)
134 tlib_irq_unregister(hand);
135 dev->isr_func = func;
136 dev->isr_data = data;
137 dev->drv->irq_reg(dev, func, data, flags);
145static inline void tlib_start(
void *hand,
int once)
149 dev->drv->start(dev, once);
153static inline void tlib_stop(
void *hand)
161static inline void tlib_restart(
void *hand)
165 dev->drv->restart(dev);
169static inline void tlib_get_counter(
void *hand,
unsigned int *counter)
173 dev->drv->get_counter(dev, counter);
177static inline void tlib_custom(
void *hand,
int cmd,
void *arg)
181 dev->drv->custom(dev, cmd, arg);
184static inline int tlib_interrupt_pending(
void *hand,
int ack)
188 return dev->drv->int_pend(dev, ack);
191static inline void tlib_get_widthmask(
void *hand,
unsigned int *widthmask)
195 dev->drv->get_widthmask(dev, widthmask);
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77