Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists