util.h

[Stub] support.

Library Documentation

Miscellaneous utility macros and procedures.

Defines
BIT

BIT_MASK_SHIFT

GET_BITS

Bits m to n of x.

IS_POWER_OF_TWO

DEBUG_NONE

DEBUG_FAULT

DEBUG_ALL

DEBUG_LEVEL

ASSERT

ASSERT_FAULT

Functions
void __error(void )

Disables all peripheral interrupts except USB and fades the error LED.

void _fail(const char * file, int line, const char * exp)

Print an error message on a UART upon a failed assertion and throb the error LED, if there is one defined.

Parameters:
  • file -

    Source file of failed assertion

  • line -

    Source line of failed assertion

  • exp -

    String representation of failed assertion

Par:

Turns of all peripheral interrupts except USB.

void throb(void )

Fades the error LED on and off.

Par:Sets output push-pull on ERROR_LED_PIN.