Rename UNUSED() to UNUSED_ARG().
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 31 Dec 2004 17:47:45 +0000 (17:47 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 31 Dec 2004 17:47:45 +0000 (17:47 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@328 38d2e660-2303-0410-9eaa-f027e97ec537

drv/kdebug.c
drv/ser_avr.c
mware/sprintf.c
mware/text_format.c

index 03a86430787ad181e27902deecde4337b79800a0..48ff07a9de6e0ed78a4eee341504ea943ea04a1d 100755 (executable)
@@ -15,6 +15,9 @@
 
 /*#*
  *#* $Log$
+ *#* Revision 1.19  2004/12/31 17:47:45  bernie
+ *#* Rename UNUSED() to UNUSED_ARG().
+ *#*
  *#* Revision 1.18  2004/12/08 08:52:00  bernie
  *#* Save some more RAM on AVR.
  *#*
@@ -257,7 +260,7 @@ void kdbg_init(void)
 /*!
  * Output one character to the debug console
  */
-static void __kputchar(char c, UNUSED(void *, unused))
+static void __kputchar(char c, UNUSED_ARG(void *, unused))
 {
        /* Poll while serial buffer is still busy */
        KDBG_WAIT_READY();
index a54d3764dd35cb79f9960e48bf711631c2609cbf..96583e6ecfd4617ae85a89b875b7c57f9b6303f2 100755 (executable)
@@ -38,6 +38,9 @@
 
 /*#*
  *#* $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.
  *#*
@@ -350,13 +353,15 @@ struct Serial *ser_spi = &ser_handles[SER_SPI];
 /*
  * 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;
 }
@@ -377,7 +382,7 @@ static void uart0_enabletxirq(struct SerialHardware *_hw)
        }
 }
 
-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;
@@ -390,7 +395,7 @@ static void uart0_setbaudrate(UNUSED(struct SerialHardware *, _hw), unsigned lon
        //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);
@@ -399,14 +404,16 @@ static void uart0_setparity(UNUSED(struct SerialHardware *, _hw), int parity)
 
 #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;
 }
@@ -428,7 +435,7 @@ static void uart1_enabletxirq(struct SerialHardware *_hw)
        }
 }
 
-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;
@@ -439,14 +446,14 @@ static void uart1_setbaudrate(UNUSED(struct SerialHardware *, _hw), unsigned lon
        //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.
@@ -467,7 +474,7 @@ static void spi_init(UNUSED(struct SerialHardware *, _hw), UNUSED(struct Serial
        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 */
@@ -491,12 +498,14 @@ static void spi_starttx(struct SerialHardware *_hw)
        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
 }
index dacb06c64336bff5510b01a92c83e6b0c0479fc8..84c5f0c6ba3dd2c989e66640a291658b3ad2df44 100755 (executable)
@@ -13,6 +13,9 @@
 
 /*#*
  *#* $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"
@@ -66,7 +50,7 @@ static void __str_put_char(char c, void *ptr)
        (*((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 */
 }
index c38bff8cd2c96efaf09906906cfee89c8e0d263b..d8080a90c53d3c46727bd0f37f0f0902c2aa0d4f 100755 (executable)
@@ -15,6 +15,9 @@
 
 /*#*
  *#* $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.
  *#*
@@ -174,7 +177,10 @@ int PGM_FUNC(text_xprintf)(struct Bitmap *bm,
 /*!
  * 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;
 }