nagpioapp

Where is NARM_PORTX_REG declared? I’m trying to understand the narm_read_reg and narm_write_reg routines. I see that ‘NARM_PORTX_REG_mode’ is declared in reg_def.h but nowhere is there any definition of just NARM_PORTX_REG?

I have the same problem, but , now ,I know !
the writer of this code have use MACRO in a MACRO with MACRO in parameters.
and some substitution of parameters and concat of term with a lot of MACRO and define.
Very cryptic code , but it’not very important …

Bye

The ‘functions’ narm_read_reg and narm_write_reg are actually macros, defined in h/reg_def.h.

NARM_PORTX_REG is actually part of a group of defines, i.e. NARM_PORTX_REG_mode, NARM_PORTX_REG_reserved, etc, again refer to h/reg_def.h.

If you look toward the top of the ref_def. h file you will see a number of macros. The narm_read_reg macro, as an example, macro starts off a whole chain of macros, further defined in h/Npttypes.h.

I realize that this probably doesn’t clear this up completely, but hopefully it helps a bit.

Cameron