Trim CVS logs and cleanup header info.
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Sun, 23 May 2004 18:21:53 +0000 (18:21 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Sun, 23 May 2004 18:21:53 +0000 (18:21 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@5 38d2e660-2303-0410-9eaa-f027e97ec537

drv/buzzer.c
drv/buzzer.h
drv/kdebug.c
drv/kdebug.h
drv/ser.c
drv/ser.h
drv/ser_avr.c
drv/ser_dsp56k.c
drv/ser_i196.c
drv/ser_p.h

index cb722398a5ebd1da4d04377f8f27982e15b1f4d9..5f3349e130b5ecbcdf120c0087b47eb5bdc38d03 100755 (executable)
@@ -1,8 +1,8 @@
 /*!
  * \file
  * <!--
- * Copyright (C) 1999,2003 Bernardo Innocenti <bernie@develer.com>
- * Copyright (C) 2003 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 1999,2003 Bernardo Innocenti <bernie@develer.com>
  * All Rights Reserved.
  * -->
  *
 
 /*
  * $Log$
- * Revision 1.1  2004/05/23 18:10:11  bernie
- * Import drv/ modules.
- *
- * Revision 1.5  2004/04/04 17:44:51  aleph
- * Move event.h from mware to kern dir
- *
- * Revision 1.4  2004/03/24 15:03:45  bernie
- * Use explicit include paths; clean Doxygen comments
- *
- * Revision 1.3  2004/03/03 18:27:44  bernie
- * Fixed race conds with IRQ when fiddling with I/O ports
- *
- * Revision 1.2  2003/12/18 18:15:24  aleph
- * Use new IRQ disable/enable reentrant macros
- *
- * Revision 1.1  2003/12/13 23:53:37  aleph
- * Add buzzer driver
+ * Revision 1.2  2004/05/23 18:21:53  bernie
+ * Trim CVS logs and cleanup header info.
  *
  */
 
index 646c467b8e8c87a7d20b44971b6ceaafb1c3c798..078daef84062d8c029f9eebd00ffd7a833f21e5d 100755 (executable)
@@ -1,8 +1,10 @@
 /*!
  * \file
- * Copyright (C) 1999,2003 Bernardo Innocenti <bernie@develer.com>
- * Copyright (C) 2003 Develer S.r.l. (http://www.develer.com/)
+ * <!--
+ * Copyright 2003 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 1999,2003 Bernardo Innocenti <bernie@develer.com>
  * All Rights Reserved.
+ * -->
  *
  * \version $Id$
  *
 
 /*
  * $Log$
- * Revision 1.1  2004/05/23 18:10:11  bernie
- * Import drv/ modules.
- *
- * Revision 1.1  2003/12/13 23:53:37  aleph
- * Add buzzer driver
+ * Revision 1.2  2004/05/23 18:21:53  bernie
+ * Trim CVS logs and cleanup header info.
  *
  */
-#ifndef BUZZER_H
-#define BUZZER_H
+#ifndef DRV_BUZZER_H
+#define DRV_BUZZER_H
 
 extern void buz_init(void);
 extern void buz_beep(time_t time);
 extern void buz_repeat_start(time_t duration, time_t interval);
 extern void buz_repeat_stop(void);
 
-#endif /* BUZZER_H */
+#endif /* DRV_BUZZER_H */
index 44d211ff65bde4a76d8feb7909a96d598ff4a222..99a82d1a2e9b8bd97668ef1b6ace372bd50b60f2 100755 (executable)
@@ -1,4 +1,4 @@
-/*
+/*!
  * \file
  * <!--
  * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
  */
 
 /*
+ * $Log$
+ * Revision 1.2  2004/05/23 18:21:53  bernie
+ * Trim CVS logs and cleanup header info.
+ *
  */
 
 #include "kdebug.h"
index 3777d3ef974db3cabf66335401418c48dc7e7aa6..1fe13211814595918568d1c7626f243d616bf0d0 100755 (executable)
@@ -1,4 +1,4 @@
-/*
+/*!
  * \file
  * <!--
  * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
@@ -16,6 +16,9 @@
 
 /*
  * $Log$
+ * Revision 1.2  2004/05/23 18:21:53  bernie
+ * Trim CVS logs and cleanup header info.
+ *
  * Revision 1.1  2004/05/23 18:10:11  bernie
  * Import drv/ modules.
  *
index 96c93df59370946432de6ae8d61c5bc26577109b..6d16b93c1b5dc685b4d0df0c9885e625efad42b1 100755 (executable)
--- a/drv/ser.c
+++ b/drv/ser.c
@@ -1,8 +1,8 @@
 /*!
  * \file
  * <!--
- * Copyright 2000 Bernardo Innocenti <bernie@codewiz.org>
  * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2000 Bernardo Innocenti <bernie@codewiz.org>
  * All Rights Reserved.
  * -->
  *
 
 /*
  * $Log$
- * Revision 1.1  2004/05/23 18:10:11  bernie
- * Import drv/ modules.
- *
- * Revision 1.5  2004/05/14 12:47:26  rasky
- * Importato nuovo supporto seriale per AVR da Stefano
- *
- * Revision 1.4  2004/04/29 16:40:23  rasky
- * Durante i busy loop della seriale, chiama la proc_switch() per cambiare processo
- *
- * Revision 1.3  2004/04/21 17:38:24  rasky
- * New application
- *
- * Revision 1.16  2004/04/03 18:30:49  aleph
- * Move timeout defines in config, private define in .c
- *
- * Revision 1.15  2004/03/29 17:01:02  aleph
- * Add function to set serial parity, fix it when ser_open is used
- *
- * Revision 1.14  2004/03/29 16:19:33  aleph
- * Add ser_cleanup function; Various code improvements
+ * Revision 1.2  2004/05/23 18:21:53  bernie
+ * Trim CVS logs and cleanup header info.
  *
- * Revision 1.13  2004/03/24 15:48:53  bernie
- * Remove Copyright messages from Doxygen output
  */
 
 #include <mware/formatwr.h>
index ad643e356c2443418dcf4de1e73c38e0db18d6e3..9d584a8091d93f703d1809693abbf2690e4b7e89 100755 (executable)
--- a/drv/ser.h
+++ b/drv/ser.h
@@ -1,8 +1,8 @@
 /*!
  * \file
  * <!--
- * Copyright 2000 Bernardo Innocenti <bernie@codewiz.org>
  * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2000 Bernardo Innocenti <bernie@codewiz.org>
  * All Rights Reserved.
  * -->
  *
 
 /*
  * $Log$
- * Revision 1.1  2004/05/23 18:10:11  bernie
- * Import drv/ modules.
- *
- * Revision 1.2  2004/04/21 17:38:24  rasky
- * New application
- *
- * Revision 1.16  2004/04/03 18:30:49  aleph
- * Move timeout defines in config, private define in .c
- *
- * Revision 1.15  2004/03/29 17:01:02  aleph
- * Add function to set serial parity, fix it when ser_open is used
- *
- * Revision 1.14  2004/03/29 16:19:33  aleph
- * Add ser_cleanup function; Various code improvements
- *
- * Revision 1.13  2004/03/24 15:22:27  aleph
- * Removed subdirs -I, fix header inclusion, move config.h in board_kf, kctrl
- *
- * Revision 1.12  2004/03/17 17:30:30  bernie
- * Add GCC format checks to printf()-like functions.
- *
- * Revision 1.11  2004/03/16 23:06:42  aleph
- * Doc fix
+ * Revision 1.2  2004/05/23 18:21:53  bernie
+ * Trim CVS logs and cleanup header info.
  *
- * Revision 1.10  2004/03/12 18:46:53  bernie
- * ser_read(): New function.
- *
- * Revision 1.9  2004/03/11 18:11:51  bernie
- * Cosmetic fixes
  */
-#ifndef SER_H
-#define SER_H
+#ifndef DRV_SER_H
+#define DRV_SER_H
 
 #include "compiler.h"
 #include <mware/fifobuf.h>
@@ -109,11 +83,11 @@ enum
        #elif defined(__AVR_ATmega103__)
        SER_UART0,
        SER_SPI,
-       
+
        #elif defined (__m56800__)
        SER_UART0,
-       SER_UART1,      
-       
+       SER_UART1,
+
        #else
                #error unknown architecture
        #endif
@@ -158,10 +132,9 @@ struct Serial
 
        /*! Holds the flags defined above.  Will be 0 when no errors have occurred. */
        REGISTER uint16_t status;
-       
+
        /*! Low-level interface to hardware. */
        struct SerialHardware* hw;
-       
 };
 
 
@@ -184,13 +157,13 @@ extern void ser_close(struct Serial *port);
        extern void ser_settimeouts(struct Serial *port, time_t rxtimeout, time_t txtimeout);
 #endif
 
-/**
- * @name Additional functions implemented as macros
+/*!
+ * \name Additional functions implemented as macros
  *
- * @{
+ * \{
  */
 #define ser_getstatus(h)    ((h)->status)
 #define ser_setstatus(h, x) ((h)->status = (x))
-/* @} */
+/* \} */
 
-#endif /* SER_H */
+#endif /* DRV_SER_H */
index c3bab672a356e0197e3d4013324d4ea080cea135..af780c117c6c54968e22e69b1ed8bbdaa28fbfb8 100755 (executable)
@@ -1,8 +1,8 @@
-/**
+/*!
  * \file
  * <!--
  * Copyright 2000 Bernardo Innocenti <bernie@codewiz.org>
- * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
  * All Rights Reserved.
  * -->
  *
 
 /*
  * $Log$
- * Revision 1.1  2004/05/23 18:10:11  bernie
- * Import drv/ modules.
- *
- * Revision 1.30  2004/05/19 17:06:11  bernie
- * Serial TX fill mode
- *
- * Revision 1.29  2004/05/16 19:16:46  aleph
- * Serial always transmitting, first try
- *
- * Revision 1.28  2004/05/14 12:09:00  aleph
- * Fix TX port pull-ups
- *
- * Revision 1.27  2004/05/08 13:56:02  aleph
- * Adapt avr serial driver to new design
- *
- * Revision 1.25  2004/04/28 13:42:16  aleph
- * Serial port fixes
- *
- * Revision 1.24  2004/04/08 14:17:27  bernie
- * Change serial to disable TX when not sending data
+ * Revision 1.2  2004/05/23 18:21:53  bernie
+ * Trim CVS logs and cleanup header info.
  *
- * Revision 1.23  2004/04/03 20:39:41  aleph
- * Remove strobe
- *
- * Revision 1.22  2004/03/29 17:01:02  aleph
- * Add function to set serial parity, fix it when ser_open is used
  */
 
 #include "ser.h"
@@ -76,14 +53,14 @@ struct AvrSerial
 
 #ifdef __AVR_ATmega103__
        /* Macro for ATmega103 compatibility */
-       #define UCSR0B UCR 
-       #define UDR0   UDR 
-       #define UCSR0A USR 
+       #define UCSR0B UCR
+       #define UDR0   UDR
+       #define UCSR0A USR
        #define UBRR0L UBRR
 #else
-       #define UCR  UCSR0B 
-       #define UDR  UDR0  
-       #define USR  UCSR0A 
+       #define UCR  UCSR0B
+       #define UDR  UDR0
+       #define USR  UCSR0A
 #endif
 
 
@@ -384,7 +361,7 @@ static void spi_starttx(UNUSED(struct SerialHardware *ctx))
        /* Send data only if the SPI is not already transmitting */
        if (!spi_sending && !fifo_isempty(&ser_handles[SER_SPI].txfifo))
        {
-               SPDR = fifo_pop(&ser_handles[SER_SPI].txfifo); 
+               SPDR = fifo_pop(&ser_handles[SER_SPI].txfifo);
                spi_sending = true;
        }
 
@@ -420,12 +397,12 @@ __interrupt void UART_TXC_interrupt(void)
 {
   UCSRB &= ~TXCIE;
   ReceiveMode();
-  UCSRB = RXCIE | RXEN | TXEN;  //Abilito l'Interrupt in ricezione e RX e TX  
+  UCSRB = RXCIE | RXEN | TXEN;  //Abilito l'Interrupt in ricezione e RX e TX
 }
 */
 
 
-static const struct SerialHardwareVT UART0_VT = 
+static const struct SerialHardwareVT UART0_VT =
 {
        .init = uart0_init,
        .cleanup = uart0_cleanup,
@@ -434,7 +411,7 @@ static const struct SerialHardwareVT UART0_VT =
        .enabletxirq = uart0_enabletxirq,
 };
 
-static const struct SerialHardwareVT UART1_VT = 
+static const struct SerialHardwareVT UART1_VT =
 {
        .init = uart1_init,
        .cleanup = uart1_cleanup,
@@ -443,7 +420,7 @@ static const struct SerialHardwareVT UART1_VT =
        .enabletxirq = uart1_enabletxirq,
 };
 
-static const struct SerialHardwareVT SPI_VT = 
+static const struct SerialHardwareVT SPI_VT =
 {
        .init = spi_init,
        .cleanup = spi_cleanup,
@@ -452,17 +429,17 @@ static const struct SerialHardwareVT SPI_VT =
 
 static struct AvrSerial UARTDescs[SER_CNT] =
 {
-       { 
-               .hw = { .table = &UART0_VT }, 
-       },
-       
-       { 
-               .hw = { .table = &UART1_VT }, 
-       },  
-
-       { 
-               .hw = { .table = &SPI_VT }, 
-       },  
+       {
+               .hw = { .table = &UART0_VT },
+       },
+
+       {
+               .hw = { .table = &UART1_VT },
+       },
+
+       {
+               .hw = { .table = &SPI_VT },
+       },
 };
 
 struct SerialHardware* ser_hw_getdesc(int unit)
index d2f1362041180fbed8d63d242a369dad190ca174..970a5c3db523097a1efe3c70dd1fb018526d9707 100755 (executable)
@@ -1,20 +1,30 @@
-/**
+/*!
  * \file
- * Copyright (C) 2003 Develer S.r.l. (http://www.develer.com/)
+ * <!--
+ * Copyright (C) 2003,2004 Develer S.r.l. (http://www.develer.com/)
  * All Rights Reserved.
+ * -->
  *
  * \version $Id$
  *
  * \author Stefano Fedrigo <aleph@develer.com>
+ * \author Giovanni Bajo <rasky@develer.com>
  *
  * \brief DSP5680x CPU specific serial I/O driver
  */
 
-#include <DSP56F807.H>
-#include <drv/kdebug.h>
-#include <hw.h>
+/*
+ * $Log$
+ * Revision 1.2  2004/05/23 18:21:53  bernie
+ * Trim CVS logs and cleanup header info.
+ *
+ */
+
 #include "ser.h"
 #include "ser_p.h"
+#include <drv/kdebug.h>
+#include <hw.h>
+#include <DSP56F807.H>
 
 // GPIO E is shared with SPI (in DSP56807). Pins 0&1 are TXD0 and RXD0. To use
 //  the serial, we need to disable the GPIO functions on them.
@@ -101,16 +111,16 @@ INLINE void rx_isr(struct SCI *hw)
 {
        volatile struct REG_SCI_STRUCT* regs = hw->regs;
 
-       hw->serial->status |= regs->SR & (SERRF_PARITYERROR | 
-                                         SERRF_RXSROVERRUN | 
-                                         SERRF_FRAMEERROR | 
+       hw->serial->status |= regs->SR & (SERRF_PARITYERROR |
+                                         SERRF_RXSROVERRUN |
+                                         SERRF_FRAMEERROR |
                                          SERRF_NOISEERROR);
-       
+
        if (fifo_isfull(&hw->serial->rxfifo))
                hw->serial->status |= SERRF_RXFIFOOVERRUN;
        else
                fifo_push(&hw->serial->rxfifo, regs->DR);
-               
+
        // Writing anything to the status register clear the
        //  error bits.
        regs->SR = 0;
@@ -124,10 +134,10 @@ static void init(struct SerialHardware* _hw, struct Serial* ser)
        // Clear status register (IRQ/status flags)
        (void)regs->SR;
        regs->SR = 0;
-       
+
        // Clear data register
        (void)regs->DR;
-       
+
        // Set priorities for both IRQs
        irq_setpriority(hw->irq_tx, IRQ_PRIORITY_SCI_TX);
        irq_setpriority(hw->irq_rx, IRQ_PRIORITY_SCI_RX);
@@ -135,7 +145,7 @@ static void init(struct SerialHardware* _hw, struct Serial* ser)
        // Activate the RX error interrupts, and RX/TX transmissions
        regs->CR = REG_SCI_CR_TE | REG_SCI_CR_RE;
        enable_rx_irq_bare(regs);
-       
+
        // Disable GPIO pins for TX and RX lines
        REG_GPIO_SERIAL->PER |= REG_GPIO_SERIAL_MASK;
 
@@ -176,19 +186,19 @@ static const struct SerialHardwareVT SCI_VT =
 
 static struct SCI SCIDescs[2] =
 {
-       { 
-               .hw = { .table = &SCI_VT }, 
-               .regs = &REG_SCI[0],
-               .irq_rx = IRQ_SCI0_RECEIVER_FULL,
-               .irq_tx = IRQ_SCI0_TRANSMITTER_READY,
-       },
-       
-       { 
-               .hw = { .table = &SCI_VT }, 
+       {
+               .hw = { .table = &SCI_VT },
+               .regs = &REG_SCI[0],
+               .irq_rx = IRQ_SCI0_RECEIVER_FULL,
+               .irq_tx = IRQ_SCI0_TRANSMITTER_READY,
+       },
+
+       {
+               .hw = { .table = &SCI_VT },
                .regs = &REG_SCI[1],
-               .irq_rx = IRQ_SCI1_RECEIVER_FULL,
-               .irq_tx = IRQ_SCI1_TRANSMITTER_READY,
-       },  
+               .irq_rx = IRQ_SCI1_RECEIVER_FULL,
+               .irq_tx = IRQ_SCI1_TRANSMITTER_READY,
+       },
 };
 
 
index 7225e867d60fb4633ddf9a598d133e6457d9397e..1a556acab39e91bdb8fb2b2ccc9196a0286432f1 100755 (executable)
@@ -1,8 +1,10 @@
-/**
+/*!
  * \file
- * Copyright (C) 2000 Bernardo Innocenti <bernie@codewiz.org>
+ * <!--
  * Copyright (C) 2003 Develer S.r.l. (http://www.develer.com/)
+ * Copyright (C) 2000 Bernardo Innocenti <bernie@codewiz.org>
  * All Rights Reserved.
+ * -->
  *
  * \version $Id$
  *
 
 /*
  * $Log$
- * Revision 1.1  2004/05/23 18:10:11  bernie
- * Import drv/ modules.
- *
- * Revision 1.1  2003/11/20 22:30:21  aleph
- * Add serial driver
+ * Revision 1.2  2004/05/23 18:21:53  bernie
+ * Trim CVS logs and cleanup header info.
  *
  */
 
index 14d2171047571aeb30ae39e401ea6dd202a72aac..4825bb86ab3a6f790eb561fe751dd1e66f379b6b 100755 (executable)
@@ -1,7 +1,9 @@
-/**
+/*!
  * \file
+ * <!--
  * Copyright (C) 2003,2004 Develer S.r.l. (http://www.develer.com/)
  * All Rights Reserved.
+ * -->
  *
  * \brief Hardware dependent serial driver (interface)
  *
 
 /*
  * $Log$
- * Revision 1.1  2004/05/23 18:10:11  bernie
- * Import drv/ modules.
- *
- * Revision 1.1  2004/05/14 12:47:26  rasky
- * Importato nuovo supporto seriale per AVR da Stefano
- *
- * Revision 1.3  2004/05/08 13:59:08  aleph
- * Fix header guard
- *
- * Revision 1.2  2004/05/08 13:58:36  aleph
- * Add log comment
+ * Revision 1.2  2004/05/23 18:21:53  bernie
+ * Trim CVS logs and cleanup header info.
  *
  */
 
-#ifndef _DRV_SER_P_H
-#define _DRV_SER_P_H
+#ifndef DRV_SER_P_H
+#define DRV_SER_P_H
 
 struct SerialHardware;
 struct Serial;
@@ -49,4 +42,4 @@ struct SerialHardware
 
 struct SerialHardware* ser_hw_getdesc(int unit);
 
-#endif // _DRV_SER_P_H
+#endif /* DRV_SER_P_H */