core
core copied to clipboard
Build error when AUX_CONTROLS_ENABLED
Following latest core update.
It seems drivers are expecting pin_mode_t.claimable
, but this doesn't exist in the struct..
#if AUX_CONTROLS_ENABLED
for(i = AuxCtrl_ProbeDisconnect; i < AuxCtrl_NumEntries; i++) {
if(aux_ctrl[i].enabled) {
if((aux_ctrl[i].enabled = ioports_enumerate(Port_Digital, Port_Input, (pin_mode_t){ .irq_mode = aux_ctrl[i].irq_mode, .claimable = On }, aux_claim, (void *)&aux_ctrl[i])))
hal.signals_cap.mask |= aux_ctrl[i].cap.mask;
}
}
#endif
typedef union {
uint16_t mask;
struct {
uint16_t input :1,
output :1,
open_drain :1,
pull_mode :2,
irq_mode :5,
analog :1,
pwm :1,
servo_pwm :1,
claimed :1,
reserved :2;
};
} pin_mode_t;
Change:
if((aux_ctrl[i].enabled = ioports_enumerate(Port_Digital, Port_Input, (pin_mode_t){ .irq_mode = aux_ctrl[i].irq_mode, .claimable = On }, aux_claim, (void *)&aux_ctrl[i])))
to:
if((aux_ctrl[i].enabled = ioports_enumerate(Port_Digital, Port_Input, (pin_cap_t){ .irq_mode = aux_ctrl[i].irq_mode, .claimable = On }, aux_claim, (void *)&aux_ctrl[i])))
pin_cap_t is new, added to get rid of some ambiguity in earlier code. FYI there are some further changes coming to the ioports code in order to make it more complete and flexible, including a $-command to output low-level info about aux pins. Hopefully that will be the end of the recent spate of changes to the core/HAL APIs...
Thanks!