summaryrefslogtreecommitdiffstats
path: root/mcc_generated_files/mcc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mcc_generated_files/mcc.c (renamed from mcc_generated_files/mcc.cpp)18
1 files changed, 11 insertions, 7 deletions
diff --git a/mcc_generated_files/mcc.cpp b/mcc_generated_files/mcc.c
index 3d34379..7f3a675 100644
--- a/mcc_generated_files/mcc.cpp
+++ b/mcc_generated_files/mcc.c
@@ -80,7 +80,11 @@
#pragma config BWP = OFF // Boot Flash Write Protect bit->Protection Disabled
#pragma config CP = OFF // Code Protect->Protection Disabled
-#include "mcc.hpp"
+#include "mcc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
@Summary
@@ -90,7 +94,7 @@
This array identifies the cause for exception.
*/
-static char *cause[] =
+static const char *cause[] =
{
"Interrupt", "Undefined", "Undefined", "Undefined",
"Load/fetch address error", "Store address error",
@@ -140,17 +144,17 @@ void _general_exception_handler ()
Refer to the MIPs Software User's manual */
uint8_t _excep_code;
uint8_t _excep_addr;
- uint8_t *_cause_str;
+ const uint8_t *_cause_str;
_excep_code = (_CP0_GET_CAUSE() & 0x0000007C) >> 2;
_excep_addr = _CP0_GET_EPC();
- _cause_str = reinterpret_cast<uint8_t*>(cause[_excep_code]);
+ _cause_str = cause[_excep_code];
while(1) {
}
}
-/**
- End of File
-*/ \ No newline at end of file
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file