• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

テスト用のあれこれ共用フォルダ


Commit MetaInfo

修订版2fa9bf9fc8b6a1ea96f97df0a487df5878d4eb93 (tree)
时间2017-11-06 06:23:15
作者takemasa <suikan@user...>
Commitertakemasa

Log Message

Editing doxygen comment

更改概述

差异

--- a/stm32_development/uart_class/platform/uart.cpp
+++ b/stm32_development/uart_class/platform/uart.cpp
@@ -29,6 +29,7 @@ UART::~UART() {
2929 vSemaphoreDelete(mutex_protect_tx_);
3030 }
3131
32+//todo: modify to return the boolean value.
3233 bool UART::Transmit(uint8_t * data, uint16_t size, WaitMilliSeconds timeout_ms)
3334 {
3435 EnterProtection(mutex_protect_tx_);
@@ -52,6 +53,7 @@ bool UART::CompleteEntireTransmit(void* ptr) {
5253 }
5354 }
5455
56+//todo: modify to return the boolean value.
5557 bool UART::Receive(uint8_t * data, uint16_t size, WaitMilliSeconds timeout_ms) {
5658 EnterProtection(mutex_protect_rx_);
5759
--- a/stm32_development/uart_class/platform/uart.hpp
+++ b/stm32_development/uart_class/platform/uart.hpp
@@ -52,8 +52,52 @@ class UART : public AbstractUART {
5252 * Convenience, this function is forbiddedn to call from ISR.
5353 */
5454 virtual bool Transmit(uint8_t * data, uint16_t count, WaitMilliSeconds timeout_ms);
55+ /**
56+ * \brief Receive raw data through UART by blocking mode.
57+ * \param data Data buffer to place the received data..
58+ * \param count The count of the data ( byte ) to be transfered.
59+ * \param timeout_ms Time out limit by milliseconds.
60+ * \return True if all data transfered completely. False if time out happen.
61+ * \details
62+ * Receive to given data buffer through the UART device.
63+ *
64+ * The receiving mode is blocking. That means, function returns when specified number of data has been received, except timeout.
65+ * Passing kIndefinitely to the parameter timeout_ms orders not to return until complete receiving. Other value of
66+ * timeout_ms parameter specifies the time out by millisecond. If time out happen, function returns false. If not happen, it returns true.
67+ *
68+ * This function is exclusive. Internally this function is guarded by mutex. Then this function is thread safe. In return for this
69+ * Convenience, this function is forbiddedn to call from ISR.
70+ */
5571 virtual bool Receive(uint8_t * data, uint16_t count, WaitMilliSeconds timeout_ms);
72+ /**
73+ * \brief Call back to be called for entire block transfer is complete.
74+ * \param ptr Pointer to UART_HandleTypeDef struct.
75+ * \return true: ptr matches with UART device and handle the call back. false : doesn't match.
76+ * \details
77+ * A call back to notify the end of entire block transfer. This is considered for DMA based transmission and
78+ * called from an DMA ISR.
79+ *
80+ * An object of this class checks whether the given ptr parameter matches its own device, and if matched,
81+ * Release the waiting task and return true. If it doesn't match, just return false.
82+ *
83+ * This method have to be called from ISR context.
84+ */
85+
5686 virtual bool CompleteEntireTransmit(void* ptr);
87+ /**
88+ * \brief Call back to be called for entire block transfer is complete.
89+ * \param ptr Pointer to UART_HandleTypeDef struct.
90+ * \return true: ptr matches with UART device and handle the call back. false : doesn't match.
91+ * \details
92+ * A call back to notify the end of entire block transfer. This is considered for DMA based receiving and
93+ * called from an DMA ISR.
94+ *
95+ * An object of this class checks whether the given ptr parameter matches its own device, and if matched,
96+ * Release the waiting task and return true. If it doesn't match, just return false.
97+ *
98+ * This method have to be called from ISR context.
99+ */
100+
57101 virtual bool CompleteEntireReceive(void* ptr);
58102 private:
59103 UART_HandleTypeDef* uart_;