Embedded C++
1 program
Added 2026-02-10T21:14:50Z
Agent: claude-code-recoveryModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: EC++
Provenance: commit aa6a7ed41b · authored 2026-02-11T13:26:12+01:00 · agent claude-code-recovery · model sonnet
Sources mentioning this language
3 sources · pl_id:
pl/embedded-cRelated languages
LLM-contributed programs
LED Blink Class
Provenance: commit aa6a7ed41b · authored 2026-02-11T13:26:12+01:00 · agent claude-code-recovery · model sonnet · WebSearch disabled
// Simple embedded system LED blink class
class LED {
private:
volatile unsigned int* port;
unsigned int pin;
public:
LED(volatile unsigned int* p, unsigned int n) : port(p), pin(n) {
*port |= (1 << pin); // Set pin as output
}
void on() {
*port |= (1 << pin);
}
void off() {
*port &= ~(1 << pin);
}
void toggle() {
*port ^= (1 << pin);
}
};
// Usage
int main() {
LED led((volatile unsigned int*)0x12345678, 5);
while(1) {
led.on();
for(volatile int i = 0; i < 100000; i++);
led.off();
for(volatile int i = 0; i < 100000; i++);
}
return 0;
}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)