shared_fooの不要ディレクトリ削除前のもの
Revision | 23f32a66297553dc678d4ebfe3c5dc6d91a3c221 (tree) |
---|---|
Time | 2018-03-02 08:35:25 |
Author | takemasa <suikan@user...> |
Commiter | takemasa |
Refactor the name of the member variable.
@@ -57,7 +57,7 @@ unsigned int DebuggerFifo::Get(uint8_t data[], unsigned int size) | ||
57 | 57 | |
58 | 58 | // wait for the arriaval of the data. |
59 | 59 | if ( ret_val == 0) |
60 | - sync_->WaitForSignalFromTask(static_cast<murasaki::WaitMilliSeconds>(1000 / portTICK_PERIOD_MS)); | |
60 | + sync_->WaitForSignal(static_cast<murasaki::WaitMilliSeconds>(1000 / portTICK_PERIOD_MS)); | |
61 | 61 | |
62 | 62 | return ret_val; |
63 | 63 |
@@ -18,7 +18,7 @@ namespace murasaki { | ||
18 | 18 | * |
19 | 19 | * Receives a murasaki::AbstractLogger type instance and murasaki::AbstractFifo instance |
20 | 20 | * through the task_param parameter of the constructor. |
21 | - * Then, it is passed to the @ref TaskBody(). | |
21 | + * Then, it is passed to the TaskBody(). | |
22 | 22 | * |
23 | 23 | * TaskBody takes data form FIFO and put it into the logger. |
24 | 24 | * |
@@ -55,7 +55,7 @@ bool I2cMaster::Transmit(uint addrs, uint8_t* tx_data, unsigned int tx_size, Wai | ||
55 | 55 | MURASAKI_ASSERT(HAL_OK == status); |
56 | 56 | |
57 | 57 | // wait for the completion |
58 | - result = sync_->WaitForSignalFromTask(timeout_ms); // return false if timeout | |
58 | + result = sync_->WaitForSignal(timeout_ms); // return false if timeout | |
59 | 59 | } |
60 | 60 | critical_section_->Leave(); |
61 | 61 |
@@ -78,7 +78,7 @@ bool I2cMaster::Receive(uint addrs, uint8_t* rx_data, unsigned int rx_size, Wait | ||
78 | 78 | MURASAKI_ASSERT(HAL_OK == status); |
79 | 79 | |
80 | 80 | // wait for the completion |
81 | - result = sync_->WaitForSignalFromTask(timeout_ms); // return false if timeout | |
81 | + result = sync_->WaitForSignal(timeout_ms); // return false if timeout | |
82 | 82 | } |
83 | 83 | critical_section_->Leave(); |
84 | 84 |
@@ -110,14 +110,14 @@ bool I2cMaster::TransmitThenReceive(uint addrs, | ||
110 | 110 | MURASAKI_ASSERT(HAL_OK == status); |
111 | 111 | |
112 | 112 | // Wait for the completion of transmission |
113 | - bool result1 = sync_->WaitForSignalFromTask(timeout_ms); // false if timeout | |
113 | + bool result1 = sync_->WaitForSignal(timeout_ms); // false if timeout | |
114 | 114 | |
115 | 115 | // receive with restart condition. Address shift is required by HAL specification. |
116 | 116 | status = HAL_I2C_Master_Sequential_Receive_IT(peripheral_, addrs << 1, rx_data, rx_size, I2C_LAST_FRAME); |
117 | 117 | MURASAKI_ASSERT(HAL_OK == status); |
118 | 118 | |
119 | 119 | // wait for the completion of receive. |
120 | - bool result2 = sync_->WaitForSignalFromTask(timeout_ms); // false if timeout | |
120 | + bool result2 = sync_->WaitForSignal(timeout_ms); // false if timeout | |
121 | 121 | |
122 | 122 | result = result1 & result2; |
123 | 123 | } |
@@ -76,7 +76,7 @@ bool SpiMaster::Transfer(murasaki::AbstractSpiSlaveSpecifier* spi_spec, | ||
76 | 76 | MURASAKI_ASSERT(HAL_OK == status); |
77 | 77 | |
78 | 78 | // wait for the completion |
79 | - result = sync_->WaitForSignalFromTask(timeout_ms); // return false if timeout | |
79 | + result = sync_->WaitForSignal(timeout_ms); // return false if timeout | |
80 | 80 | } |
81 | 81 | // Dessert the chip select for slave |
82 | 82 | spi_spec->DeassertCs(); |
@@ -22,7 +22,7 @@ Synchronizer::~Synchronizer() | ||
22 | 22 | vSemaphoreDelete(semaphore_); |
23 | 23 | } |
24 | 24 | |
25 | -bool Synchronizer::WaitForSignalFromTask(WaitMilliSeconds timeout_ms) | |
25 | +bool Synchronizer::WaitForSignal(WaitMilliSeconds timeout_ms) | |
26 | 26 | { |
27 | 27 | MURASAKI_ASSERT(isTaskContext()); |
28 | 28 | return (pdTRUE == xSemaphoreTake(semaphore_, timeout_ms / portTICK_PERIOD_MS)); |
@@ -45,7 +45,7 @@ class Synchronizer | ||
45 | 45 | * This member function have to be called from the task context. Otherwise, the behavior is |
46 | 46 | * not predictable. |
47 | 47 | */ |
48 | - bool WaitForSignalFromTask(WaitMilliSeconds timeout_ms = kwmsIndefinitely); | |
48 | + bool WaitForSignal(WaitMilliSeconds timeout_ms = kwmsIndefinitely); | |
49 | 49 | /** |
50 | 50 | * \brief Release the task. |
51 | 51 | * \details |
@@ -93,7 +93,7 @@ bool Uart::Transmit(uint8_t * data, unsigned int size, WaitMilliSeconds timeout_ | ||
93 | 93 | HAL_StatusTypeDef status = HAL_UART_Transmit_DMA(peripheral_, data, size); |
94 | 94 | MURASAKI_ASSERT(HAL_OK == status); |
95 | 95 | |
96 | - ret_val = tx_sync_->WaitForSignalFromTask(timeout_ms); | |
96 | + ret_val = tx_sync_->WaitForSignal(timeout_ms); | |
97 | 97 | } |
98 | 98 | tx_critical_section_->Leave(); |
99 | 99 |
@@ -126,7 +126,7 @@ bool Uart::Receive(uint8_t * data, unsigned int size, WaitMilliSeconds timeout_m | ||
126 | 126 | HAL_StatusTypeDef status = HAL_UART_Receive_DMA(peripheral_, data, size); |
127 | 127 | MURASAKI_ASSERT(HAL_OK == status); |
128 | 128 | |
129 | - ret_val = rx_sync_->WaitForSignalFromTask(timeout_ms); | |
129 | + ret_val = rx_sync_->WaitForSignal(timeout_ms); | |
130 | 130 | } |
131 | 131 | rx_critical_section_->Leave(); |
132 | 132 |