]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/include/timers.h
commit 9f316c246baafa15c542a5aea81a94f26e3d6507
[freertos] / FreeRTOS / Source / include / timers.h
index 5abb7f1812f7da0fd66acfc537a6334436ab8e37..205ad62fcb4afddab6afe3ac0fe7559b61a8d0dc 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
- * FreeRTOS Kernel V10.2.1\r
- * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
+ * FreeRTOS Kernel V10.3.0\r
+ * Copyright (C) 2020 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
  *\r
  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
  * this software and associated documentation files (the "Software"), to deal in\r
@@ -121,7 +121,7 @@ typedef void (*PendedFunction_t)( void *, uint32_t );
  * after 100 ticks, then xTimerPeriodInTicks should be set to 100.\r
  * Alternatively, if the timer must expire after 500ms, then xPeriod can be set\r
  * to ( 500 / portTICK_PERIOD_MS ) provided configTICK_RATE_HZ is less than or\r
- * equal to 1000.\r
+ * equal to 1000.  Time timer period must be greater than 0.\r
  *\r
  * @param uxAutoReload If uxAutoReload is set to pdTRUE then the timer will\r
  * expire repeatedly with a frequency set by the xTimerPeriodInTicks parameter.\r
@@ -138,9 +138,9 @@ typedef void (*PendedFunction_t)( void *, uint32_t );
  * which is    "void vCallbackFunction( TimerHandle_t xTimer );".\r
  *\r
  * @return If the timer is successfully created then a handle to the newly\r
- * created timer is returned.  If the timer cannot be created (because either\r
- * there is insufficient FreeRTOS heap remaining to allocate the timer\r
- * structures, or the timer period was set to 0) then NULL is returned.\r
+ * created timer is returned.  If the timer cannot be created because there is\r
+ * insufficient FreeRTOS heap remaining to allocate the timer\r
+ * structures then NULL is returned.\r
  *\r
  * Example usage:\r
  * @verbatim\r
@@ -267,7 +267,7 @@ typedef void (*PendedFunction_t)( void *, uint32_t );
  * after 100 ticks, then xTimerPeriodInTicks should be set to 100.\r
  * Alternatively, if the timer must expire after 500ms, then xPeriod can be set\r
  * to ( 500 / portTICK_PERIOD_MS ) provided configTICK_RATE_HZ is less than or\r
- * equal to 1000.\r
+ * equal to 1000.  The timer period must be greater than 0.\r
  *\r
  * @param uxAutoReload If uxAutoReload is set to pdTRUE then the timer will\r
  * expire repeatedly with a frequency set by the xTimerPeriodInTicks parameter.\r
@@ -1234,8 +1234,8 @@ const char * pcTimerGetName( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION; /*lint
 /**\r
  * void vTimerSetReloadMode( TimerHandle_t xTimer, const UBaseType_t uxAutoReload );\r
  *\r
- * Updates a timer to be either an autoreload timer, in which case the timer\r
- * automatically resets itself each time it expires, or a one shot timer, in\r
+ * Updates a timer to be either an auto-reload timer, in which case the timer\r
+ * automatically resets itself each time it expires, or a one-shot timer, in\r
  * which case the timer will only expire once unless it is manually restarted.\r
  *\r
  * @param xTimer The handle of the timer being updated.\r
@@ -1248,6 +1248,20 @@ const char * pcTimerGetName( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION; /*lint
  */\r
 void vTimerSetReloadMode( TimerHandle_t xTimer, const UBaseType_t uxAutoReload ) PRIVILEGED_FUNCTION;\r
 \r
+/**\r
+* UBaseType_t uxTimerGetReloadMode( TimerHandle_t xTimer );\r
+*\r
+* Queries a timer to determine if it is an auto-reload timer, in which case the timer\r
+* automatically resets itself each time it expires, or a one-shot timer, in\r
+* which case the timer will only expire once unless it is manually restarted.\r
+*\r
+* @param xTimer The handle of the timer being queried.\r
+*\r
+* @return If the timer is an auto-reload timer then pdTRUE is returned, otherwise\r
+* pdFALSE is returned.\r
+*/\r
+UBaseType_t uxTimerGetReloadMode( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION;\r
+\r
 /**\r
  * TickType_t xTimerGetPeriod( TimerHandle_t xTimer );\r
  *\r