创客百科

姿势共享,有节操无门槛参与的创客百科,创客动力之源 \ (^_^) /

用户工具

站点工具


arduino:avrgcc:ddrx

DDR

Abstract

The DDR(Data Direction Register)s are registers which determine if the digital pin is output mode or input mode. There are three registers called DDRB, DDRC and DDRD.

Source Code

The DDRB, DDRC and DDRD are defined in hardware/tools/avr/avr/include/avr/iom328p.h as below.

#define DDRB _SFR_IO8(0x04)
#define DDRC _SFR_IO8(0x07)
#define DDRD _SFR_IO8(0x0A)

0x04, 0x07, and 0x0A are I/O addresses of DDRB, DDRC and DDRD respectively. They call _SFR_IO8().

本页面的其他翻译:
arduino/avrgcc/ddrx.txt · 最后更改: 2016/12/25 22:15 (外部编辑)