Make sure _cygwin_error is defined before it is used.
Move some light functions to generic file.
Merge branch 'next' into delay

Conflicts:
	src/canemulator.cpp
Fix test suite by adding timer mock.
Merge branch 'delay' into lights

Conflicts:
	src/lpc17xx/timer.c
Remove duplicate funcitons - moved to generic file.
Add mock of light functions for tests and pic32 to tests can run.