• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

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

shared_fooの不要ディレクトリ削除前のもの


Commit MetaInfo

Revision10d7d9a8ff1d7c7d56fd9f4495a5eb552d94c59b (tree)
Zeit2018-03-06 09:05:33
Autortakemasa <suikan@user...>
Commitertakemasa

Log Message

Change the member function name for the ease of reading.

Ändern Zusammenfassung

Diff

--- a/stm32_development/murasaki/NUCLEO-F746ZG.xml
+++ b/stm32_development/murasaki/NUCLEO-F746ZG.xml
@@ -12,8 +12,8 @@
1212 <targetDefinitions>
1313 <board id="nucleo-f746zg">
1414 <name>NUCLEO-F746ZG</name>
15- <dbgIF>JTAG</dbgIF>
1615 <dbgIF>SWD</dbgIF>
16+ <dbgIF>JTAG</dbgIF>
1717 <dbgDEV>ST-Link</dbgDEV>
1818 <mcuId>stm32f746zgtx</mcuId>
1919 </board>
--- a/stm32_development/murasaki/murasaki/debuggerfifo.cpp
+++ b/stm32_development/murasaki/murasaki/debuggerfifo.cpp
@@ -37,7 +37,7 @@ DebuggerFifo::~DebuggerFifo()
3737 void DebuggerFifo::NotifyData()
3838 {
3939
40- sync_->ReleaseTask();
40+ sync_->Release();
4141
4242 }
4343
@@ -54,7 +54,7 @@ unsigned int DebuggerFifo::Get(uint8_t data[], unsigned int size)
5454
5555 // wait for the arriaval of the data.
5656 if ( ret_val == 0)
57- sync_->WaitForSignal(static_cast<murasaki::WaitMilliSeconds>(1000 / portTICK_PERIOD_MS));
57+ sync_->Wait(static_cast<murasaki::WaitMilliSeconds>(1000 / portTICK_PERIOD_MS));
5858
5959 return ret_val;
6060
--- a/stm32_development/murasaki/murasaki/i2cmaster.cpp
+++ b/stm32_development/murasaki/murasaki/i2cmaster.cpp
@@ -55,7 +55,7 @@ bool I2cMaster::Transmit(uint addrs, uint8_t* tx_data, unsigned int tx_size, Wai
5555 MURASAKI_ASSERT(HAL_OK == status);
5656
5757 // wait for the completion
58- result = sync_->WaitForSignal(timeout_ms); // return false if timeout
58+ result = sync_->Wait(timeout_ms); // return false if timeout
5959 }
6060 critical_section_->Leave();
6161
@@ -78,7 +78,7 @@ bool I2cMaster::Receive(uint addrs, uint8_t* rx_data, unsigned int rx_size, Wait
7878 MURASAKI_ASSERT(HAL_OK == status);
7979
8080 // wait for the completion
81- result = sync_->WaitForSignal(timeout_ms); // return false if timeout
81+ result = sync_->Wait(timeout_ms); // return false if timeout
8282 }
8383 critical_section_->Leave();
8484
@@ -110,14 +110,14 @@ bool I2cMaster::TransmitThenReceive(uint addrs,
110110 MURASAKI_ASSERT(HAL_OK == status);
111111
112112 // Wait for the completion of transmission
113- bool result1 = sync_->WaitForSignal(timeout_ms); // false if timeout
113+ bool result1 = sync_->Wait(timeout_ms); // false if timeout
114114
115115 // receive with restart condition. Address shift is required by HAL specification.
116116 status = HAL_I2C_Master_Sequential_Receive_IT(peripheral_, addrs << 1, rx_data, rx_size, I2C_LAST_FRAME);
117117 MURASAKI_ASSERT(HAL_OK == status);
118118
119119 // wait for the completion of receive.
120- bool result2 = sync_->WaitForSignal(timeout_ms); // false if timeout
120+ bool result2 = sync_->Wait(timeout_ms); // false if timeout
121121
122122 result = result1 & result2;
123123 }
@@ -132,7 +132,7 @@ bool I2cMaster::TransmitCompleteCallback(void* ptr)
132132
133133 // if matches, release task
134134 if (peripheral_ == ptr) {
135- sync_->ReleaseTask();
135+ sync_->Release();
136136 return true;
137137 }
138138 else {
@@ -146,7 +146,7 @@ bool I2cMaster::ReceiveCompleteCallback(void* ptr)
146146
147147 // if matches, release task
148148 if (peripheral_ == ptr) {
149- sync_->ReleaseTask();
149+ sync_->Release();
150150 return true;
151151 }
152152 else {
--- a/stm32_development/murasaki/murasaki/spimaster.cpp
+++ b/stm32_development/murasaki/murasaki/spimaster.cpp
@@ -76,7 +76,7 @@ bool SpiMaster::TransmitAndReceive(murasaki::AbstractSpiSlaveSpecifier* spi_spec
7676 MURASAKI_ASSERT(HAL_OK == status);
7777
7878 // wait for the completion
79- result = sync_->WaitForSignal(timeout_ms); // return false if timeout
79+ result = sync_->Wait(timeout_ms); // return false if timeout
8080 }
8181 // Dessert the chip select for slave
8282 spi_spec->DeassertCs();
@@ -93,7 +93,7 @@ bool SpiMaster::TransmitAndReceiveCompleteCallback(void* ptr)
9393
9494 // if matches, release task
9595 if (peripheral_ == ptr) {
96- sync_->ReleaseTask();
96+ sync_->Release();
9797 return true;
9898 }
9999 else {
--- a/stm32_development/murasaki/murasaki/synchronizer.cpp
+++ b/stm32_development/murasaki/murasaki/synchronizer.cpp
@@ -22,14 +22,14 @@ Synchronizer::~Synchronizer()
2222 vSemaphoreDelete(semaphore_);
2323 }
2424
25-bool Synchronizer::WaitForSignal(WaitMilliSeconds timeout_ms)
25+bool Synchronizer::Wait(WaitMilliSeconds timeout_ms)
2626 {
2727 MURASAKI_ASSERT(isTaskContext());
2828 return (pdTRUE == xSemaphoreTake(semaphore_, timeout_ms / portTICK_PERIOD_MS));
2929
3030 }
3131
32-void Synchronizer::ReleaseTask()
32+void Synchronizer::Release()
3333 {
3434 if (isTaskContext())
3535 ::xSemaphoreGive(semaphore_ );
--- a/stm32_development/murasaki/murasaki/synchronizer.hpp
+++ b/stm32_development/murasaki/murasaki/synchronizer.hpp
@@ -45,13 +45,13 @@ class Synchronizer
4545 * This member function have to be called from the task context. Otherwise, the behavior is
4646 * not predictable.
4747 */
48- bool WaitForSignal(WaitMilliSeconds timeout_ms = kwmsIndefinitely);
48+ bool Wait(WaitMilliSeconds timeout_ms = kwmsIndefinitely);
4949 /**
5050 * \brief Release the task.
5151 * \details
52- * Release the task waiting. This member function must be called from the interrupt context.
52+ * Release the task waiting. This member function must be called from both task and the interrupt context.
5353 */
54- void ReleaseTask();
54+ void Release();
5555 protected:
5656 SemaphoreHandle_t semaphore_;
5757 };
--- a/stm32_development/murasaki/murasaki/uart.cpp
+++ b/stm32_development/murasaki/murasaki/uart.cpp
@@ -93,7 +93,7 @@ bool Uart::Transmit(uint8_t * data, unsigned int size, WaitMilliSeconds timeout_
9393 HAL_StatusTypeDef status = HAL_UART_Transmit_DMA(peripheral_, data, size);
9494 MURASAKI_ASSERT(HAL_OK == status);
9595
96- ret_val = tx_sync_->WaitForSignal(timeout_ms);
96+ ret_val = tx_sync_->Wait(timeout_ms);
9797 }
9898 tx_critical_section_->Leave();
9999
@@ -105,7 +105,7 @@ bool Uart::TransmitCompleteCallback(void* const ptr)
105105 MURASAKI_ASSERT(nullptr != ptr)
106106
107107 if (ptr == peripheral_) {
108- tx_sync_->ReleaseTask();
108+ tx_sync_->Release();
109109 return true;
110110 }
111111 else {
@@ -126,7 +126,7 @@ bool Uart::Receive(uint8_t * data, unsigned int size, WaitMilliSeconds timeout_m
126126 HAL_StatusTypeDef status = HAL_UART_Receive_DMA(peripheral_, data, size);
127127 MURASAKI_ASSERT(HAL_OK == status);
128128
129- ret_val = rx_sync_->WaitForSignal(timeout_ms);
129+ ret_val = rx_sync_->Wait(timeout_ms);
130130 }
131131 rx_critical_section_->Leave();
132132
@@ -153,7 +153,7 @@ bool Uart::ReceiveCompleteCallback(void* const ptr)
153153 MURASAKI_ASSERT(nullptr != ptr)
154154
155155 if (peripheral_ == ptr) {
156- rx_sync_->ReleaseTask();
156+ rx_sync_->Release();
157157 return true;
158158 }
159159 else {