Andriy Makukha / Mbed 2 deprecated football_project_wo_output

Dependencies:   mbed

Fork of football_project by MZJ

Committer:
elmbed
Date:
Tue Nov 03 07:05:15 2015 +0000
Revision:
17:d8b901d791fd
Child:
18:affef3a7db2a
Removed the inter device radio link, sending data to phone causes crash

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elmbed 17:d8b901d791fd 1 #include "TA.h"
elmbed 17:d8b901d791fd 2 #include <nrf51.h>
elmbed 17:d8b901d791fd 3 #include <mbed.h>
elmbed 17:d8b901d791fd 4 #include <device.h>
elmbed 17:d8b901d791fd 5 #include <vector>
elmbed 17:d8b901d791fd 6
elmbed 17:d8b901d791fd 7 /* !SR
elmbed 17:d8b901d791fd 8 * Can't find any boards which use the nrf51822 and have analog output enabled. Currently
elmbed 17:d8b901d791fd 9 * all analog stuff has been commented out.
elmbed 17:d8b901d791fd 10 */
elmbed 17:d8b901d791fd 11
elmbed 17:d8b901d791fd 12 #define NEED_CONSOLE_OUTPUT 1 /* Set this if you need //////////////////////DEBUG messages on the console;
elmbed 17:d8b901d791fd 13 * it will have an impact on code-size and power consumption. */
elmbed 17:d8b901d791fd 14
elmbed 17:d8b901d791fd 15 #define LOOPBACK_MODE 0 // Loopback mode
elmbed 17:d8b901d791fd 16
elmbed 17:d8b901d791fd 17 #if NEED_CONSOLE_OUTPUT
elmbed 17:d8b901d791fd 18 #define DEBUG(...) { printf(__VA_ARGS__); }
elmbed 17:d8b901d791fd 19 #else
elmbed 17:d8b901d791fd 20 #define DEBUG(...) /* nothing */
elmbed 17:d8b901d791fd 21 #endif /* #if NEED_CONSOLE_OUTPUT */
elmbed 17:d8b901d791fd 22
elmbed 17:d8b901d791fd 23
elmbed 17:d8b901d791fd 24 extern unsigned long millis();
elmbed 17:d8b901d791fd 25 extern unsigned long micros();
elmbed 17:d8b901d791fd 26 extern int random(int numberone, int numbertwo);
elmbed 17:d8b901d791fd 27
elmbed 17:d8b901d791fd 28 ByteBuffer TA::send_buffer;
elmbed 17:d8b901d791fd 29 ByteBuffer TA::receive_buffer;
elmbed 17:d8b901d791fd 30
elmbed 17:d8b901d791fd 31 uint8_t TA::node_id;// 1 //network ID used for this unit
elmbed 17:d8b901d791fd 32 uint8_t TA::network_id;// 99 //network ID used for this network
elmbed 17:d8b901d791fd 33 uint8_t TA::gateway_id;// 1 //the ID of the network controller
elmbed 17:d8b901d791fd 34 uint8_t TA::ack_time;// 50 // # of ms to wait for an ack
elmbed 17:d8b901d791fd 35
elmbed 17:d8b901d791fd 36 //encryption is OPTIONAL
elmbed 17:d8b901d791fd 37 //to enable encryption you will need to:
elmbed 17:d8b901d791fd 38 // - provide a 16-byte encryption KEY (same on all nodes that talk encrypted)
elmbed 17:d8b901d791fd 39 // - to call .Encrypt(KEY) to start encrypting
elmbed 17:d8b901d791fd 40 // - to stop encrypting call .Encrypt(NULL)
elmbed 17:d8b901d791fd 41 uint8_t TA::KEY[] = "ABCDABCDABCDABCD";
elmbed 17:d8b901d791fd 42 uint16_t TA::interPacketDelay;// = 1000; //wait this many ms between sending packets
elmbed 17:d8b901d791fd 43
elmbed 17:d8b901d791fd 44 // Need an instance of the Radio Module
elmbed 17:d8b901d791fd 45 //byte TA::sendSize;//=0;
elmbed 17:d8b901d791fd 46 //char TA::payload[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
elmbed 17:d8b901d791fd 47 //bool TA::requestACK;//=true;
elmbed 17:d8b901d791fd 48
elmbed 17:d8b901d791fd 49 //neopixels_spi TA::neopixels;
elmbed 17:d8b901d791fd 50
elmbed 17:d8b901d791fd 51
elmbed 17:d8b901d791fd 52 unsigned long millis();
elmbed 17:d8b901d791fd 53
elmbed 17:d8b901d791fd 54 unsigned long micros();
elmbed 17:d8b901d791fd 55
elmbed 17:d8b901d791fd 56
elmbed 17:d8b901d791fd 57 /** Macro for min()
elmbed 17:d8b901d791fd 58 *
elmbed 17:d8b901d791fd 59 * @param any
elmbed 17:d8b901d791fd 60 */
elmbed 17:d8b901d791fd 61 #define min(a,b) ((a)<(b)?(a):(b))
elmbed 17:d8b901d791fd 62 /** Macro for max()
elmbed 17:d8b901d791fd 63 *
elmbed 17:d8b901d791fd 64 * @param any
elmbed 17:d8b901d791fd 65 */
elmbed 17:d8b901d791fd 66 #define max(a,b) ((a)>(b)?(a):(b))
elmbed 17:d8b901d791fd 67
elmbed 17:d8b901d791fd 68 /** generates a random number between two numbers
elmbed 17:d8b901d791fd 69 *
elmbed 17:d8b901d791fd 70 * @param numberone minimum value for random number
elmbed 17:d8b901d791fd 71 * @param numbertwo maximum value for random number
elmbed 17:d8b901d791fd 72 */
elmbed 17:d8b901d791fd 73 int random(int numberone, int numbertwo) {
elmbed 17:d8b901d791fd 74 int random = 0;
elmbed 17:d8b901d791fd 75 if ((numberone < 0) && (numbertwo < 0)) {
elmbed 17:d8b901d791fd 76 numberone = numberone * -1;
elmbed 17:d8b901d791fd 77 numbertwo = numbertwo * -1;
elmbed 17:d8b901d791fd 78 random = -1 * (rand()%(numberone + numbertwo));
elmbed 17:d8b901d791fd 79 }
elmbed 17:d8b901d791fd 80 if ((numbertwo < 0) && (numberone >= 0)) {
elmbed 17:d8b901d791fd 81 numbertwo = numbertwo * -1;
elmbed 17:d8b901d791fd 82 random = (rand()%(numberone + numbertwo)) - numbertwo;
elmbed 17:d8b901d791fd 83 }
elmbed 17:d8b901d791fd 84 if ((numberone < 0) && (numbertwo >= 0)) {
elmbed 17:d8b901d791fd 85 numberone = numberone * -1;
elmbed 17:d8b901d791fd 86 random = (rand()%(numberone + numbertwo)) - numberone;
elmbed 17:d8b901d791fd 87 } else {
elmbed 17:d8b901d791fd 88 random = (rand()%(numberone + numbertwo)) - min(numberone, numbertwo);
elmbed 17:d8b901d791fd 89 }
elmbed 17:d8b901d791fd 90 return random;
elmbed 17:d8b901d791fd 91 }
elmbed 17:d8b901d791fd 92
elmbed 17:d8b901d791fd 93 // ########## End code taken from audrino library ##########
elmbed 17:d8b901d791fd 94
elmbed 17:d8b901d791fd 95 uint8_t TA::mask;
elmbed 17:d8b901d791fd 96
elmbed 17:d8b901d791fd 97 // outputs
elmbed 17:d8b901d791fd 98 //uint8_t TA::buzzPin;
elmbed 17:d8b901d791fd 99 uint8_t TA::red;
elmbed 17:d8b901d791fd 100 uint8_t TA::green;
elmbed 17:d8b901d791fd 101 uint8_t TA::blue;
elmbed 17:d8b901d791fd 102
elmbed 17:d8b901d791fd 103 neopixel_strip_t m_strip;
elmbed 17:d8b901d791fd 104
elmbed 17:d8b901d791fd 105 uint8_t dig_pin_num = 16;
elmbed 17:d8b901d791fd 106 uint8_t leds_per_strip = 18;
elmbed 17:d8b901d791fd 107 uint8_t led_to_enable = 1;
elmbed 17:d8b901d791fd 108
elmbed 17:d8b901d791fd 109 #if 0
elmbed 17:d8b901d791fd 110 DigitalOut TA::enable_1(p4);
elmbed 17:d8b901d791fd 111 DigitalOut TA::enable_2(p7);
elmbed 17:d8b901d791fd 112 DigitalOut TA::enable_3(p8);
elmbed 17:d8b901d791fd 113
elmbed 17:d8b901d791fd 114
elmbed 17:d8b901d791fd 115 DigitalOut TA::cap_enable(A3);
elmbed 17:d8b901d791fd 116 #endif
elmbed 17:d8b901d791fd 117 DigitalOut TA::buzzPin(p20);
elmbed 17:d8b901d791fd 118
elmbed 17:d8b901d791fd 119 #if 0
elmbed 17:d8b901d791fd 120 // inputs
elmbed 17:d8b901d791fd 121 DigitalIn TA::touch_1(A0);
elmbed 17:d8b901d791fd 122 DigitalIn TA::touch_2(A1);
elmbed 17:d8b901d791fd 123 DigitalIn TA::touch_3(A2);
elmbed 17:d8b901d791fd 124 #endif
elmbed 17:d8b901d791fd 125
elmbed 17:d8b901d791fd 126 std::vector<Message*> *messages;
elmbed 17:d8b901d791fd 127
elmbed 17:d8b901d791fd 128 TA::TA()
elmbed 17:d8b901d791fd 129 {
elmbed 17:d8b901d791fd 130 neopixel_init(&m_strip, dig_pin_num, leds_per_strip);
elmbed 17:d8b901d791fd 131 neopixel_clear(&m_strip);
elmbed 17:d8b901d791fd 132 messages = new std::vector<Message*>();
elmbed 17:d8b901d791fd 133 }
elmbed 17:d8b901d791fd 134
elmbed 17:d8b901d791fd 135 void TA::post_color(uint32_t rgb)
elmbed 17:d8b901d791fd 136 {
elmbed 17:d8b901d791fd 137
elmbed 17:d8b901d791fd 138 for (int i = 0; i <= leds_per_strip; ++i)
elmbed 17:d8b901d791fd 139 {
elmbed 17:d8b901d791fd 140 neopixel_set_color_and_show(&m_strip, i, (rgb >> 16) & 0xFF, (rgb >> 8) & 0xFF, rgb & 0xFF);
elmbed 17:d8b901d791fd 141 }
elmbed 17:d8b901d791fd 142 }
elmbed 17:d8b901d791fd 143
elmbed 17:d8b901d791fd 144 void TA::mask_color(uint32_t rgb)
elmbed 17:d8b901d791fd 145 {
elmbed 17:d8b901d791fd 146 // enable_1 = 0;
elmbed 17:d8b901d791fd 147 // enable_2 = 0;
elmbed 17:d8b901d791fd 148 // enable_3 = 0;
elmbed 17:d8b901d791fd 149 //neopixels.setRGBStrip1((rgb >> 16) & 0xFF, (rgb >> 8) & 0xFF, rgb & 0xFF);
elmbed 17:d8b901d791fd 150
elmbed 17:d8b901d791fd 151 //enable_1 = (mask & 0x01)?1:0;
elmbed 17:d8b901d791fd 152 //enable_2 = (mask & 0x02)?1:0;
elmbed 17:d8b901d791fd 153 //enable_3 = (mask & 0x04)?1:0;
elmbed 17:d8b901d791fd 154
elmbed 17:d8b901d791fd 155 for (int i = 0; i <= leds_per_strip; ++i)
elmbed 17:d8b901d791fd 156 {
elmbed 17:d8b901d791fd 157 neopixel_set_color_and_show(&m_strip, i, (rgb >> 16) & 0xFF, (rgb >> 8) & 0xFF, rgb & 0xFF);
elmbed 17:d8b901d791fd 158 }
elmbed 17:d8b901d791fd 159 }
elmbed 17:d8b901d791fd 160
elmbed 17:d8b901d791fd 161 void TA::beep(uint16_t ms)
elmbed 17:d8b901d791fd 162 {
elmbed 17:d8b901d791fd 163 beeping = true;
elmbed 17:d8b901d791fd 164 beep_start = millis();
elmbed 17:d8b901d791fd 165 beep_duration = ms;
elmbed 17:d8b901d791fd 166 }
elmbed 17:d8b901d791fd 167
elmbed 17:d8b901d791fd 168 void TA::beep_off(void)
elmbed 17:d8b901d791fd 169 {
elmbed 17:d8b901d791fd 170 beeping = false;
elmbed 17:d8b901d791fd 171 }
elmbed 17:d8b901d791fd 172
elmbed 17:d8b901d791fd 173 void TA::powerup(uint8_t sound)
elmbed 17:d8b901d791fd 174 {
elmbed 17:d8b901d791fd 175 powerup_start = millis();
elmbed 17:d8b901d791fd 176 beeping = false;
elmbed 17:d8b901d791fd 177 pulsing = false;
elmbed 17:d8b901d791fd 178 powering_up1 = false;
elmbed 17:d8b901d791fd 179 powering_up2 = false;
elmbed 17:d8b901d791fd 180
elmbed 17:d8b901d791fd 181 if(sound == 1)
elmbed 17:d8b901d791fd 182 {
elmbed 17:d8b901d791fd 183 powering_up1 = true;
elmbed 17:d8b901d791fd 184 powerup_toggle = 300;
elmbed 17:d8b901d791fd 185 }
elmbed 17:d8b901d791fd 186
elmbed 17:d8b901d791fd 187 if(sound == 2)
elmbed 17:d8b901d791fd 188 {
elmbed 17:d8b901d791fd 189 powering_up2 = true;
elmbed 17:d8b901d791fd 190 powerup_toggle = 20;
elmbed 17:d8b901d791fd 191 }
elmbed 17:d8b901d791fd 192 }
elmbed 17:d8b901d791fd 193
elmbed 17:d8b901d791fd 194 void TA::pulse(uint16_t on_time, uint16_t period, uint16_t ms, uint32_t rgb)
elmbed 17:d8b901d791fd 195 {
elmbed 17:d8b901d791fd 196 current_color = rgb;
elmbed 17:d8b901d791fd 197 pulsing = true;
elmbed 17:d8b901d791fd 198 pulse_start = millis();
elmbed 17:d8b901d791fd 199 pulse_period = period;
elmbed 17:d8b901d791fd 200 pulse_on = on_time;
elmbed 17:d8b901d791fd 201 pulse_duration = ms;
elmbed 17:d8b901d791fd 202 }
elmbed 17:d8b901d791fd 203
elmbed 17:d8b901d791fd 204 void TA::pulse_off(void)
elmbed 17:d8b901d791fd 205 {
elmbed 17:d8b901d791fd 206 pulsing = false;
elmbed 17:d8b901d791fd 207 }
elmbed 17:d8b901d791fd 208
elmbed 17:d8b901d791fd 209 int TA::get_buffer_size(void)
elmbed 17:d8b901d791fd 210 {
elmbed 17:d8b901d791fd 211 return send_buffer.getSize();
elmbed 17:d8b901d791fd 212 }
elmbed 17:d8b901d791fd 213
elmbed 17:d8b901d791fd 214 bool TA::send(Message *m)
elmbed 17:d8b901d791fd 215 {
elmbed 17:d8b901d791fd 216 send_immediate(m);
elmbed 17:d8b901d791fd 217 return true;
elmbed 17:d8b901d791fd 218 }
elmbed 17:d8b901d791fd 219
elmbed 17:d8b901d791fd 220 void TA::send_immediate(Message *m)
elmbed 17:d8b901d791fd 221 {
elmbed 17:d8b901d791fd 222 Message *tmp = new Message;
elmbed 17:d8b901d791fd 223 DEBUG("in send_imediate: %d '%c'\n", m->cone, m->command);
elmbed 17:d8b901d791fd 224
elmbed 17:d8b901d791fd 225 tmp->command = m->command;
elmbed 17:d8b901d791fd 226 tmp->cone = m->cone;
elmbed 17:d8b901d791fd 227
elmbed 17:d8b901d791fd 228 // Fake version of the function, push this onto the reply queue
elmbed 17:d8b901d791fd 229 if (messages->size() < 50)
elmbed 17:d8b901d791fd 230 {
elmbed 17:d8b901d791fd 231 messages->push_back(tmp);
elmbed 17:d8b901d791fd 232 }
elmbed 17:d8b901d791fd 233 else
elmbed 17:d8b901d791fd 234 {
elmbed 17:d8b901d791fd 235 DEBUG("TA message queue too full!\n");
elmbed 17:d8b901d791fd 236 }
elmbed 17:d8b901d791fd 237 }
elmbed 17:d8b901d791fd 238
elmbed 17:d8b901d791fd 239 bool TA::sendRaw(uint8_t *message, uint8_t len, uint8_t cone)
elmbed 17:d8b901d791fd 240 {
elmbed 17:d8b901d791fd 241
elmbed 17:d8b901d791fd 242 return true;
elmbed 17:d8b901d791fd 243 }
elmbed 17:d8b901d791fd 244
elmbed 17:d8b901d791fd 245 bool TA::recieve(Message *m)
elmbed 17:d8b901d791fd 246 {
elmbed 17:d8b901d791fd 247 bool processed = true;
elmbed 17:d8b901d791fd 248 top:
elmbed 17:d8b901d791fd 249 processed = true;
elmbed 17:d8b901d791fd 250
elmbed 17:d8b901d791fd 251 //DEBUG("receiving\n");
elmbed 17:d8b901d791fd 252 if (messages->size() > 0)
elmbed 17:d8b901d791fd 253 {
elmbed 17:d8b901d791fd 254 Message *lm = messages->front();
elmbed 17:d8b901d791fd 255
elmbed 17:d8b901d791fd 256 DEBUG("got messaage with command: '%c'\n", lm->command);
elmbed 17:d8b901d791fd 257
elmbed 17:d8b901d791fd 258 // Now populate the outgoing message based on the incoming
elmbed 17:d8b901d791fd 259 if (lm->command == 'z')
elmbed 17:d8b901d791fd 260 {
elmbed 17:d8b901d791fd 261 m->cone = lm->cone;
elmbed 17:d8b901d791fd 262 }
elmbed 17:d8b901d791fd 263 else
elmbed 17:d8b901d791fd 264 {
elmbed 17:d8b901d791fd 265 DEBUG("Unknown command: '%c'\r\n", lm->command);
elmbed 17:d8b901d791fd 266 processed = false;
elmbed 17:d8b901d791fd 267 }
elmbed 17:d8b901d791fd 268
elmbed 17:d8b901d791fd 269 messages->erase(messages->begin());
elmbed 17:d8b901d791fd 270
elmbed 17:d8b901d791fd 271 if (lm)
elmbed 17:d8b901d791fd 272 {
elmbed 17:d8b901d791fd 273 delete lm;
elmbed 17:d8b901d791fd 274 }
elmbed 17:d8b901d791fd 275
elmbed 17:d8b901d791fd 276 if (!processed)
elmbed 17:d8b901d791fd 277 {
elmbed 17:d8b901d791fd 278 // Clear out the queue if we don't know what
elmbed 17:d8b901d791fd 279 // to do with the message
elmbed 17:d8b901d791fd 280 goto top;
elmbed 17:d8b901d791fd 281 }
elmbed 17:d8b901d791fd 282 }
elmbed 17:d8b901d791fd 283 else
elmbed 17:d8b901d791fd 284 {
elmbed 17:d8b901d791fd 285 processed = false;
elmbed 17:d8b901d791fd 286 }
elmbed 17:d8b901d791fd 287
elmbed 17:d8b901d791fd 288 return processed;
elmbed 17:d8b901d791fd 289 }
elmbed 17:d8b901d791fd 290
elmbed 17:d8b901d791fd 291 bool TA::waitForAck(int cone)
elmbed 17:d8b901d791fd 292 {
elmbed 17:d8b901d791fd 293
elmbed 17:d8b901d791fd 294 return true;
elmbed 17:d8b901d791fd 295 }
elmbed 17:d8b901d791fd 296
elmbed 17:d8b901d791fd 297 void TA::spin(void)
elmbed 17:d8b901d791fd 298 {
elmbed 17:d8b901d791fd 299
elmbed 17:d8b901d791fd 300 }
elmbed 17:d8b901d791fd 301
elmbed 17:d8b901d791fd 302 bool TA::activated(void)
elmbed 17:d8b901d791fd 303 {
elmbed 17:d8b901d791fd 304 return true;
elmbed 17:d8b901d791fd 305 }
elmbed 17:d8b901d791fd 306
elmbed 17:d8b901d791fd 307 bool TA::tripped(void)
elmbed 17:d8b901d791fd 308 {
elmbed 17:d8b901d791fd 309 return false;
elmbed 17:d8b901d791fd 310 }
elmbed 17:d8b901d791fd 311
elmbed 17:d8b901d791fd 312 uint8_t TA::buttons(void)
elmbed 17:d8b901d791fd 313 {
elmbed 17:d8b901d791fd 314 uint8_t buttons = 0;
elmbed 17:d8b901d791fd 315
elmbed 17:d8b901d791fd 316 return buttons;
elmbed 17:d8b901d791fd 317 }
elmbed 17:d8b901d791fd 318
elmbed 17:d8b901d791fd 319 void TA::setMask(uint8_t the_mask)
elmbed 17:d8b901d791fd 320 {
elmbed 17:d8b901d791fd 321 mask = the_mask;
elmbed 17:d8b901d791fd 322 }
elmbed 17:d8b901d791fd 323
elmbed 17:d8b901d791fd 324 void TA::initialize(uint8_t address)
elmbed 17:d8b901d791fd 325 {
elmbed 17:d8b901d791fd 326 }
elmbed 17:d8b901d791fd 327
elmbed 17:d8b901d791fd 328 /* Can't find a way of implementing this function.
elmbed 17:d8b901d791fd 329 *
elmbed 17:d8b901d791fd 330 * !SR
elmbed 17:d8b901d791fd 331 */
elmbed 17:d8b901d791fd 332 void TA::Ram_TableDisplay(void)
elmbed 17:d8b901d791fd 333 {
elmbed 17:d8b901d791fd 334
elmbed 17:d8b901d791fd 335 }
elmbed 17:d8b901d791fd 336
elmbed 17:d8b901d791fd 337 /* Not sure if this work. Taken from: https://developer.mbed.org/questions/6994/How-to-print-Free-RAM-available-RAM-or-u/
elmbed 17:d8b901d791fd 338 *
elmbed 17:d8b901d791fd 339 * !SR
elmbed 17:d8b901d791fd 340 */
elmbed 17:d8b901d791fd 341 void TA::get_free_memory(void)
elmbed 17:d8b901d791fd 342 {
elmbed 17:d8b901d791fd 343 char stackVariable;
elmbed 17:d8b901d791fd 344 char *heap;
elmbed 17:d8b901d791fd 345 unsigned long result;
elmbed 17:d8b901d791fd 346 heap = (char*)malloc(4);
elmbed 17:d8b901d791fd 347 result = &stackVariable - heap;
elmbed 17:d8b901d791fd 348 free(heap);
elmbed 17:d8b901d791fd 349
elmbed 17:d8b901d791fd 350 //serial->printf("Free memory: %ul\n\n",result);
elmbed 17:d8b901d791fd 351 }
elmbed 17:d8b901d791fd 352
elmbed 17:d8b901d791fd 353 void TA::check_mem(void)
elmbed 17:d8b901d791fd 354 {
elmbed 17:d8b901d791fd 355 uint8_t * heapptr, * stackptr;
elmbed 17:d8b901d791fd 356 unsigned int stack, heap = 0;
elmbed 17:d8b901d791fd 357
elmbed 17:d8b901d791fd 358 stackptr = (uint8_t *)malloc(4); // use stackptr temporarily
elmbed 17:d8b901d791fd 359 heapptr = stackptr; // save value of heap pointer
elmbed 17:d8b901d791fd 360 free(stackptr); // free up the memory again (sets stackptr to 0)
elmbed 17:d8b901d791fd 361
elmbed 17:d8b901d791fd 362 stack = __current_sp() ;
elmbed 17:d8b901d791fd 363 heap = (uint16_t)heapptr;
elmbed 17:d8b901d791fd 364 uint16_t last_call = *(stackptr++);
elmbed 17:d8b901d791fd 365
elmbed 17:d8b901d791fd 366 //serial->printf("Stack: 0x");
elmbed 17:d8b901d791fd 367 //serial->printf("%x ",stack);
elmbed 17:d8b901d791fd 368 //serial->printf("Heap: 0x");
elmbed 17:d8b901d791fd 369 //serial->printf("%x\n",heap);
elmbed 17:d8b901d791fd 370 //serial->printf("Last call: 0x");
elmbed 17:d8b901d791fd 371 // serial->printf("%x\n",last_call);
elmbed 17:d8b901d791fd 372 get_free_memory();
elmbed 17:d8b901d791fd 373 }
elmbed 17:d8b901d791fd 374