Callisto4Bootloader: lib/c4_colours.c File Reference

Callisto4Bootloader

Macros | Functions | Variables
c4_colours.c File Reference

File to implement the coloured LED on the iMIMXRT1062 based board. More...

`#include <c4_colours.h>`
`#include "board.h"`
`#include "pin_mux.h"`

Go to the source code of this file.

## Macros

#define | LEDS_GPIO BOARD_USER_LED_GPIO
| Which GPIO controller to use - GPIO2. More...
#define | RED_LED_GPIO_PIN BOARD_USER_LED_RED_PIN
| GPIO pin for RED LED - 9. More...
#define | GREEN_LED_GPIO_PIN BOARD_USER_LED_GREEN_PIN
| GPIO pin for GREEN LED - 10. More...
#define | BLUE_LED_GPIO_PIN BOARD_USER_LED_BLUE_PIN
| GPIO pin for BLUE LED - 11. More...
#define | COLOUR(c) #c,

## Functions

void | BL_SysTick_DelayTicks (uint32_t n)
| Expose function from bootloader.c. More...
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]
| text names for colours generated using x-macro. More...

## Detailed Description

File to implement the coloured LED on the iMIMXRT1062 based board.

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.c.

## Macro Definition Documentation

## ◆ COLOUR

#define COLOUR | ( |  | c | ) | #c,

## Function Documentation

## ◆ BL_SysTick_DelayTicks()

void BL_SysTick_DelayTicks | ( | uint32_t | n | ) |

Expose function from bootloader.c.

Expose function from bootloader.c.

Parameters

  [in] | n | Delay time in ms

Definition at line 317 of file bootloader.c.

Referenced by FlashLed().

## ◆ 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]

Initial value:
= {
#define COLOUR(c)
COLOUR_LIST
}

text names for colours generated using x-macro.

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_LIST
#define COLOUR_LIST
Definition: c4_colours.h:22