Changeset 557


Ignore:
Timestamp:
Jul 27, 2011, 8:23:54 PM (14 years ago)
Author:
rudi
Message:

Avoid some warnings

Location:
cmedia/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cmedia/trunk/Cmpci/cmpci.c

    r556 r557  
    452452#endif
    453453
    454 int     prog_dmabuf(struct cm_state *s, unsigned rec);
    455 void    update_mixer(struct cm_state *s);
    456 void    set_device_state(struct cm_state *s);
     454__static__ int  prog_dmabuf(struct cm_state *s, unsigned rec);
     455__static__ void update_mixer(struct cm_state *s);
    457456
    458457
     
    546545  void maskw(unsigned short addr, unsigned mask, unsigned value);
    547546  #pragma aux maskw =                   \
     547     "xor eax, eax"                     \
    548548     "in ax, dx"                        \
    549549     "and eax, ecx"                     \
     
    569569     modify exact nomemory [ecx]        \
    570570     value [cl];
     571
     572  void  set_device_state(struct cm_state *s);
    571573
    572574#endif
  • cmedia/trunk/Lib32/debug.c

    r354 r557  
    5151static char hextab[]="0123456789ABCDEF";
    5252
    53 
     53#ifdef DEBUG
     54#define       MAGIC_COMM_PORT 0x3f8           // pulled from word ptr 40:0
     55//#define         MAGIC_COMM_PORT 0x2f8           // pulled from word ptr 40:0
     56
     57
     58#define UART_DATA               0x00            // UART Data port
     59#define UART_INT_ENAB           0x01            // UART Interrupt enable
     60#define UART_INT_ID             0x02            // interrupt ID
     61#define UART_LINE_CTRL          0x03            // line control registers
     62#define UART_MODEM_CTRL         0x04            // modem control register
     63#define UART_LINE_STAT          0x05            // line status register
     64#define UART_MODEM_STAT         0x06            // modem status regiser
     65#define UART_DIVISOR_LO         0x00            // divisor latch least sig
     66#define UART_DIVISOR_HI         0x01h           // divisor latch most sig
     67
     68#define DELAY   nop
     69#endif
     70
     71#ifdef DEBUG                            //--------------------------- CharOut -
     72void CharOut(char c)
     73{
     74        _asm    {
     75
     76        mov     dx, MAGIC_COMM_PORT     // address of PS/2's first COM port
     77        add     dx, UART_LINE_STAT
     78
     79ReadyCheck:
     80        in      al, dx                                                          // wait for comm port ready signal
     81
     82        DELAY
     83        DELAY
     84        DELAY
     85
     86        test    al, 020h
     87        jz      ReadyCheck
     88
     89        // Send the character
     90
     91        add     dx, UART_DATA - UART_LINE_STAT
     92        mov     al,c
     93        out     dx, al
     94
     95        DELAY
     96        DELAY
     97        DELAY
     98        }
     99}
     100#endif
     101
     102#ifdef DEBUG                            //------------------------- StringOut -
     103void StringOut(char *DbgStr)
     104{
     105   while (*DbgStr)
     106      CharOut(*DbgStr++);
     107
     108   if (fLineTerminate)
     109   {
     110      CharOut(CR);                              // append carriage return,
     111      CharOut(LF);                              // linefeed
     112   }
     113}
     114#endif
    54115                                        //-------------------- DecLongToASCII -
    55116char * DecLongToASCII(char *StrPtr, ULONG lDecVal, USHORT Option)
     
    334395}
    335396
    336 #ifdef DEBUG                            //------------------------- StringOut -
    337 void StringOut(char *DbgStr)
    338 {
    339    while (*DbgStr)
    340       CharOut(*DbgStr++);
    341 
    342    if (fLineTerminate)
    343    {
    344       CharOut(CR);                              // append carriage return,
    345       CharOut(LF);                              // linefeed
    346    }
    347 }
    348 #endif
    349 
    350 #ifdef DEBUG
    351 #define       MAGIC_COMM_PORT 0x3f8           // pulled from word ptr 40:0
    352 //#define         MAGIC_COMM_PORT 0x2f8           // pulled from word ptr 40:0
    353 
    354 
    355 #define UART_DATA               0x00            // UART Data port
    356 #define UART_INT_ENAB           0x01            // UART Interrupt enable
    357 #define UART_INT_ID             0x02            // interrupt ID
    358 #define UART_LINE_CTRL          0x03            // line control registers
    359 #define UART_MODEM_CTRL         0x04            // modem control register
    360 #define UART_LINE_STAT          0x05            // line status register
    361 #define UART_MODEM_STAT         0x06            // modem status regiser
    362 #define UART_DIVISOR_LO         0x00            // divisor latch least sig
    363 #define UART_DIVISOR_HI         0x01h           // divisor latch most sig
    364 
    365 #define DELAY   nop
    366 #endif
    367 
    368 #ifdef DEBUG                            //--------------------------- CharOut -
    369 void CharOut(char c)
    370 {
    371         _asm    {
    372 
    373         mov     dx, MAGIC_COMM_PORT     // address of PS/2's first COM port
    374         add     dx, UART_LINE_STAT
    375 
    376 ReadyCheck:
    377         in      al, dx                                                          // wait for comm port ready signal
    378 
    379         DELAY
    380         DELAY
    381         DELAY
    382 
    383         test    al, 020h
    384         jz      ReadyCheck
    385 
    386         // Send the character
    387 
    388         add     dx, UART_DATA - UART_LINE_STAT
    389         mov     al,c
    390         out     dx, al
    391 
    392         DELAY
    393         DELAY
    394         DELAY
    395         }
    396 }
    397 #endif
Note: See TracChangeset for help on using the changeset viewer.