Some old AVR projects
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
272 B

#include <avr/io.h>
void led_on(volatile uint8_t* portp, uint8_t pinn) {
*portp |= _BV(pinn);
}
void led_off(volatile uint8_t* portp, uint8_t pinn) {
*portp &= ~ _BV(pinn);
}
void main()
{
led_on(&PORTB, 3);
led_off(&PORTB, 5);
led_on(&DDRB, 3);
}