Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

8.x: timer.c/timer.h different prototype for void *pvTimerGetTimerID( const TimerHandle_t xTimer )

Posted by stephanhd on April 7, 2015

Hi out there,

just moving from 8.2.0 to 8.2.1. Again (as it was in 8.2.0 already) my IAR complains about different definitions (the missing "const") of:

(timers.c) void vTimerSetTimerID( const TimerHandlet xTimer, void *pvNewID ) and *(timers.h) void *pvTimerGetTimerID( TimerHandlet xTimer ) PRIVILEGED_FUNCTION;

So: is this intentionally and I do not get it? or is this a glitch? Its easy to "repair" by adding the "const" into the timer.h but anyway I want to ask... :)

Happy tasking, Stephan


8.x: timer.c/timer.h different prototype for void *pvTimerGetTimerID( const TimerHandle_t xTimer )

Posted by rtel on April 7, 2015

Thanks for pointing this out.

The vTimerSetTimerID() function is new. Intended to allow 'timer local storage' so that a value can be passed between subsequent calls to the timer's callback function. It isn't actually documented yet.

I think the 'set' function should not have a const. It compiles with the const because the const is effectively cast away - but that is not good practice. So that has been removed.

The 'get' function should have a const in both places.

These changes have been made in the head revision - but not yet checked in.

Regards.


8.x: timer.c/timer.h different prototype for void *pvTimerGetTimerID( const TimerHandle_t xTimer )

Posted by stephanhd on April 7, 2015

thanks a lot and have a nice day!


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner