chore(comments/format): commented and formatted all the c files
This commit is contained in:
parent
f52ce027a6
commit
dbcc449552
5 changed files with 157 additions and 72 deletions
15
ex01/main.c
15
ex01/main.c
|
|
@ -3,11 +3,14 @@
|
|||
#define LED_PORT PORTB0
|
||||
|
||||
int main(void) {
|
||||
// set pin to output
|
||||
DDRB |= (_BV(LED_PORT));
|
||||
// set pin to output
|
||||
// DDRB is the register that set the direction of the pins (IN/OUT)
|
||||
// we want to say that the LED_PORT pin is an OUT pin, which isnt the default
|
||||
DDRB |= (_BV(LED_PORT));
|
||||
|
||||
// say to pull high the pin
|
||||
PORTB |= (_BV(LED_PORT));
|
||||
while (1)
|
||||
;
|
||||
// say to pull high the pins
|
||||
// since the pin is set to output, this works !
|
||||
PORTB |= (_BV(LED_PORT));
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue