⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Incorrect function interface definition in AVR Atmega324U drivers #508

@bouviervj

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions