Nut/OS  4.10.3
API Reference
LED Control Macros

Functions to drive the XNUT status LED S1 (LED3) and S2 (LED4). More...

Collaboration diagram for LED Control Macros:

Defines

#define LED_S1_OFF()   do {PORTF &= ~_BV(2); PORTF &= ~_BV(3);} while(0)
#define LED_S1_RED()   do {PORTF &= ~_BV(2); PORTF |= _BV(3);} while(0)
#define LED_S1_RED_TOGGLE()   do {PORTF &= ~_BV(2); PORTF ^= _BV(3);} while(0)
#define LED_S1_GREEN()   do {PORTF |= _BV(2); PORTF &= ~_BV(3);} while(0)
#define LED_S1_GREEN_TOGGLE()   do {PORTF ^= _BV(2); PORTF &= ~_BV(3);} while(0)
#define LED_S1_RED_GREEN_TOGGLE()
#define LED_S2_OFF()   do {PORTF &= ~_BV(0); PORTF &= ~_BV(1);} while(0)
#define LED_S2_RED()   do {PORTF &= ~_BV(0); PORTF |= _BV(1);} while(0)
#define LED_S2_RED_TOGGLE()   do {PORTF &= ~_BV(0); PORTF ^= _BV(1);} while(0)
#define LED_S2_GREEN()   do {PORTF |= _BV(0); PORTF &= ~_BV(1);} while(0)
#define LED_S2_GREEN_TOGGLE()   do {PORTF ^= _BV(0); PORTF &= ~_BV(1);} while(0)
#define LED_S2_RED_GREEN_TOGGLE()

Detailed Description

Functions to drive the XNUT status LED S1 (LED3) and S2 (LED4).


Define Documentation

#define LED_S1_OFF ( )    do {PORTF &= ~_BV(2); PORTF &= ~_BV(3);} while(0)

Switch LED S1 off

Definition at line 86 of file xnut.h.

#define LED_S1_RED ( )    do {PORTF &= ~_BV(2); PORTF |= _BV(3);} while(0)

Switch LED S1 red

Definition at line 88 of file xnut.h.

#define LED_S1_RED_TOGGLE ( )    do {PORTF &= ~_BV(2); PORTF ^= _BV(3);} while(0)

Toggle LED S1 between red and off

Definition at line 90 of file xnut.h.

#define LED_S1_GREEN ( )    do {PORTF |= _BV(2); PORTF &= ~_BV(3);} while(0)

Switch LED S1 green

Definition at line 92 of file xnut.h.

#define LED_S1_GREEN_TOGGLE ( )    do {PORTF ^= _BV(2); PORTF &= ~_BV(3);} while(0)

Toggle LED S1 between green and off

Definition at line 94 of file xnut.h.

#define LED_S1_RED_GREEN_TOGGLE ( )
Value:
do {PORTF ^= _BV(2); if (bit_is_set(PORTF, 2)) \
   PORTF &= ~_BV(3); else PORTF |= _BV(3);} while(0)

Definition at line 95 of file xnut.h.

#define LED_S2_OFF ( )    do {PORTF &= ~_BV(0); PORTF &= ~_BV(1);} while(0)

Switch LED S2 off

Definition at line 99 of file xnut.h.

#define LED_S2_RED ( )    do {PORTF &= ~_BV(0); PORTF |= _BV(1);} while(0)

Switch LED S2 red

Definition at line 101 of file xnut.h.

#define LED_S2_RED_TOGGLE ( )    do {PORTF &= ~_BV(0); PORTF ^= _BV(1);} while(0)

Toggle LED S2 between red and off

Definition at line 103 of file xnut.h.

#define LED_S2_GREEN ( )    do {PORTF |= _BV(0); PORTF &= ~_BV(1);} while(0)

Switch LED S2 green

Definition at line 105 of file xnut.h.

#define LED_S2_GREEN_TOGGLE ( )    do {PORTF ^= _BV(0); PORTF &= ~_BV(1);} while(0)

Toggle LED S2 between green and off

Definition at line 107 of file xnut.h.

#define LED_S2_RED_GREEN_TOGGLE ( )
Value:
do {PORTF ^= _BV(0); if (bit_is_set(PORTF, 0)) \
   PORTF &= ~_BV(1); else PORTF |= _BV(1);} while(0)

Definition at line 108 of file xnut.h.