krnl 1
Loading...
Searching...
No Matches
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
8void 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}
27int i = 0;
28void loop() {
29
30 // put your main code here, to run repeatedly:
31 if (! rbi(PINB, 0) )
32 Serial.println(i++);
33}
34
volatile int i
#define sbi(r, b)
Definition sbicbi.ino:3
void setup()
Definition sbicbi.ino:8
#define cbi(r, b)
Definition sbicbi.ino:4
void loop()
Definition sbicbi.ino:28