shared_fooの不要ディレクトリ削除前のもの
Revision | 4af714eb8c3f8e60ba5fc742912f5bf08792e891 (tree) |
---|---|
Time | 2018-02-22 15:38:33 |
Author | takemasa <suikan@user...> |
Commiter | takemasa |
Added const to the member variable to be called.
@@ -14,16 +14,18 @@ | ||
14 | 14 | namespace murasaki { |
15 | 15 | |
16 | 16 | I2cMaster::I2cMaster(I2C_HandleTypeDef * i2c_handle) |
17 | + : peripheral_(i2c_handle), | |
18 | + sync_(new InterruptSynchronizer), | |
19 | + critical_section_(new CriticalSection) | |
20 | + | |
21 | + | |
17 | 22 | { |
18 | 23 | // setup peripheral handle |
19 | 24 | MURASAKI_ASSERT(NULL != i2c_handle); |
20 | - peripheral_ = i2c_handle; | |
21 | 25 | |
22 | 26 | // synchronization setup. |
23 | - sync_ = new InterruptSynchronizer; | |
24 | 27 | MURASAKI_ASSERT(NULL != sync_) |
25 | 28 | |
26 | - critical_section_ = new CriticalSection; | |
27 | 29 | MURASAKI_ASSERT(NULL != critical_section_) |
28 | 30 | |
29 | 31 | } |
@@ -161,9 +161,9 @@ class I2cMaster : public AbstractI2CMaster | ||
161 | 161 | */ |
162 | 162 | virtual bool HandleError(void * ptr); |
163 | 163 | protected: |
164 | - I2C_HandleTypeDef * peripheral_; // SPI peripheral handle | |
165 | - InterruptSynchronizer * sync_; // sync between task and interrupt | |
166 | - CriticalSection * critical_section_; // protect memberfunction | |
164 | + I2C_HandleTypeDef * const peripheral_; // SPI peripheral handle | |
165 | + InterruptSynchronizer * const sync_; // sync between task and interrupt | |
166 | + CriticalSection * const critical_section_; // protect memberfunction | |
167 | 167 | |
168 | 168 | }; |
169 | 169 |
@@ -75,7 +75,7 @@ class Uart : public AbstractUart | ||
75 | 75 | * Store the given uart pointer into the internal variable. This pointer is passed to the STM32 HAL UART functions when needed. |
76 | 76 | * |
77 | 77 | */ |
78 | - Uart(UART_HandleTypeDef * const uart); | |
78 | + Uart(UART_HandleTypeDef * uart); | |
79 | 79 | /** |
80 | 80 | * \brief Destructor. Delete internal variables. |
81 | 81 | */ |