SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
bsp::Led Struct Reference

#include <led.h>

Collaboration diagram for bsp::Led:

Public Types

using Id = LedId

Static Public Member Functions

static void Init (Id led, bool init_state)
static void InitAll (bool init_state)
static void Set (Id led, bool state)
static void SwitchOnExclusive (Id led)

Static Public Attributes

static constexpr Id GREEN = LED_GREEN
static constexpr Id ORANGE = LED_ORANGE
static constexpr Id RED = LED_RED
static constexpr Id BLUE = LED_BLUE

Detailed Description

Definition at line 30 of file led.h.

Member Typedef Documentation

◆ Id

Member Function Documentation

◆ Init()

void Led::Init ( Id led,
bool init_state )
static

Definition at line 16 of file nxpimxrt1050/led.cpp.

17{
18 uint8_t logic_state = (init_state ? LOGIC_LED_ON : LOGIC_LED_OFF);
19
20 switch (led)
21 {
22 case Led::RED: break; // unavailabe on board
23 case Led::GREEN: USER_LED_INIT(logic_state); break;
24 case Led::BLUE: break; // unavailabe on board
25 default:
26 break;
27 }
28}
static constexpr Id GREEN
Definition led.h:34
static constexpr Id RED
Definition led.h:36
static constexpr Id BLUE
Definition led.h:37

References BLUE, GREEN, and RED.

Referenced by InitAll(), and Led_Init().

Here is the caller graph for this function:

◆ InitAll()

void bsp::Led::InitAll ( bool init_state)
inlinestatic

◆ Set()

void Led::Set ( Id led,
bool state )
static
Examples
critical_section/example.cpp.

Definition at line 30 of file nxpimxrt1050/led.cpp.

31{
32 switch (led)
33 {
34 case Led::RED: break; // unavailabe on board
35 case Led::GREEN: (state ? USER_LED_ON() : USER_LED_OFF()); break;
36 case Led::BLUE: break; // unavailabe on board
37 default:
38 break;
39 }
40}

References BLUE, GREEN, and RED.

Referenced by Led_Set(), Board::LedSet(), LedTask< _Priority, _AccessMode >::Run(), LedTask< _Priority, _AccessMode >::Run(), RunExample(), and SwitchOnExclusive().

Here is the caller graph for this function:

◆ SwitchOnExclusive()

void bsp::Led::SwitchOnExclusive ( Id led)
inlinestatic

Member Data Documentation

◆ BLUE

◆ GREEN

◆ ORANGE

◆ RED


The documentation for this struct was generated from the following files: