c - what does this code mean ? -


i'm reading project , , found code, don't unterstand.

#define out_pins            {x2_pin, pioc, id_pioc, pio_output_0, pio_default}, \                     {y2_pin, pioc, id_pioc, pio_output_0, pio_default}, \                     {z2_pin, pioc, id_pioc, pio_output_0, pio_default} 

the program running on sam3s cortex m3 atmel .

x2_pin , y2_pin , z2_pin defined .

can explain o me out_pins ?

out_pins macro defined 2d array values. check following example better understanding.

eg: int *op[] = {out_pins } similar

int *op[] = {{x2_pin, pioc, id_pioc, pio_output_0, pio_default}, \                     {y2_pin, pioc, id_pioc, pio_output_0, pio_default}, \                     {z2_pin, pioc, id_pioc, pio_output_0, pio_default}} 

Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -