#include "new.h"
#include "heap.h"
#include "flasher.h"
#include "heap_stress.h"
#include "controller_thread.h"

void AssertionFailure(char const *file, unsigned line)
{
	// Until I can think of something better for
	// low level assertion failures, loop here.

	// Force the counter to be placed into memory
	volatile static int i = 0 ;
	for (;;) {
		i++; // Place a breakpoint here with the debugger.
	}
}

int main(void)
{
	LEDFlasherThread	flasher;
	HeapStressThread	thrasher;
	ControllerThread	depthControl;

	for (;;) {
		flasher.Run(false);
		thrasher.Run(false);
		depthControl.Run(false);
	}

	return 0 ;
}
