/*!
* \file
* <!--
- * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/)
* Copyright 2000 Bernardo Innocenti <bernie@develer.com>
* This file is part of DevLib - See devlib/README for information.
* -->
/*
* $Log$
+ * Revision 1.9 2004/07/20 23:45:01 bernie
+ * Finally remove redundant protos.
+ *
* Revision 1.8 2004/07/18 21:57:32 bernie
* timer_gettick(): Rename to timer_tick() and document better.
*
extern Timer *timer_abort(Timer *timer);
extern void timer_delay(time_t time);
extern void timer_udelay(utime_t utime);
-INLINE time_t timer_tick(void);
-INLINE time_t timer_tick_unlocked(void);
-INLINE void timer_set_event_softint(Timer* timer, Hook func, void* user_data);
-INLINE void timer_set_delay(Timer* timer, time_t delay);
#if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS
/*! Set the timer so that it sends a signal when it expires */
-INLINE void timer_set_event_signal(Timer* timer, struct Process* proc, sigset_t sigs);
INLINE void timer_set_event_signal(Timer* timer, struct Process* proc, sigset_t sigs)
{
event_initSignal(&timer->expire, proc, sigs);
/*
* $Log$
+ * Revision 1.6 2004/07/20 23:48:16 bernie
+ * Finally remove redundant protos.
+ *
* Revision 1.5 2004/07/18 22:16:35 bernie
* Add missing header; Prevent warning for project_ks-specific code.
*
//! Frequency of the hardware high precision timer
#define TIMER_HW_HPTICKS_PER_SEC (CLOCK_FREQ / 64)
- INLINE hptime_t timer_hw_hpread(void);
INLINE hptime_t timer_hw_hpread(void)
{
return TCNT0;
//! Frequency of the hardware high precision timer
#define TIMER_HW_HPTICKS_PER_SEC (24000ul * 512)
- INLINE hptime_t timer_hw_hpread(void);
INLINE hptime_t timer_hw_hpread(void)
{
return TCNT1;
//! Frequency of the hardware high precision timer
#define TIMER_HW_HPTICKS_PER_SEC (CLOCK_FREQ / 64)
- INLINE hptime_t timer_hw_hpread(void);
INLINE hptime_t timer_hw_hpread(void)
{
return TCNT2;
/*
* $Log$
+ * Revision 1.3 2004/07/20 23:47:12 bernie
+ * Finally remove redundant protos.
+ *
* Revision 1.2 2004/07/20 17:09:11 bernie
* swab16(), swab32(), cpu_to_be32(), cpu_to_le32(): New functions.
*
/*!
* \brief Swap upper and lower bytes in a 16-bit value.
*/
-INLINE uint16_t swab16(uint16_t x);
INLINE uint16_t swab16(uint16_t x)
{
return ((x & (uint16_t)0x00FFU) << 8)
/*!
* \brief Reverse bytes in a 32-bit value (e.g.: 0x12345678 -> 0x78563412).
*/
-INLINE uint16_t swab32(uint16_t x);
INLINE uint16_t swab32(uint16_t x)
{
return ((x & (uint32_t)0x000000FFUL) << 24)
| ((x & (uint32_t)0xFF000000UL) >> 24);
}
-INLINE uint16_t cpu_to_be16(uint16_t x);
INLINE uint16_t cpu_to_be16(uint16_t x)
{
return (CPU_BYTE_ORDER == CPU_LITTLE_ENDIAN) ? swab16(x) : x;
}
-INLINE uint16_t cpu_to_le16(uint16_t x);
INLINE uint16_t cpu_to_le16(uint16_t x)
{
return (CPU_BYTE_ORDER == CPU_BIG_ENDIAN) ? swab16(x) : x;
}
-INLINE uint32_t cpu_to_be32(uint32_t x);
INLINE uint32_t cpu_to_be32(uint32_t x)
{
return (CPU_BYTE_ORDER == CPU_LITTLE_ENDIAN) ? swab32(x) : x;
}
-INLINE uint32_t cpu_to_le32(uint32_t x);
INLINE uint32_t cpu_to_le32(uint32_t x)
{
return (CPU_BYTE_ORDER == CPU_BIG_ENDIAN) ? swab32(x) : x;
/*
* $Log$
+ * Revision 1.7 2004/07/20 23:46:29 bernie
+ * Finally remove redundant protos.
+ *
* Revision 1.6 2004/06/06 17:18:04 bernie
* Remove redundant declaration of fifo_isempty_locked().
*
} FIFOBuffer;
-/* Public function prototypes */
-INLINE bool fifo_isempty(const FIFOBuffer *fb);
-INLINE bool fifo_isfull(const FIFOBuffer *fb);
-INLINE bool fifo_isfull_locked(const FIFOBuffer *fb);
-#ifdef __MWERKS__
-#pragma interrupt called
-#endif
-INLINE void fifo_push(FIFOBuffer *fb, unsigned char c);
-#ifdef __MWERKS__
-#pragma interrupt called
-#endif
-INLINE unsigned char fifo_pop(FIFOBuffer *fb);
-INLINE void fifo_flush(FIFOBuffer *fb);
-INLINE void fifo_init(FIFOBuffer *fb, unsigned char *buf, size_t size);
-
-
/*!
* Check whether the fifo is empty
*
*/
INLINE void fifo_push(FIFOBuffer *fb, unsigned char c)
{
+#ifdef __MWERKS__
+#pragma interrupt called
+#endif
/* Write at tail position */
*(fb->tail) = c;
*/
INLINE unsigned char fifo_pop(FIFOBuffer *fb)
{
+#ifdef __MWERKS__
+#pragma interrupt called
+#endif
if (fb->head == fb->end)
{
/* wrap head around */
/*
* $Log$
+ * Revision 1.5 2004/07/20 23:45:01 bernie
+ * Finally remove redundant protos.
+ *
* Revision 1.4 2004/07/18 22:12:53 bernie
* Fix warnings with GCC 3.3.2.
*
* \name Unlink a node from the head of the list \a l.
* \return Pointer to node, or NULL if the list was empty.
*/
-INLINE Node *REMHEAD(List *l);
INLINE Node *REMHEAD(List *l)
{
Node *n;
* \name Unlink a node from the tail of the list \a l.
* \return Pointer to node, or NULL if the list was empty.
*/
-INLINE Node *REMTAIL(List *l);
INLINE Node *REMTAIL(List *l)
{
Node *n;