Callisto4Bootloader: include/c4_colours.h File Reference

Callisto4Bootloader

Macros | Enumerations | Functions | Variables
c4_colours.h File Reference

Enumeration of LED colour combinations. More...

Go to the source code of this file.

## Macros

#define | COLOUR_LIST
#define | COLOUR(col) E_##col,
| X-macro to construct lists of colours that can be used. More...

## Enumerations

enum | colour_t { E_NUM_COLOURS }
| Enumeration of colours available. More...

## Functions

void | FlashLed (colour_t led, unsigned int on, unsigned int off)
| Flash the led in the specified colour. More...

## Variables

const char *const | colourNames [8]
| Array of strings for colour names. More...

## Detailed Description

Enumeration of LED colour combinations.

Copyright
  2020 Remsdaq Ltd.

Date
  21 May 2020

Author
  Dan Smithers dwhs@.nosp@m.rems.nosp@m.daq.c.nosp@m.om

Definition in file c4_colours.h.

## Macro Definition Documentation

## ◆ COLOUR

#define COLOUR | ( |  | col | ) | E_##col,

X-macro to construct lists of colours that can be used.

Parameters

  col | Colour name.

Definition at line 35 of file c4_colours.h.

## ◆ COLOUR_LIST

#define COLOUR_LIST

Value:
COLOUR(NONE) \
COLOUR(RED) \
COLOUR(GREEN) \
COLOUR(YELLOW) \
COLOUR(BLUE) \
COLOUR(MAGENTA) \
COLOUR(CYAN) \
COLOUR(WHITE)

Definition at line 22 of file c4_colours.h.

## Enumeration Type Documentation

## ◆ colour_t

enum colour_t

Enumeration of colours available.

Enumerator
E_NUM_COLOURS |

Definition at line 33 of file c4_colours.h.

## Function Documentation

## ◆ FlashLed()

void FlashLed | ( | colour_t | led,
|  | unsigned int | on,
|  | unsigned int | off
| ) |  |

Flash the led in the specified colour.

Parameters

  [in] | led | Colour to flash.
  [in] | on | On duration (ms).
  [in] | off | Off duration (ms).

Definition at line 55 of file c4_colours.c.

References BL_SysTick_DelayTicks(), BLUE_LED_GPIO_PIN, GREEN_LED_GPIO_PIN, LEDS_GPIO, and RED_LED_GPIO_PIN.

Referenced by C4_flashError().

## Variable Documentation

## ◆ colourNames

const char* const colourNames[8]

Array of strings for colour names.

Array of strings for colour names.

Note the string length (8) needs to be sufficient to contain the longest colour name (and following NULL).

Definition at line 37 of file c4_colours.c.

COLOUR
#define COLOUR(col)
X-macro to construct lists of colours that can be used.
Definition: c4_colours.h:35