Dann 'streite' ich mit: Und zwar im Sinne von Lisbeth.

Hier nur mal ein Beispiel der, tatsächlich auch gut dokumentierten RP6-LIB: (P.S.: Die gute Formatierung in der RP6_lib geht hier mit quote leider verloren. Entschuldigung an den RP6-LIB-Entwickler, dass ich quote nutze.)
/**
* Update status LEDs with current value from shadow register.
*
* Additional info:
* This function ensures that the LED pins are not driven low to allow
* other circuitry to be connected to the I/O pads on the mainboard!
* As long as external circuits only connect the I/O pads to VCC and not to
* GND, everything should work fine, but always connect a >= 470 Ohm
* series resistor to limit maximum current!
*
*
* Example:
*
* statusLEDs.byte=0b101001;
* updateStatusLEDs();
* // this clears all LEDs and sets the LEDs STATUS1,
* // STATUS6 and STATUS4!
*
* // Other possibility:
* statusLEDs.LED2=true;
* updateStatusLEDs();
* // This sets LED2 and does not affect any other LED!
*/
void updateStatusLEDs(void)
{
DDRB &= ~0x83;
PORTB &= ~0x83;
if(statusLEDs.LED4){ DDRB |= SL4; PORTB |= SL4; }
if(statusLEDs.LED5){ DDRB |= SL5; PORTB |= SL5; }
if(statusLEDs.LED6){ DDRB |= SL6; PORTB |= SL6; }
DDRC &= ~0x70;
PORTC &= ~0x70;
DDRC |= ((statusLEDs.byte << 4) & 0x70);
PORTC |= ((statusLEDs.byte << 4) & 0x70);
#ifdef POWER_ON_WARNING
leds_on = (leds_on ? leds_on : (statusLEDs.byte && 1));
#endif
}
Hier ist ja sehr gut zu sehen, dass eine Funktion aus der RP6-LIB sehr wohl auch viel mit einzelnen Bit's zur Leitungssteuerung machen muss. Was sonst soll denn in C geschrieben werden um eine Hardware-Leitung auf +5V oder eben auf 0V zu legen? Ich kenne kein Kommando in C das da Mach_mal_LED_4_an heisst. Und wenn so eine Funktion geschrieben würden kann dort ja auch nur ein Bit im Port zur LED gewechselt werden.

@ehenkes
Was also sollen diese ständige 'Seitenhiebe'?