Previous version which works for my stm32f401 Nucleo board

Fork of X_NUCLEO_IDB0XA1 by ST

Committer:
Wolfgang Betz
Date:
Tue Oct 06 12:12:37 2015 +0200
Revision:
128:46ae62a90136
Parent:
70:d20d30f59b1c
Merge branch 'master' of hg::http://wobetz@developer.mbed.org/teams/ST/code/X_NUCLEO_IDB0XA1 into idb0xa1-split

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Silvio Lucio Oliva 70:d20d30f59b1c 1 /**
Silvio Lucio Oliva 70:d20d30f59b1c 2 ******************************************************************************
Silvio Lucio Oliva 70:d20d30f59b1c 3 * @file debug.h
Silvio Lucio Oliva 70:d20d30f59b1c 4 * @author CL
Silvio Lucio Oliva 70:d20d30f59b1c 5 * @version V1.0.0
Silvio Lucio Oliva 70:d20d30f59b1c 6 * @date 04-July-2014
Silvio Lucio Oliva 70:d20d30f59b1c 7 * @brief This file defines print functions for debug purposes.
Silvio Lucio Oliva 70:d20d30f59b1c 8 ******************************************************************************
Silvio Lucio Oliva 70:d20d30f59b1c 9 * @attention
Silvio Lucio Oliva 70:d20d30f59b1c 10 *
Silvio Lucio Oliva 70:d20d30f59b1c 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
Silvio Lucio Oliva 70:d20d30f59b1c 12 *
Silvio Lucio Oliva 70:d20d30f59b1c 13 * Redistribution and use in source and binary forms, with or without modification,
Silvio Lucio Oliva 70:d20d30f59b1c 14 * are permitted provided that the following conditions are met:
Silvio Lucio Oliva 70:d20d30f59b1c 15 * 1. Redistributions of source code must retain the above copyright notice,
Silvio Lucio Oliva 70:d20d30f59b1c 16 * this list of conditions and the following disclaimer.
Silvio Lucio Oliva 70:d20d30f59b1c 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Silvio Lucio Oliva 70:d20d30f59b1c 18 * this list of conditions and the following disclaimer in the documentation
Silvio Lucio Oliva 70:d20d30f59b1c 19 * and/or other materials provided with the distribution.
Silvio Lucio Oliva 70:d20d30f59b1c 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Silvio Lucio Oliva 70:d20d30f59b1c 21 * may be used to endorse or promote products derived from this software
Silvio Lucio Oliva 70:d20d30f59b1c 22 * without specific prior written permission.
Silvio Lucio Oliva 70:d20d30f59b1c 23 *
Silvio Lucio Oliva 70:d20d30f59b1c 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Silvio Lucio Oliva 70:d20d30f59b1c 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Silvio Lucio Oliva 70:d20d30f59b1c 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Silvio Lucio Oliva 70:d20d30f59b1c 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Silvio Lucio Oliva 70:d20d30f59b1c 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Silvio Lucio Oliva 70:d20d30f59b1c 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Silvio Lucio Oliva 70:d20d30f59b1c 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Silvio Lucio Oliva 70:d20d30f59b1c 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Silvio Lucio Oliva 70:d20d30f59b1c 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Silvio Lucio Oliva 70:d20d30f59b1c 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Silvio Lucio Oliva 70:d20d30f59b1c 34 *
Silvio Lucio Oliva 70:d20d30f59b1c 35 ******************************************************************************
Silvio Lucio Oliva 70:d20d30f59b1c 36 */
Silvio Lucio Oliva 70:d20d30f59b1c 37
Silvio Lucio Oliva 70:d20d30f59b1c 38 /* Define to prevent recursive inclusion -------------------------------------*/
Silvio Lucio Oliva 70:d20d30f59b1c 39 #ifndef __DEBUG_H
Silvio Lucio Oliva 70:d20d30f59b1c 40 #define __DEBUG_H
Silvio Lucio Oliva 70:d20d30f59b1c 41
Silvio Lucio Oliva 70:d20d30f59b1c 42 #ifdef __cplusplus
Silvio Lucio Oliva 70:d20d30f59b1c 43 extern "C" {
Silvio Lucio Oliva 70:d20d30f59b1c 44 #endif
Silvio Lucio Oliva 70:d20d30f59b1c 45
Silvio Lucio Oliva 70:d20d30f59b1c 46 /* Includes ------------------------------------------------------------------*/
Silvio Lucio Oliva 70:d20d30f59b1c 47 #include <string.h>
Silvio Lucio Oliva 70:d20d30f59b1c 48
Silvio Lucio Oliva 70:d20d30f59b1c 49 /* Exported macro ------------------------------------------------------------*/
Silvio Lucio Oliva 70:d20d30f59b1c 50 //#define DEBUG
Silvio Lucio Oliva 70:d20d30f59b1c 51 #ifdef DEBUG
Silvio Lucio Oliva 70:d20d30f59b1c 52 #include <stdio.h>
Silvio Lucio Oliva 70:d20d30f59b1c 53 #define PRINTF(...) printf(__VA_ARGS__)
Silvio Lucio Oliva 70:d20d30f59b1c 54 #else
Silvio Lucio Oliva 70:d20d30f59b1c 55 #define PRINTF(...)
Silvio Lucio Oliva 70:d20d30f59b1c 56 #endif
Silvio Lucio Oliva 70:d20d30f59b1c 57
Silvio Lucio Oliva 70:d20d30f59b1c 58 /* Print the data travelling over the SPI in the .csv format for the GUI*/
Silvio Lucio Oliva 70:d20d30f59b1c 59 //#define PRINT_CSV_FORMAT
Silvio Lucio Oliva 70:d20d30f59b1c 60 #ifdef PRINT_CSV_FORMAT
Silvio Lucio Oliva 70:d20d30f59b1c 61 #include <stdio.h>
Silvio Lucio Oliva 70:d20d30f59b1c 62 #define PRINT_CSV(...) printf(__VA_ARGS__)
Silvio Lucio Oliva 70:d20d30f59b1c 63 #else
Silvio Lucio Oliva 70:d20d30f59b1c 64 #define PRINT_CSV(...)
Silvio Lucio Oliva 70:d20d30f59b1c 65 #endif
Silvio Lucio Oliva 70:d20d30f59b1c 66
Silvio Lucio Oliva 70:d20d30f59b1c 67 #ifdef __cplusplus
Silvio Lucio Oliva 70:d20d30f59b1c 68 }
Silvio Lucio Oliva 70:d20d30f59b1c 69 #endif
Silvio Lucio Oliva 70:d20d30f59b1c 70
Silvio Lucio Oliva 70:d20d30f59b1c 71 #endif /* __DEBUG_H */
Silvio Lucio Oliva 70:d20d30f59b1c 72
Silvio Lucio Oliva 70:d20d30f59b1c 73 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/