M128/64 STK 1.0.1
 
Loading...
Searching...
No Matches
led Namespace Reference

Functions

void initialize ()
 
void clear (uint8_t pin)
 
void set (uint8_t pin)
 
void write (uint8_t value)
 
void write (uint8_t pin, uint8_t value)
 
uint8_t read ()
 
uint8_t read (uint8_t pin)
 

Detailed Description

The panel has 8 LEDs named LED1 to LED8. LED-EN should be connected with a jumper to enable LEDs, so PORTC is connected to the LEDs of the panel. LEDs are emitting light if the port value is low. PORTC0 - LED1 PORTC1 - LED2 PORTC2 - LED3 PORTC3 - LED4 PORTC4 - LED5 PORTC5 - LED6 PORTC6 - LED7 PORTC7 - LED8

Function Documentation

◆ clear()

void led::clear ( uint8_t pin)

Turns off the LED.

Parameters
pinPin of the LED

◆ initialize()

void led::initialize ( )

Initializes PORTC to output and turns off all LEDs.

◆ read() [1/2]

uint8_t led::read ( )

Reads all LED statues. Highest bit is LED1, lowest bit is LED8. Bit value is 1 if the LED is on, 0 if it is off.

Returns
LED statues

◆ read() [2/2]

uint8_t led::read ( uint8_t pin)

Reads the selected LED status.

Parameters
pinPin of the LED
Returns
1 if the LED is on, 0 if it is off

◆ set()

void led::set ( uint8_t pin)

Turns on the LED.

Parameters
pinPin of the LED

◆ write() [1/2]

void led::write ( uint8_t pin,
uint8_t value )

Writes a LED status.

Parameters
pinPin of the LED
value1 if the LED is on, 0 if it is off

◆ write() [2/2]

void led::write ( uint8_t value)

Writes all LED statuses. Highest bit is LED1, lowest bit is LED8. Bit value is 1 if the LED is on, 0 if it is off.

Parameters
valuebitmap of LEDs