Could this be due to application.h including a definition of PIN_MAP via some of the nested headers?
On the Core PIN_MAP worked without the need for an explicit declaration in user code, so it must be there somewhere.
I did the same for my code with multiple instances of the PIN_MAP. So I had to move the PIN_MAP (above) to the cpp file and on the second instance had to rename the second PIN_MAP as:
@ScruffR, the defines I used are really meant for the new 4.x firmware which introduces the HAL for both the Core and the Photon. However, using the cloud compile (IDE, CLI, DEV), the code will not work since the Core is still compiling against v3.4 of the firmware.
@wesner0019, ouch! Obviously, having the functions in the system firmware will make things a lot simpler. IMO we should not do any āofficialā library ports until everything settles which should be soon.
Has there been a final consensus over this topic already?
Iāve seen this OneWire thread where some HAL functions were already applied - is this the way to go, or is there still some decision making to do?
If itās still in the rough, Iāve got one more thought to throw in (in connection with Core/Photon unifiability ;-))
I have read this post and I still donāt know if a conclusion has been reached ?
Is there a replacement for PIN_MAP ?
Iām getting this error on my Photon build :
function_pulseIn.h: In function 'long unsigned int pulseIn(uint16_t, uint8_t)':
function_pulseIn.h:42:31: error: 'PIN_MAP' was not declared in this scope
GPIO_TypeDef* portMask = (PIN_MAP[pin].gpio_peripheral); // Cache the target's peripheral mask to speed up the loops.
../../../build/target/user/platform-6/libuser.a(remocon.o): In function `pulseIn(unsigned short, unsigned char)':
remocon.cpp:70: undefined reference to `GPIO_ReadInputDataBit'
remocon.cpp:77: undefined reference to `GPIO_ReadInputDataBit'
Trying to get a pulseIn() equivalent function to work on the Photon. Would be nice to have the photon library contemplating this at some pointā¦
Donāt need to do any of that for the Photon (not anymore).
m-mcgowan and his horde of wild leprechauns have released v0.4.4 (stable), which comes packed with full STM32xx GPIO support, and it is flashed along with every firmware thatās built over the cloud IDE.