shared_fooの不要ディレクトリ削除前のもの
Revision | 4937f04e4ba5d71b7d757f6b0a946737b0ad396c (tree) |
---|---|
Time | 2018-03-11 16:28:03 |
Author | takemasa <suikan@user...> |
Commiter | takemasa |
Change isTaskText() to IsTaskText() to follow the Google style guide
@@ -25,7 +25,7 @@ CriticalSection::~CriticalSection() | ||
25 | 25 | |
26 | 26 | void CriticalSection::Enter() |
27 | 27 | { |
28 | - MURASAKI_ASSERT(isTaskContext()); | |
28 | + MURASAKI_ASSERT(IsTaskContext()); | |
29 | 29 | bool result = xSemaphoreTake(mutex_, kwmsIndefinitely); |
30 | 30 | MURASAKI_ASSERT(result); // true if xSemaphoreTake() success |
31 | 31 |
@@ -33,7 +33,7 @@ void CriticalSection::Enter() | ||
33 | 33 | |
34 | 34 | void CriticalSection::Leave() |
35 | 35 | { |
36 | - MURASAKI_ASSERT(isTaskContext()); | |
36 | + MURASAKI_ASSERT(IsTaskContext()); | |
37 | 37 | bool result = xSemaphoreGive(mutex_); |
38 | 38 | MURASAKI_ASSERT(result); // true if xSemaphoreGive() success |
39 | 39 | } |
@@ -98,7 +98,7 @@ void Debugger::printf(const char * fmt, ...) | ||
98 | 98 | |
99 | 99 | char Debugger::GetchFromTask() |
100 | 100 | { |
101 | - MURASAKI_ASSERT(isTaskContext()); | |
101 | + MURASAKI_ASSERT(IsTaskContext()); | |
102 | 102 | |
103 | 103 | return helpers_.logger->getCharacter(); |
104 | 104 | } |
@@ -116,7 +116,7 @@ void Debugger::RePrint() | ||
116 | 116 | |
117 | 117 | void Debugger::AutoRePrint() |
118 | 118 | { |
119 | - MURASAKI_ASSERT(isTaskContext()); | |
119 | + MURASAKI_ASSERT(IsTaskContext()); | |
120 | 120 | // protecting from double task creation |
121 | 121 | if (auto_reprint_enable_) |
122 | 122 | return; |
@@ -43,7 +43,7 @@ void DebuggerFifo::NotifyData() | ||
43 | 43 | |
44 | 44 | unsigned int DebuggerFifo::Get(uint8_t data[], unsigned int size) |
45 | 45 | { |
46 | - MURASAKI_ASSERT(murasaki::isTaskContext()) | |
46 | + MURASAKI_ASSERT(murasaki::IsTaskContext()) | |
47 | 47 | unsigned int ret_val; |
48 | 48 | |
49 | 49 | taskENTER_CRITICAL(); |
@@ -39,7 +39,7 @@ | ||
39 | 39 | murasaki::debugger->printf("--------------------\n\r");\ |
40 | 40 | murasaki::debugger->printf(MURASAKI_ASSERT_MSG, __func__, __LINE__,__FILE__ );\ |
41 | 41 | murasaki::debugger->printf("Fail expression : %s\r\n", #COND);\ |
42 | - if ( murasaki::isTaskContext() )\ | |
42 | + if ( murasaki::IsTaskContext() )\ | |
43 | 43 | vTaskSuspend(nullptr);\ |
44 | 44 | } |
45 | 45 | #endif |
@@ -86,7 +86,7 @@ enum SpiClockPhase | ||
86 | 86 | * \brief determine task or ISR context |
87 | 87 | * \returns true if task context, false if ISR context. |
88 | 88 | */ |
89 | -inline bool isTaskContext() | |
89 | +inline bool IsTaskContext() | |
90 | 90 | { |
91 | 91 | // portNVIC_INT_CTRL_REG is mapped to the address 0xe000ed04 by portmacro.h. This register is |
92 | 92 | // officially called as NVIC ICSR by ARM |
@@ -24,14 +24,14 @@ Synchronizer::~Synchronizer() | ||
24 | 24 | |
25 | 25 | bool Synchronizer::Wait(WaitMilliSeconds timeout_ms) |
26 | 26 | { |
27 | - MURASAKI_ASSERT(isTaskContext()); | |
27 | + MURASAKI_ASSERT(IsTaskContext()); | |
28 | 28 | return (pdTRUE == xSemaphoreTake(semaphore_, timeout_ms / portTICK_PERIOD_MS)); |
29 | 29 | |
30 | 30 | } |
31 | 31 | |
32 | 32 | void Synchronizer::Release() |
33 | 33 | { |
34 | - if (isTaskContext()) | |
34 | + if (IsTaskContext()) | |
35 | 35 | ::xSemaphoreGive(semaphore_ ); |
36 | 36 | else |
37 | 37 | ::xSemaphoreGiveFromISR(semaphore_, nullptr); |
@@ -27,7 +27,7 @@ void UartLogger::putMessage(char message[], unsigned int size) | ||
27 | 27 | { |
28 | 28 | MURASAKI_ASSERT(nullptr != message) |
29 | 29 | MURASAKI_ASSERT(65536 > size); |
30 | - MURASAKI_ASSERT(isTaskContext()); | |
30 | + MURASAKI_ASSERT(IsTaskContext()); | |
31 | 31 | uart_->Transmit(reinterpret_cast<uint8_t *>(message), // Message to send |
32 | 32 | size, // length of message by byte. |
33 | 33 | static_cast<WaitMilliSeconds>( PLATFORM_CONFIG_DEBUG_SERIAL_TIMEOUT) // wait eternaly |
@@ -39,7 +39,7 @@ char UartLogger::getCharacter() | ||
39 | 39 | { |
40 | 40 | char buf; |
41 | 41 | |
42 | - MURASAKI_ASSERT(isTaskContext()); | |
42 | + MURASAKI_ASSERT(IsTaskContext()); | |
43 | 43 | uart_->Receive(reinterpret_cast<uint8_t *>(&buf), // buffer to receive |
44 | 44 | 1, // receive one char |
45 | 45 | (WaitMilliSeconds) PLATFORM_CONFIG_DEBUG_SERIAL_TIMEOUT); // wait forever |