krnl
1
Loading...
Searching...
No Matches
examples
oldexamples
old-may-not_work
sbicbi
sbicbi.ino
Go to the documentation of this file.
1
2
3
#define sbi(r,b) r |= _BV(b)
4
#define cbi(r,b) r &= ~_BV(b)
5
#define cbi(r,b) r &= ~_BV(b)
6
7
8
void
setup
() {
9
10
11
sbi
(DDRB, 5);
12
cbi
(DDRB, 0);
13
14
sbi
(PORTB, 0);
15
16
sbi
(PORTB, 5);
17
delay(1000);
18
cbi
(PORTB, 5);
19
delay(1000);
20
sbi
(PORTB, 5);
21
delay(1000);
22
cbi
(PORTB, 5);
23
delay(1000);
24
25
Serial.begin(9600);
26
}
27
int
i
= 0;
28
void
loop
() {
29
30
// put your main code here, to run repeatedly:
31
if
(! rbi(PINB, 0) )
32
Serial.println(
i
++);
33
}
34
i
volatile int i
Definition
k02twotasks.ino:29
sbi
#define sbi(r, b)
Definition
sbicbi.ino:3
setup
void setup()
Definition
sbicbi.ino:8
cbi
#define cbi(r, b)
Definition
sbicbi.ino:4
loop
void loop()
Definition
sbicbi.ino:28
Generated by
1.15.0