Good Evening,
I'm attempting to do some direct port manipulation on the Arduino 101, but the definitions for port registers (PORTB, PINB, etc) are missing from the pins_arduino.h found in /User/AppData/Local/Arduino15/packages/Intel/hardware/arc32/1.0.5/variants/arduino_101. It's also missing functions like digitalPinToInterrupt(), and as such, trying to compile for the 101 using the above gives "PINB not declared in this scope" errors.
The 101 looks a lot like an UNO board - I tried making a backup of the pins_arduino.h included with the 101 core, and copying over the pins_arduino.h from the UNO folder, then tried to compile again, but this was unsuccessful and I don't really know enough to know why. (edit2: this didn't work because Curie != Atmel) I'm not averse to figuring stuff out on my own, but it seems with the 101 being so new, there's a lot of stuff still under-documented.
I've attached the 101's pins_arduino.h as well as the one from the /avr/variants/standard folder. I have changed the filenames to distinguish them.
edit: In the interest of avoiding an xy problem; I'm doing some high speed pulse counting, which at first sounds like a good job for hardware interrupts, but I don't want all the interrupt overhead.
Essentially I need to look at the bits for two pins, and with a switch case for 01, 10, 11 increment a couple counters. This is something like 10 or 12 instructions total, so it seems a huge waste to blow 100+ cycles just handling interrupts. I'd rather loop around as fast as possible, just checking those bits. I'd expected to do this with PINB and bitmasking, but pins_arduino.h for core 1.0.5 doesn't have those macros yet.
pins_arduino_101.h (1.69 KB)
pins_arduino_standard.h (5.85 KB)
