1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Changed PIOS_DEBUG_Panic()

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@694 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
fredericg 2010-05-31 16:22:58 +00:00 committed by fredericg
parent 17f6646f6e
commit a2beb49257
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@
#include "pios.h"
// Global variables
const uint8_t* PIOS_DEBUG_AssertMsg = (uint8_t*)"ASSERT FAILED";
const char* PIOS_DEBUG_AssertMsg = "ASSERT FAILED";
/* Private Function Prototypes */
@ -89,7 +89,7 @@ void PIOS_DEBUG_PinLow(uint8_t Pin)
/**
* Report a serious error and halt
*/
void PIOS_DEBUG_Panic(const uint8_t* msg)
void PIOS_DEBUG_Panic(const char* msg)
{
register int *lr asm ("lr"); // Link-register holds the PC of the caller

View File

@ -26,12 +26,12 @@
#ifndef PIOS_DEBUG_H
#define PIOS_DEBUG_H
extern const uint8_t* PIOS_DEBUG_AssertMsg;
extern const char* PIOS_DEBUG_AssertMsg;
void PIOS_DEBUG_Init(void);
void PIOS_DEBUG_PinHigh(uint8_t pin);
void PIOS_DEBUG_PinLow(uint8_t pin);
void PIOS_DEBUG_Panic(const uint8_t* msg);
void PIOS_DEBUG_Panic(const char* msg);
#ifdef DEBUG
#define PIOS_DEBUG_Assert(test) if (!(test)) PIOS_DEBUG_Panic(PIOS_DEBUG_AssertMsg);