Skip to content

Incorrect function interface definition in AVR Atmega324U drivers #508

Description

@bouviervj

https://github.com/simplefoc/Arduino-FOC/blame/395b6cd4c621fe460c1d61a99bc0fc38913d5481/src/drivers/hardware_specific/atmega/atmega32u4_mcu.cpp#L106

At compilation, the weak function definition takes precedence over the driver definition for atmega32u4 devices.

void _writeDutyCycle3PWM(float dc_a,  float dc_b, float dc_c, int pinA, void* params){

vs weak:

__attribute__((weak)) void _writeDutyCycle3PWM(float dc_a,  float dc_b, float dc_c, void* params){

This prevents the driver to correctly initialize and write duty cycles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions