stopwatch bugfix
This commit is contained in:
parent
640cc1ddec
commit
8a8761ea88
@ -13,8 +13,9 @@ typedef uint32_t address_t;
|
||||
* single interface (like RMAP or I2C)
|
||||
* @details
|
||||
* To use this class, implement a communication specific child cookie which
|
||||
* inherits Cookie. Cookie instances are created in config/ Factory.cpp by calling
|
||||
* CookieIF* childCookie = new ChildCookie(...).
|
||||
* inherits Cookie. Cookie instances are created in config/Factory.cpp by
|
||||
* calling @code{.cpp} CookieIF* childCookie = new ChildCookie(...)
|
||||
* @endcode .
|
||||
*
|
||||
* This cookie is then passed to the child device handlers, which stores the
|
||||
* pointer and passes it to the communication interface functions.
|
||||
|
@ -60,9 +60,9 @@ public:
|
||||
* this can be performed in this function, which is called on device handler
|
||||
* initialization.
|
||||
* @param cookie
|
||||
* @return -@c RETURN_OK if initialization was successfull
|
||||
* - Everything else triggers failure event with
|
||||
* returnvalue as parameter 1
|
||||
* @return
|
||||
* - @c RETURN_OK if initialization was successfull
|
||||
* - Everything else triggers failure event with returnvalue as parameter 1
|
||||
*/
|
||||
virtual ReturnValue_t initializeInterface(CookieIF * cookie) = 0;
|
||||
|
||||
@ -73,9 +73,9 @@ public:
|
||||
* @param cookie
|
||||
* @param data
|
||||
* @param len
|
||||
* @return -@c RETURN_OK for successfull send
|
||||
* - Everything else triggers failure event with
|
||||
* returnvalue as parameter 1
|
||||
* @return
|
||||
* - @c RETURN_OK for successfull send
|
||||
* - Everything else triggers failure event with returnvalue as parameter 1
|
||||
*/
|
||||
virtual ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t * sendData,
|
||||
size_t sendLen) = 0;
|
||||
@ -84,7 +84,7 @@ public:
|
||||
* Called by DHB in the GET_WRITE doGetWrite().
|
||||
* Get send confirmation that the data in sendMessage() was sent successfully.
|
||||
* @param cookie
|
||||
* @return -@c RETURN_OK if data was sent successfull
|
||||
* @return - @c RETURN_OK if data was sent successfull
|
||||
* - Everything else triggers falure event with
|
||||
* returnvalue as parameter 1
|
||||
*/
|
||||
@ -99,7 +99,7 @@ public:
|
||||
*
|
||||
* @param cookie
|
||||
* @param requestLen Size of data to read
|
||||
* @return -@c RETURN_OK to confirm the request for data has been sent.
|
||||
* @return - @c RETURN_OK to confirm the request for data has been sent.
|
||||
* - Everything else triggers failure event with
|
||||
* returnvalue as parameter 1
|
||||
*/
|
||||
@ -113,8 +113,8 @@ public:
|
||||
* @param buffer [out] Set reply here (by using *buffer = ...)
|
||||
* @param size [out] size pointer to set (by using *size = ...).
|
||||
* Set to 0 if no reply was received
|
||||
* @return -@c RETURN_OK for successfull receive
|
||||
* -@c NO_REPLY_RECEIVED if not reply was received. Setting size to
|
||||
* @return - @c RETURN_OK for successfull receive
|
||||
* - @c NO_REPLY_RECEIVED if not reply was received. Setting size to
|
||||
* 0 has the same effect
|
||||
* - Everything else triggers failure event with
|
||||
* returnvalue as parameter 1
|
||||
|
@ -35,24 +35,20 @@ public:
|
||||
static constexpr ReturnValue_t SEMAPHORE_NOT_OWNED = MAKE_RETURN_CODE(2);
|
||||
static constexpr ReturnValue_t SEMAPHORE_NULLPOINTER = MAKE_RETURN_CODE(3);
|
||||
|
||||
/**
|
||||
* Create a binary semaphore
|
||||
*/
|
||||
BinarySemaphore();
|
||||
|
||||
/**
|
||||
* Copy ctor
|
||||
* @param
|
||||
* @brief Copy ctor
|
||||
*/
|
||||
BinarySemaphore(const BinarySemaphore&);
|
||||
|
||||
/**
|
||||
* Copy assignment
|
||||
* @brief Copy assignment
|
||||
*/
|
||||
BinarySemaphore& operator=(const BinarySemaphore&);
|
||||
|
||||
/**
|
||||
* Move constructor
|
||||
* @brief Move constructor
|
||||
*/
|
||||
BinarySemaphore (BinarySemaphore &&);
|
||||
|
||||
@ -81,16 +77,16 @@ public:
|
||||
/**
|
||||
* Same as lockBinarySemaphore() with timeout in FreeRTOS ticks.
|
||||
* @param timeoutTicks
|
||||
* @return -@c RETURN_OK on success
|
||||
* -@c RETURN_FAILED on failure
|
||||
* @return - @c RETURN_OK on success
|
||||
* - @c RETURN_FAILED on failure
|
||||
*/
|
||||
ReturnValue_t takeBinarySemaphoreTickTimeout(TickType_t timeoutTicks =
|
||||
BinarySemaphore::NO_BLOCK_TICKS);
|
||||
|
||||
/**
|
||||
* Give back the binary semaphore
|
||||
* @return -@c RETURN_OK on success
|
||||
* -@c RETURN_FAILED on failure
|
||||
* @return - @c RETURN_OK on success
|
||||
* - @c RETURN_FAILED on failure
|
||||
*/
|
||||
ReturnValue_t giveBinarySemaphore();
|
||||
|
||||
@ -108,8 +104,8 @@ public:
|
||||
/**
|
||||
* Wrapper function to give back semaphore from handle
|
||||
* @param semaphore
|
||||
* @return -@c RETURN_OK on success
|
||||
* -@c RETURN_FAILED on failure
|
||||
* @return - @c RETURN_OK on success
|
||||
* - @c RETURN_FAILED on failure
|
||||
*/
|
||||
static ReturnValue_t giveBinarySemaphore(SemaphoreHandle_t semaphore);
|
||||
|
||||
@ -118,8 +114,8 @@ public:
|
||||
* @param semaphore
|
||||
* @param higherPriorityTaskWoken This will be set to pdPASS if a task with a higher priority
|
||||
* was unblocked
|
||||
* @return -@c RETURN_OK on success
|
||||
* -@c RETURN_FAILED on failure
|
||||
* @return - @c RETURN_OK on success
|
||||
* - @c RETURN_FAILED on failure
|
||||
*/
|
||||
static ReturnValue_t giveBinarySemaphoreFromISR(SemaphoreHandle_t semaphore,
|
||||
BaseType_t * higherPriorityTaskWoken);
|
||||
|
16
serialize/SerializeDoc.h
Normal file
16
serialize/SerializeDoc.h
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @page serialPage Serialization Tools
|
||||
* This page refers to the serialization tools included in framework/serialize.
|
||||
* The serialization tools are a useful tool to convert object data into raw
|
||||
* buffers and vice-versa. Here is a rough overview which tool to use for
|
||||
* which purpose.
|
||||
*
|
||||
* @section endSwapper Endian Swapper
|
||||
* This header file includes tools to do simple serial order swapping
|
||||
*
|
||||
* @section serialiezIF SerializeIF
|
||||
*
|
||||
* @section serElement SerializeElement
|
||||
*
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@ seconds_t Stopwatch::stopSeconds() {
|
||||
|
||||
void Stopwatch::display() {
|
||||
if(displayMode == StopwatchDisplayMode::MILLIS) {
|
||||
info << "Stopwatch: Operation took " << elapsedTime.tv_sec * 1000 +
|
||||
info << "Stopwatch: Operation took " << elapsedTime.tv_sec / 1000 +
|
||||
elapsedTime.tv_usec * 1000 << " milliseconds" << std::endl;
|
||||
}
|
||||
else if(displayMode == StopwatchDisplayMode::SECONDS) {
|
||||
|
Loading…
Reference in New Issue
Block a user