/*#*
*#* $Log$
+ *#* Revision 1.22 2004/12/31 17:47:45 bernie
+ *#* Rename UNUSED() to UNUSED_ARG().
+ *#*
*#* Revision 1.21 2004/12/13 12:07:06 bernie
*#* DISABLE_IRQSAVE/ENABLE_IRQRESTORE: Convert to IRQ_SAVE_DISABLE/IRQ_RESTORE.
*#*
/*
* Callbacks
*/
-static void uart0_init(UNUSED(struct SerialHardware *, _hw), UNUSED(struct Serial *, ser))
+static void uart0_init(
+ UNUSED_ARG(struct SerialHardware *, _hw),
+ UNUSED_ARG(struct Serial *, ser))
{
SER_UART0_BUS_TXINIT;
RTS_ON;
}
-static void uart0_cleanup(UNUSED(struct SerialHardware *, _hw))
+static void uart0_cleanup(UNUSED_ARG(struct SerialHardware *, _hw))
{
UCSR0B = 0;
}
}
}
-static void uart0_setbaudrate(UNUSED(struct SerialHardware *, _hw), unsigned long rate)
+static void uart0_setbaudrate(UNUSED_ARG(struct SerialHardware *, _hw), unsigned long rate)
{
/* Compute baud-rate period */
uint16_t period = (((CLOCK_FREQ / 16UL) + (rate / 2)) / rate) - 1;
//DB(kprintf("uart0_setbaudrate(rate=%lu): period=%d\n", rate, period);)
}
-static void uart0_setparity(UNUSED(struct SerialHardware *, _hw), int parity)
+static void uart0_setparity(UNUSED_ARG(struct SerialHardware *, _hw), int parity)
{
#if !CPU_AVR_ATMEGA103
UCSR0C = (UCSR0C & ~(BV(UPM1) | BV(UPM0))) | ((parity) << UPM0);
#if AVR_HAS_UART1
-static void uart1_init(UNUSED(struct SerialHardware *, _hw), UNUSED(struct Serial *, ser))
+static void uart1_init(
+ UNUSED_ARG(struct SerialHardware *, _hw),
+ UNUSED_ARG(struct Serial *, ser))
{
SER_UART1_BUS_TXINIT;
RTS_ON;
SER_STROBE_INIT;
}
-static void uart1_cleanup(UNUSED(struct SerialHardware *, _hw))
+static void uart1_cleanup(UNUSED_ARG(struct SerialHardware *, _hw))
{
UCSR1B = 0;
}
}
}
-static void uart1_setbaudrate(UNUSED(struct SerialHardware *, _hw), unsigned long rate)
+static void uart1_setbaudrate(UNUSED_ARG(struct SerialHardware *, _hw), unsigned long rate)
{
/* Compute baud-rate period */
uint16_t period = (((CLOCK_FREQ / 16UL) + (rate / 2)) / rate) - 1;
//DB(kprintf("uart1_setbaudrate(rate=%ld): period=%d\n", rate, period);)
}
-static void uart1_setparity(UNUSED(struct SerialHardware *, _hw), int parity)
+static void uart1_setparity(UNUSED_ARG(struct SerialHardware *, _hw), int parity)
{
UCSR1C = (UCSR1C & ~(BV(UPM1) | BV(UPM0))) | ((parity) << UPM0);
}
#endif // AVR_HAS_UART1
-static void spi_init(UNUSED(struct SerialHardware *, _hw), UNUSED(struct Serial *, ser))
+static void spi_init(UNUSED_ARG(struct SerialHardware *, _hw), UNUSED_ARG(struct Serial *, ser))
{
/*
* Set MOSI and SCK ports out, MISO in.
SPCR = BV(SPE) | BV(SPIE) | BV(MSTR) | BV(SPR0);
}
-static void spi_cleanup(UNUSED(struct SerialHardware *, _hw))
+static void spi_cleanup(UNUSED_ARG(struct SerialHardware *, _hw))
{
SPCR = 0;
/* Set all pins as inputs */
IRQ_RESTORE(flags);
}
-static void spi_setbaudrate(UNUSED(struct SerialHardware *, _hw), UNUSED(unsigned long, rate))
+static void spi_setbaudrate(
+ UNUSED_ARG(struct SerialHardware *, _hw),
+ UNUSED_ARG(unsigned long, rate))
{
// nop
}
-static void spi_setparity(UNUSED(struct SerialHardware *, _hw), UNUSED(int, parity))
+static void spi_setparity(UNUSED_ARG(struct SerialHardware *, _hw), UNUSED_ARG(int, parity))
{
// nop
}
/*#*
*#* $Log$
+ *#* Revision 1.7 2004/12/31 17:47:45 bernie
+ *#* Rename UNUSED() to UNUSED_ARG().
+ *#*
*#* Revision 1.6 2004/11/16 21:15:19 bernie
*#* Fix off-by-one bug in [v]snprintf().
*#*
*#*
*#* Revision 1.2 2004/06/03 11:27:09 bernie
*#* Add dual-license information.
- *#*
- *#* Revision 1.1 2004/05/23 15:43:16 bernie
- *#* Import mware modules.
- *#*
- *#* Revision 1.4 2004/04/03 20:42:27 aleph
- *#* Remove duplicated defines
- *#*
- *#* Revision 1.3 2004/03/24 15:48:53 bernie
- *#* Remove Copyright messages from Doxygen output
- *#*
- *#* Revision 1.2 2004/03/19 16:51:30 bernie
- *#* Add PROGMEM kludge.
- *#*
- *#* Revision 1.1 2004/02/23 09:45:09 aleph
- *#* Add missing library functions.
- *#*
- *#* Revision 1.1 2003/11/13 16:56:37 aleph
- *#* Add first implementation of dsp firmware
- *#*
*#*/
#include "compiler.h"
(*((char **)ptr))++;
}
-static void __null_put_char(UNUSED(char, c), UNUSED(void *, ptr))
+static void __null_put_char(UNUSED_ARG(char, c), UNUSED_ARG(void *, ptr))
{
/* nop */
}
/*#*
*#* $Log$
+ *#* Revision 1.9 2004/12/31 17:47:45 bernie
+ *#* Rename UNUSED() to UNUSED_ARG().
+ *#*
*#* Revision 1.8 2004/11/16 21:16:56 bernie
*#* Update to new naming scheme in mware/gfx.c.
*#*
/*!
* Return the width in pixels of a vprintf()-formatted string.
*/
-int PGM_FUNC(text_vwidthf)(UNUSED(struct Bitmap *, bm), const char * PGM_ATTR fmt, va_list ap)
+int PGM_FUNC(text_vwidthf)(
+ UNUSED_ARG(struct Bitmap *, bm),
+ const char * PGM_ATTR fmt,
+ va_list ap)
{
return PGM_FUNC(vsprintf)(NULL, fmt, ap) * FONT_WIDTH;
}