eBoard ๐
โ โงโจ
Written for SIA 2017/2018
Main Page
Pages
Tutorials
Namespaces
Classes
Files
File List
File Members
eagle_Assert.h
Go to the documentation of this file.
1
#ifndef EAGLE_EBOARD_HELPLIB_ASSERT
2
#define EAGLE_EBOARD_HELPLIB_ASSERT
3
4
#include <assert.h>
22
void
__assert
(
const
char
*__func,
const
char
*__file,
optVAL_t
__lineno,
const
char
*__sexp);
24
void
__assert
(
const
char
*__func,
const
char
*__file,
optVAL_t
__lineno,
const
char
*__sexp){
25
Serial.print(
"Error with: "
); Serial.print(__func);
26
Serial.print(
" in "
); Serial.print(__file);
27
Serial.print(
" >>"
);
28
Serial.println(__sexp);
29
if
(strcmp(__func,
"checkIdx"
)==0){
30
Serial.println(
" This happens if an out of bounds exception"
);
31
Serial.println(
" has occured. Following pins shouldn't be used:"
);
32
Serial.print(
" D"
+
PIN_BLUETOOTH_RX
);Serial.print(
"&"
);
33
Serial.print(
"D"
);Serial.print(
PIN_BLUETOOTH_TX
);
34
Serial.println(
" : Used for Bluetooth communication"
);
35
Serial.print(
" D"
);Serial.print(
PIN_MOTOR_DIR
);Serial.print(
"&"
);
36
Serial.print(
"D"
);Serial.print(
PIN_MOTOR_SPE
);
37
Serial.println(
" : Used for main motor control"
);
38
#if EBOARD_USE_SPI > 0x0
39
Serial.print(
" D10-13"
);
40
Serial.println(
": Used for smart-servo-shield"
);
41
#endif
42
}
else
if
(strcmp(__func,
"readPin"
)==0){
43
Serial.println(
"You've tried to access an analogPin that isn't present on the board you're currently working on!"
);
44
}
45
Serial.flush();
46
abort();
// halt after outputting information
47
}
48
50
#endif
PIN_MOTOR_SPE
#define PIN_MOTOR_SPE
Definition:
eBoard.h:427
PIN_BLUETOOTH_RX
#define PIN_BLUETOOTH_RX
Definition:
eBoard.h:399
__assert
void __assert(const char *__func, const char *__file, optVAL_t __lineno, const char *__sexp)
[DEBUG_MODE] custom assert message
PIN_MOTOR_DIR
#define PIN_MOTOR_DIR
Definition:
eBoard.h:420
PIN_BLUETOOTH_TX
#define PIN_BLUETOOTH_TX
Definition:
eBoard.h:410
optVAL_t
int optVAL_t
Definition:
eBoard.h:196
eBoard
source
eagle_Assert.h
[WIP-BUILD]
EagleoutIce
19.04.2018 16:49:12