Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Io_moon by
BlynkDebug.cpp
00001 /** 00002 * @file BlynkDebug.cpp 00003 * @author Volodymyr Shymanskyy 00004 * @license This project is released under the MIT License (MIT) 00005 * @copyright Copyright (c) 2015 Volodymyr Shymanskyy 00006 * @date Jan 2015 00007 * @brief Debug utilities for Arduino 00008 */ 00009 00010 #include <Blynk/BlynkDebug.h> 00011 #include "mbed.h" 00012 00013 size_t BlynkFreeRam() 00014 { 00015 #if defined(__AVR__) 00016 extern int __heap_start, *__brkval; 00017 int v; 00018 return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval); 00019 #else 00020 return 0; 00021 #endif 00022 } 00023 00024 void BlynkReset() 00025 { 00026 void(*resetFunc)(void) = 0; 00027 resetFunc(); 00028 for(;;); // To make compiler happy 00029 } 00030 00031 void BlynkFatal() 00032 { 00033 wait_ms(10000L); 00034 BlynkReset(); 00035 } 00036
Generated on Tue Jul 19 2022 01:01:49 by
1.7.2
