aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F4xx
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32F4xx')
-rw-r--r--testhal/STM32F4xx/CAN/.project52
-rw-r--r--testhal/STM32F4xx/CAN/main.c7
2 files changed, 56 insertions, 3 deletions
diff --git a/testhal/STM32F4xx/CAN/.project b/testhal/STM32F4xx/CAN/.project
index 91c2aa2ca..3c1df9502 100644
--- a/testhal/STM32F4xx/CAN/.project
+++ b/testhal/STM32F4xx/CAN/.project
@@ -9,6 +9,58 @@
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value>-j1</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
</arguments>
</buildCommand>
<buildCommand>
diff --git a/testhal/STM32F4xx/CAN/main.c b/testhal/STM32F4xx/CAN/main.c
index e095da4d5..2ff2025e0 100644
--- a/testhal/STM32F4xx/CAN/main.c
+++ b/testhal/STM32F4xx/CAN/main.c
@@ -56,7 +56,8 @@ static msg_t can_rx(void *p) {
while(!chThdShouldTerminate()) {
if (chEvtWaitAnyTimeout(ALL_EVENTS, MS2ST(100)) == 0)
continue;
- while (canReceive(cip->canp, 1, &rxmsg, TIME_IMMEDIATE) == RDY_OK) {
+ while (canReceive(cip->canp, CAN_ANY_MAILBOX,
+ &rxmsg, TIME_IMMEDIATE) == RDY_OK) {
/* Process message.*/
palTogglePad(GPIOD, cip->led);
}
@@ -82,8 +83,8 @@ static msg_t can_tx(void * p) {
txmsg.data32[1] = 0x00FF00FF;
while (!chThdShouldTerminate()) {
- canTransmit(&CAND1, CAN_ANY_TX_MAILBOX, &txmsg, MS2ST(100));
- canTransmit(&CAND2, CAN_ANY_TX_MAILBOX, &txmsg, MS2ST(100));
+ canTransmit(&CAND1, CAN_ANY_MAILBOX, &txmsg, MS2ST(100));
+ canTransmit(&CAND2, CAN_ANY_MAILBOX, &txmsg, MS2ST(100));
chThdSleepMilliseconds(500);
}
return 0;