2 posts / 0 new
Last post
david.lawrence1...
Offline
Last seen:4 years 5 months ago
加入:2016-11-16 17:57
GPIO usage definition

I would like to understand this block of code coming from system_ARMCM0.h

#ifdef __USE_GPIO
ARM_GPIO0 ->DATA[0].WORD = 0;
ARM_GPIO0 ->IE = 0;
ARM_GPIO0 ->DIR = 0xff83;

ARM_GPIO1->DATA[0].WORD = 0;
ARM_GPIO1->IE = 0;
ARM_GPIO1->DIR = 0;

ARM_GPIO2->DATA[0].WORD = 0;
ARM_GPIO2->IE = 0;
ARM_GPIO2->DIR = 0;
#endif
}

What are the DIR and IE commands and where are they located?

Dave

Device:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
Staff
加入:2015-06-08 11:34
你好大卫,

你好大卫,

Without being absolutely sure about that, since the system_ARMCM0.c is a generic file used by all of the SoC that include an ARM processor, IE and DIR are not commands, but members of the ARM_GPIO_Typedef struct which corresponds to the ARM General Purpose Input/Output ports. On the 580 those ports are not used since the 580 has its own I/O ports and also the __USE_GPIO is undefined. That part of the code has nothing to do with the 580's GPIO ports if that is what you are looking for.

Thanks MT_dialog