no-OS icon indicating copy to clipboard operation
no-OS copied to clipboard

ADuCM3029 platform timer implementation bug

Open LehMaxence opened this issue 9 months ago • 0 comments

In the aducm3029_timer_init function signature, the second parameter must be a const pointer to adhere to the no_os_timer_platform_ops struct init field signature:

https://github.com/analogdevicesinc/no-OS/blob/4cb1ed065a517c0c33e728b1620b017783e67bb7/drivers/platform/aducm3029/aducm3029_timer.c#L111

https://github.com/analogdevicesinc/no-OS/blob/4cb1ed065a517c0c33e728b1620b017783e67bb7/drivers/platform/aducm3029/aducm3029_timer.c#L441

https://github.com/analogdevicesinc/no-OS/blob/4cb1ed065a517c0c33e728b1620b017783e67bb7/include/no_os_timer.h#L110

Here's the error from IAR:

        .init = &aducm3029_timer_init,
                ^
"aducm3029_timer.c",441  Error[Pe144]:
          a value of type "int32_t (*)(struct no_os_timer_desc **, struct
          no_os_timer_init_param *)" cannot be used to initialize an entity of
          type "int32_t (*)(struct no_os_timer_desc **, struct
          no_os_timer_init_param const *)"

LehMaxence avatar Apr 30 '24 13:04 LehMaxence