Graphics framework for GR-PEACH. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

Dependents:   ImageZoomInout_Sample ImageRotaion_Sample ImageScroll_Sample GR-PEACH_LCD_4_3inch_Save_to_USB ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ncg_debug.h Source File

ncg_debug.h

00001 /******************************************************************************
00002 * Copyright(c) 2010-2012 Renesas Electronics Corporation. All rights reserved.
00003 *
00004 * brief  : NCG debug header.
00005 *
00006 * author : Renesas Electronics Corporation
00007 *
00008 * history: 2010.10.08
00009 *          - Created the initial code.
00010 *          2012.08.21
00011 *          - Added debugging messase function.
00012 *          2012.08.22
00013 *          - Updated coding format.
00014 *          - Added debug macro.
00015 *            - NCG_DEBUG_MAKE_MSG
00016 *            - NCG_DEBUG_PRINT_MSG
00017 *          2013.01.08
00018 *            - Fixed release code.
00019 *
00020 *******************************************************************************/
00021 
00022 #ifndef NCG_DEBUG_H
00023 #define NCG_DEBUG_H
00024 
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 /*-----------------------------------------------------------------------------------*/
00030 #ifdef NCG_DEBUG
00031 /*-----------------------------------------------------------------------------------*/
00032 
00033 #include <stdio.h>
00034 #include <stdlib.h>
00035 
00036 #define NCG_ASSERT(EXPR)                            if (!(EXPR)) { NCGSYS_Abort(__FILE__, __LINE__, #EXPR); }
00037 
00038 #define NCG_DEBUG_MAKE_MSG_START( buff, format )    sprintf( (buff), format
00039 #define NCG_DEBUG_MAKE_MSG_PARAMETER( param )           , (param)
00040 #define NCG_DEBUG_MAKE_MSG_END(  )                  )
00041 #define NCG_DEBUG_PRINT_MSG( msg )                  printf( msg )
00042 
00043 #ifdef NCG_DEBUG_API_LOG
00044 
00045 #define NCG_DEBUG_PRINT_STRING( msg )               printf( "%s%s", (msg), NCG_CRLF )
00046 
00047 #else /* #ifdef NCG_DEBUG_API_LOG */
00048 
00049 #define NCG_DEBUG_PRINT_STRING( msg )               /* No process */
00050 
00051 #endif /* #ifdef NCG_DEBUG_API_LOG */
00052 
00053 #define NCG_DEBUG_MSG_BUFFER_SIZE                   512
00054 
00055 #define NCG_CRLF                                    "\n"
00056 
00057 extern void NCGSYS_Abort(const NCGchar *filename, NCGint32 line, const NCGchar *condition);
00058 
00059 extern char NCG_G_MASSAGE_BUFF[NCG_DEBUG_MSG_BUFFER_SIZE];
00060 
00061 /*-----------------------------------------------------------------------------------*/
00062 #else   /* NCG_DEBUG */
00063 /*-----------------------------------------------------------------------------------*/
00064 
00065 #define NCG_ASSERT(EXPR)                                /* No process */
00066 #define NCG_DEBUG_MAKE_MSG_START( buff, format )        /* No process */
00067 #define NCG_DEBUG_MAKE_MSG_PARAMETER( param )           /* No process */
00068 #define NCG_DEBUG_MAKE_MSG_END(  )                      /* No process */
00069 #define NCG_DEBUG_PRINT_MSG( msg )                      /* No process */
00070 
00071 #define NCG_DEBUG_PRINT_STRING( msg )                   /* No process */
00072 
00073 /*-----------------------------------------------------------------------------------*/
00074 #endif  /* NCG_DEBUG */
00075 /*-----------------------------------------------------------------------------------*/
00076 
00077 #ifdef __cplusplus
00078 }
00079 #endif
00080 
00081 #endif /* NCG_DEBUG_H */