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.
17 lines
272 B
17 lines
272 B
11 years ago
|
#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);
|
||
|
}
|