コード例 #1
0
	/**  Blink three short pulses if stack overflow is detected.
	Run time stack overflow checking is performed if
	configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2.  This hook
	function is called if a stack overflow is detected.
  \param[in] pxTask Task handle
  \param[in] pcTaskName Task name
  */
void vApplicationStackOverflowHook(TaskHandle_t pxTask, char *pcTaskName) {
	(void) pcTaskName;
	(void) pxTask;
//  void assertMsg(const char* file, int line);
//  assertMsg(pcTaskName, 0);
	errorBlink(3);
}
コード例 #2
0
void setup() {
    pinMode(LED_PIN, OUTPUT);
    if (Usb.Init() == -1) {
        while(1) {
            errorBlink();
        }
    }
}
コード例 #3
0
	/** vApplicationMallocFailedHook()
   Blink two short pulses if malloc fails.

	will only be called if
	configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h.  It is a hook
	function that will get called if a call to pvPortMalloc() fails.
	pvPortMalloc() is called internally by the kernel whenever a task, queue,
	timer or semaphore is created.  It is also called by various parts of the
	demo application.  If heap_1.c or heap_2.c are used, then the size of the
	heap available to pvPortMalloc() is defined by configTOTAL_HEAP_SIZE in
	FreeRTOSConfig.h, and the xPortGetFreeHeapSize() API function can be used
	to query the size of free heap space that remains (although it does not
	provide information on how the remaining heap might be fragmented). */
void vApplicationMallocFailedHook() {
  errorBlink(2);
}
コード例 #4
0
/** assertBlink
 * Blink one short pulse every two seconds if configASSERT fails.
*/
void assertBlink() {
  errorBlink(1);
}
コード例 #5
0
/** Hard fault - blink four short flash every two seconds */
void HardFault_Handler() 	{errorBlink(4);}
コード例 #6
0
/** Bus fault - blink five short flashes every two seconds */
void bus_fault_isr() {errorBlink(5);}
コード例 #7
0
/** Hard fault - blink four short flash every two seconds */
void hard_fault_isr()	{errorBlink(4);}
コード例 #8
0
	/**  Blink three short pulses if stack overflow is detected.
	Run time stack overflow checking is performed if
	configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2.  This hook
	function is called if a stack overflow is detected.
  \param[in] pxTask Task handle
  \param[in] pcTaskName Task name
  */
void vApplicationStackOverflowHook(TaskHandle_t pxTask, char *pcTaskName) {
	(void) pcTaskName;
	(void) pxTask;
	errorBlink(3);
}
コード例 #9
0
/** Usage fault - blink six short flashes every two seconds */
void UsageFault_Handler() {errorBlink(6);}
コード例 #10
0
/** Usage fault - blink six short flashes every two seconds */
void usage_fault_isr() {errorBlink(6);}
コード例 #11
0
/** Bus fault - blink five short flashes every two seconds */
void BusFault_Handler() {errorBlink(5);}