dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_debug.h
Go to the documentation of this file.
1 
15 /*
16  * This program is free software; you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation; either version 3 of the License, or
19  * (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful, but
22  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24  * for more details.
25  *
26  * You should have received a copy of the GNU General Public License along
27  * with this program; if not, see <http://www.gnu.org/licenses/>
28  */
29 
30 #ifndef PIOS_DEBUG_H
31 #define PIOS_DEBUG_H
32 
33 #include <stdlib.h>
34 #include <assert.h>
35 
36 extern const char *PIOS_DEBUG_AssertMsg;
37 
38 void PIOS_DEBUG_Init(void);
39 void PIOS_DEBUG_PinHigh(uint8_t pin);
40 void PIOS_DEBUG_PinLow(uint8_t pin);
41 void PIOS_DEBUG_PinValue8Bit(uint8_t value);
42 void PIOS_DEBUG_PinValue4BitL(uint8_t value);
43 void PIOS_DEBUG_Panic(const char *msg);
44 
45 #define PIOS_Assert(test) assert(test)
46 
47 #ifdef DEBUG
48 #define PIOS_DEBUG_Assert(test) PIOS_Assert(test)
49 #else
50 #define PIOS_DEBUG_Assert(test)
51 #endif
52 
53 #define PIOS_Abort() abort()
54 
55 #endif /* PIOS_DEBUG_H */
56 
void PIOS_DEBUG_PinValue8Bit(uint8_t value)
Definition: pios_debug.c:62
void PIOS_DEBUG_PinHigh(uint8_t pin)
Definition: pios_debug.c:49
const char * PIOS_DEBUG_AssertMsg
Definition: pios_debug.c:34
void PIOS_DEBUG_Init(const struct pios_tim_channel *channels, uint8_t num_channels)
Definition: pios_debug.c:44
void PIOS_DEBUG_PinLow(uint8_t pin)
Definition: pios_debug.c:57
uint16_t value
Definition: storm32bgc.c:155
void PIOS_DEBUG_PinValue4BitL(uint8_t value)
Definition: pios_debug.c:66
void PIOS_DEBUG_Panic(const char *msg) __attribute__((noreturn))
Definition: pios_debug.c:74