Skip to content

Commit 121a75e

Browse files
committed
add comments
1 parent ec4ca2e commit 121a75e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wiring_digital.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@ inline ioreg_p pin_to_port(uint8_t pin)
1515

1616
inline ioreg_p pin_to_ddr(uint8_t pin)
1717
{
18+
// DDR address is 1 less than PORT address
1819
return pin_to_port(pin) - 1;
1920
}
2021

2122
inline ioreg_p pin_to_pinreg(uint8_t pin)
2223
{
24+
// PIN address is 2 less than PORT address
2325
return pin_to_port(pin) - 2;
2426
}
2527

2628
inline uint8_t pin_to_bit(uint8_t pin)
2729
{
2830
return digital_pin_to_bit_mask_PGM[pin];
29-
//return ((const __flash uint8_t*) digital_pin_to_bit_mask_PGM)[pin];
3031
}
3132

3233
void pinMode(uint8_t pin, uint8_t mode)

0 commit comments

Comments
 (0)