git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6692 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
5e65b9fce1
commit
7c1bfd409d
|
@ -340,6 +340,49 @@ typedef struct {
|
||||||
#define OSAL_US2ST(usec) US2ST(usec)
|
#define OSAL_US2ST(usec) US2ST(usec)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Sleep macros using absolute time
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief Delays the invoking thread for the specified number of seconds.
|
||||||
|
* @note The specified time is rounded up to a value allowed by the real
|
||||||
|
* system tick clock.
|
||||||
|
* @note The maximum specifiable value is implementation dependent.
|
||||||
|
*
|
||||||
|
* @param[in] sec time in seconds, must be different from zero
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
#define osalThreadSleepSeconds(sec) osalThreadSleep(OSAL_S2ST(sec))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays the invoking thread for the specified number of
|
||||||
|
* milliseconds.
|
||||||
|
* @note The specified time is rounded up to a value allowed by the real
|
||||||
|
* system tick clock.
|
||||||
|
* @note The maximum specifiable value is implementation dependent.
|
||||||
|
*
|
||||||
|
* @param[in] msec time in milliseconds, must be different from zero
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
#define osalThreadSleepMilliseconds(msec) osalThreadSleep(OSAL_MS2ST(msec))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays the invoking thread for the specified number of
|
||||||
|
* microseconds.
|
||||||
|
* @note The specified time is rounded up to a value allowed by the real
|
||||||
|
* system tick clock.
|
||||||
|
* @note The maximum specifiable value is implementation dependent.
|
||||||
|
*
|
||||||
|
* @param[in] usec time in microseconds, must be different from zero
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
#define osalThreadSleepMicroseconds(usec) osalThreadSleep(OSAL_US2ST(usec))
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -337,6 +337,49 @@ typedef struct {
|
||||||
#define OSAL_US2ST(usec) US2ST(usec)
|
#define OSAL_US2ST(usec) US2ST(usec)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Sleep macros using absolute time
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief Delays the invoking thread for the specified number of seconds.
|
||||||
|
* @note The specified time is rounded up to a value allowed by the real
|
||||||
|
* system tick clock.
|
||||||
|
* @note The maximum specifiable value is implementation dependent.
|
||||||
|
*
|
||||||
|
* @param[in] sec time in seconds, must be different from zero
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
#define osalThreadSleepSeconds(sec) osalThreadSleep(OSAL_S2ST(sec))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays the invoking thread for the specified number of
|
||||||
|
* milliseconds.
|
||||||
|
* @note The specified time is rounded up to a value allowed by the real
|
||||||
|
* system tick clock.
|
||||||
|
* @note The maximum specifiable value is implementation dependent.
|
||||||
|
*
|
||||||
|
* @param[in] msec time in milliseconds, must be different from zero
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
#define osalThreadSleepMilliseconds(msec) osalThreadSleep(OSAL_MS2ST(msec))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays the invoking thread for the specified number of
|
||||||
|
* microseconds.
|
||||||
|
* @note The specified time is rounded up to a value allowed by the real
|
||||||
|
* system tick clock.
|
||||||
|
* @note The maximum specifiable value is implementation dependent.
|
||||||
|
*
|
||||||
|
* @param[in] usec time in microseconds, must be different from zero
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
#define osalThreadSleepMicroseconds(usec) osalThreadSleep(OSAL_US2ST(usec))
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -257,7 +257,7 @@ msg_t test_execute(BaseSequentialStream *stream) {
|
||||||
test_print(test_suite[i][j]->name);
|
test_print(test_suite[i][j]->name);
|
||||||
test_println(")");
|
test_println(")");
|
||||||
#if TEST_DELAY_BETWEEN_TESTS > 0
|
#if TEST_DELAY_BETWEEN_TESTS > 0
|
||||||
osalThreadSleep(OSAL_MS2ST(TEST_DELAY_BETWEEN_TESTS));
|
osalThreadSleepMilliseconds(TEST_DELAY_BETWEEN_TESTS);
|
||||||
#endif
|
#endif
|
||||||
execute_test(test_suite[i][j]);
|
execute_test(test_suite[i][j]);
|
||||||
if (test_local_fail) {
|
if (test_local_fail) {
|
||||||
|
|
Loading…
Reference in New Issue