Closed classicrocker883 closed 11 months ago
I took a quick look back (in time) at a previous commit optimize PIN_MAP array from your framework-arduino-hc32f46x
I changed:
#define digitalPinToBitMask(pin) \
- ((uint16_t)PIN_MAP[pin].bit_mask())
#define digitalPinToBitMask(pin) \
+ ((uint16_t)PIN_MAP[pin].bit_mask)
from .platformio\packages\framework-arduino-hc32f46x\cores\arduino\drivers\gpio\direct_access.h
and
#ifdef __cplusplus
/**
* @brief bit mask of the pin in the port
*/
en_pin_t bit_mask() const
{
return (en_pin_t)(1 << bit_pos);
}
+#else
+ en_pin_t bit_mask;
#endif
from .platformio\packages\framework-arduino-hc32f46x\cores\arduino\WVariant.h
I got a successful compile from this with no other warnings... however, I do not feel this is the actual correct way it should be permanently. I mean I haven't test if it will even work regarding flashing. I'll try to get someone to test using the correct LCD in the meantime. maybe we can find a better solution??
but maybe its a step in the right direction?
u8g_com_arduino_no_en_parallel.c
is a c source file, and the bit_mask()
shorthand is only available for C++ (since in c, you cannot have a function in a struct afaik).
could you check if changing digitalPinToBitMask to the following fixes the issue?
#define digitalPinToBitMask(pin) \
((uint16_t)(1 << PIN_MAP[pin].bit_pos))
could you check if changing digitalPinToBitMask to the following fixes the issue?
#define digitalPinToBitMask(pin) \ ((uint16_t)(1 << PIN_MAP[pin].bit_pos))
yes it does fix that issue. that results in success. again, I am not sure if this flashes correctly with that kind of LCD. I imagine it would.
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
Remember when having monochrome 12864 LCD was supported, I think the same kind of error is back.
sorry for the long list, but basically it shows the same message...
struct "pin_info_t" has no field "bit_mask"
this is within .pio\libdeps\HC32F460C_aquila_101\U8glib-HAL\src\clib\u8g_com_arduino_no_en_parallel.c
Bug Timeline
since recent update
Expected behavior
No response
Actual behavior
No response
Steps to Reproduce
No response
Version of Marlin Firmware
current up to date
Printer model
No response
Electronics
No response
LCD/Controller
No response
Other add-ons
No response
Bed Leveling
None
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
No response