eBoard ๐Ÿ‰  โ‘ โ‘งโ‘จ
Written for SIA 2017/2018
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
#define PIN_MOTOR_SPE
Definition: eBoard.h:427
#define PIN_BLUETOOTH_RX
Definition: eBoard.h:399
void __assert(const char *__func, const char *__file, optVAL_t __lineno, const char *__sexp)
[DEBUG_MODE] custom assert message
#define PIN_MOTOR_DIR
Definition: eBoard.h:420
#define PIN_BLUETOOTH_TX
Definition: eBoard.h:410
int optVAL_t
Definition: eBoard.h:196