Array pin configuration structure

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Array pin configuration structure

Jump to solution
589 Views
InHome
Contributor III

Dear NXP Hello,

I am using the NXP "adc_swtrigger_mpc5748g" project to debug and learn the ADC peripheral and how it works.

I have a question about the pin_mux.c generated file. In this  file there is a structure called "g_pin_mux_InitConfigArr". This buffer resemble  lot to json file structure and each key start with ".", this a little bit new for me because I come from Texas Instrument MCUs.

Could someone please clarity how this buffer is used and the data filled in corresponds to what ?

Thank you in advance,

S.Tarik 

0 Kudos
1 Solution
576 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

g_pin_mux_InitConfigArr is array of structures of type pin_settings_config_t.
A designated initialization of structures is used here, using ‘.fieldname =’ before the element value. 
Designated Initialization allows structure members to be initialized in any order. This feature has been added in C99 standard.
Refer for example to https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html

BR, Petr

View solution in original post

0 Kudos
1 Reply
577 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

g_pin_mux_InitConfigArr is array of structures of type pin_settings_config_t.
A designated initialization of structures is used here, using ‘.fieldname =’ before the element value. 
Designated Initialization allows structure members to be initialized in any order. This feature has been added in C99 standard.
Refer for example to https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html

BR, Petr

0 Kudos