serialserver/serialportcsy/ECUARTLOG.H
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Logging macros for ECUART. These use the Comms Debug / Flogger V2 Utility.
       
    15 // PLEASE NOTE: This file is new for C32 V2 but is included in both new and old C32 builds.
       
    16 // It is needed for the old builds to implement a cunning ruse so that all the new logging in ecuart.cpp
       
    17 // resolves to nothing for old builds and thus save having to configure the logging lines individually.
       
    18 // 
       
    19 //
       
    20 
       
    21 /**
       
    22  @file
       
    23  @internalComponent
       
    24 */
       
    25 #ifndef ECUARTLOG_H
       
    26 #define ECUARTLOG_H
       
    27 
       
    28 // has to be included to get correct "__FLOG_ACTIVE"
       
    29 #include <comms-infras/commsdebugutility.h>
       
    30 
       
    31 // logging code in ECUART is not configured, so configure it here!
       
    32 #if defined __FLOG_ACTIVE 
       
    33 
       
    34 #include "ECUART.H"
       
    35 #include "C32LOG.H"
       
    36 
       
    37 _LIT8(KC32ECUART,  "ECUART");
       
    38 
       
    39 class TECUARTLOG
       
    40 	{
       
    41 public:
       
    42 	static const TDesC8& CommFaultStr(const TCommFault& aFault);
       
    43 	
       
    44 	
       
    45 	};
       
    46 
       
    47 #define LOGECUART(A)                  C32LOG1(KC32ECUART,(A))
       
    48 #define LOGECUART1(A)                 C32LOG1(KC32ECUART,(A))
       
    49 #define LOGECUART2(A,B)               C32LOG2(KC32ECUART,(A),(B))
       
    50 #define LOGECUART3(A,B,C)             C32LOG3(KC32ECUART,(A),(B),(C))
       
    51 #define LOGECUART4(A,B,C,D)           C32LOG4(KC32ECUART,(A),(B),(C),(D))
       
    52 #define LOGECUART5(A,B,C,D,E)         C32LOG5(KC32ECUART,(A),(B),(C),(D),(E))
       
    53 #define LOGECUART6(A,B,C,D,E,F)       C32LOG6(KC32ECUART,(A),(B),(C),(D),(E),(F))
       
    54 #define LOGECUART7(A,B,C,D,E,F,G)     C32LOG7(KC32ECUART,(A),(B),(C),(D),(E),(F),(G))
       
    55 #define LOGECUART8(A,B,C,D,E,F,G,H)   C32LOG8(KC32ECUART,(A),(B),(C),(D),(E),(F),(G),(H))
       
    56 
       
    57 #define LOGECUART_LOGGING_ACTIVE
       
    58 #else  // __FLOG_ACTIVE && SYMBIAN_C32_SERCOMMS_V2
       
    59 
       
    60 #define LOGECUART(A)
       
    61 #define LOGECUART1(A)
       
    62 #define LOGECUART2(A,B)
       
    63 #define LOGECUART3(A,B,C)
       
    64 #define LOGECUART4(A,B,C,D)
       
    65 #define LOGECUART5(A,B,C,D,E)
       
    66 #define LOGECUART6(A,B,C,D,E,F)
       
    67 #define LOGECUART7(A,B,C,D,E,F,G)
       
    68 #define LOGECUART8(A,B,C,D,E,F,G,H)
       
    69 
       
    70 #define LOGECUART_STMT(S)
       
    71 
       
    72 #endif	//__FLOG_ACTIVE && SYMBIAN_C32_SERCOMMS_V2
       
    73 
       
    74 #endif  // ECUARTLOG_H