• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

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


Commit MetaInfo

Revision949e6a26a899f672406dd03f6ca7ae00cad462ce (tree)
Time2018-04-30 13:52:16
Authortakemasa <suikan@user...>
Commitertakemasa

Log Message

Sending message from UART1

Change Summary

Incremental Difference

--- a/stm32_development/nucleo-f303k8/Src/my_test.cpp
+++ b/stm32_development/nucleo-f303k8/Src/my_test.cpp
@@ -63,15 +63,18 @@ void DoTestUart(void)
6363
6464 func_ptr const func = reinterpret_cast<func_ptr>(1);
6565
66-// MURASAKI_ASSERT(counter % 2 == 0, "Odd counter");
67- // by murasaki debugging output. You can use this in both task and interrupt context.
68- // non blocking
6966
7067 murasaki::debugger->Printf("Count %4d \r\n", count);
7168 #if 0
69+ MURASAKI_ASSERT(false)
7270 func();
7371 #endif
7472 count++;
73+
74+ // Testing device
75+ murasaki::platform.uart1->Transmit(
76+ reinterpret_cast<uint8_t *>(const_cast<char *>("Hello")), 5);
77+
7578 }
7679
7780 // Hook for the assert_failure() in main.c
@@ -109,6 +112,24 @@ void HAL_UART_RxCpltCallback(UART_HandleTypeDef * huart)
109112
110113 }
111114
115+void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef * hspi) {
116+ if (murasaki::platform.spi1_master->TransmitAndReceiveCompleteCallback(
117+ hspi))
118+ return;
119+}
120+
121+
122+void HAL_I2C_TxCpltCallback(I2C_HandleTypeDef * hi2c) {
123+
124+ if (murasaki::platform.i2c1_master->TransmitCompleteCallback(hi2c))
125+ return;
126+}
127+
128+void HAL_I2C_RxCpltCallback(I2C_HandleTypeDef * hi2c) {
129+
130+ if (murasaki::platform.i2c1_master->ReceiveCompleteCallback(hi2c))
131+ return;
132+}
112133
113134 void CustomDefaultHandler()
114135 {