SLS AVR Lib 0.1a
 
Loading...
Searching...
No Matches
status_led.h File Reference

Control of indicator LEDs. More...

#include <sls-avr/avr.h>

Go to the source code of this file.

Macros

#define LED_ON   PIN_ON
 The meaningful name alias for PIN_ON.
 
#define LED_OFF   PIN_OFF
 The meaningful name alias for PIN_OFF.
 
#define LED_SWITCH   PIN_SWITCH
 The meaningful name alias for PIN_SWITCH.
 
#define status_led_clear   status_led_ready
 Alias for status_led_ready.
 

Functions

void init_status_led (void)
 Initializing ports for indicator LEDs and turning off all but the error LED one.
 
void status_led_ready (void)
 Switching off additional indicators and turning on the main one.
 

Detailed Description

Control of indicator LEDs.

Author
Simon Litt simon.nosp@m.@1it.nosp@m.t.net https://coding.1itt.net, https://github.com/SimonLitt
#define LED_STAT_PORT A
#define LED_INF_PORT A
#define LED_ERR_PORT A
#define LED_STAT_PIN PA0
#define LED_INF_PIN PA1
#define LED_ERR_PIN PA2
...
ISR (TIMER0_COMP_vect) { // timer interrupt, e.g. 1Hz
...
led_stat_switch();
...
}
int main(void) {
...
...
sei();
...
}
Control of indicator LEDs.
void init_status_led(void)
Initializing ports for indicator LEDs and turning off all but the error LED one.
void status_led_ready(void)
Switching off additional indicators and turning on the main one.

Macro Definition Documentation

◆ LED_OFF

#define LED_OFF   PIN_OFF

The meaningful name alias for PIN_OFF.

◆ LED_ON

#define LED_ON   PIN_ON

The meaningful name alias for PIN_ON.

◆ LED_SWITCH

#define LED_SWITCH   PIN_SWITCH

The meaningful name alias for PIN_SWITCH.

◆ status_led_clear

#define status_led_clear   status_led_ready

Alias for status_led_ready.

Function Documentation

◆ init_status_led()

void init_status_led ( void )

Initializing ports for indicator LEDs and turning off all but the error LED one.

◆ status_led_ready()

void status_led_ready ( void )

Switching off additional indicators and turning on the main one.