Reading AtoD control registers; where is sam.h?

Want to read and print the A to D control registers to see how it is configured.

Cannot find the definitions file containing these symbolic names.

Possibly in sam.h but I cannot find that anywhere...

Using IDE 1.6.5 and have looked at the contents of the hourly build as well...

Where is the code?

R

for unbuntu linux wiring.c and wiring_analog.c and friends are in
.arduino15/packages/arduino/hardware/samd/1.6.1/cores/arduino/

or on github at ArduinoCore-samd/cores/arduino at master · arduino/ArduinoCore-samd · GitHub

I must admit I am also stumped as to the location of sam.h. Presumably it contains the register definitions of registers. While wiring.c and friends give useful information about how to deal with the standard Arduino peripherals, like the ADC, DAC, GPIO and timers, it does not help when it comes to non standard things like the analog comparators - which is what I am interested in.

wiring.c and friends is found on my Mac (Yosimite) by right-clicking the Arduino app and opening the package.
/Applications/Arduino.app/Contents/Java/hardware/arduino/samd/cores/arduino. You can also find it for the Due (sam) and AVR cores which is reassuring. I may be just being plain stupid and overlooked something but sam.h seems not to be there.....

I did find however, sam.h for the sam3 cores (Due) at /Applications/Arduino.app/Contents/Java/hardware/arduino/sam/system/CMSIS/Device/ATMEL.
It also seems there is a standard way of addressing the registers for different cores.
file:///Applications/Arduino.app/Contents/Java/hardware/arduino/sam/system/CMSIS/CMSIS/Documentation/CMSIS_System_View_Description.htm
I have not yet discovered if this also applies to the samd cores and not just the sam cores ( it seems to be just sam - but I might be wrong).

If you just need to access a few special registers (like me) it is probably possible to simply address the registers via defined offsets. The values of offsets are given in the Atmel SAM D21E / SAM D21G / SAM D21J datasheet.

My humble(?) opinion is that the the M0 PRO /Zero is a really powerful device that is a real quantum-leap beyond the AVR capabilities. To really make these advanced capabilities accessible, information about register definitions that can be used in the IDE is really badly needed.

Harry J. Whitlow

on my linux box lots of registers defined in
.arduino15/packages/arduino/tools/CMSIS/4.0.0-atmel/Device/ATMEL/samd21/include/component/

you might do string disk searches for some of the symbols you know to see where the files are on your OS