diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-19 15:07:47 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-19 15:07:47 +0000 |
commit | a042a8234acfdce62f65a5c72112f3256fade060 (patch) | |
tree | fab52fdade992466c216926e26f869d4d50f4fe3 /testhal/STM32F30x/CAN | |
parent | 79ad42bc2b8e9013d0a02a9d758fa8af36322b27 (diff) | |
download | ChibiOS-a042a8234acfdce62f65a5c72112f3256fade060.tar.gz ChibiOS-a042a8234acfdce62f65a5c72112f3256fade060.tar.bz2 ChibiOS-a042a8234acfdce62f65a5c72112f3256fade060.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6183 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F30x/CAN')
-rw-r--r-- | testhal/STM32F30x/CAN/.project | 2 | ||||
-rw-r--r-- | testhal/STM32F30x/CAN/main.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/testhal/STM32F30x/CAN/.project b/testhal/STM32F30x/CAN/.project index a01f8a133..03f4bead6 100644 --- a/testhal/STM32F30x/CAN/.project +++ b/testhal/STM32F30x/CAN/.project @@ -79,7 +79,7 @@ <link>
<name>board</name>
<type>2</type>
- <locationURI>CHIBIOS/boards/ST_STM32F3_DISCOVERY</locationURI>
+ <locationURI>CHIBIOS/os/hal/boards/ST_STM32F3_DISCOVERY</locationURI>
</link>
<link>
<name>os</name>
diff --git a/testhal/STM32F30x/CAN/main.c b/testhal/STM32F30x/CAN/main.c index c44acf566..52e3ad1b6 100644 --- a/testhal/STM32F30x/CAN/main.c +++ b/testhal/STM32F30x/CAN/main.c @@ -32,16 +32,16 @@ static const CANConfig cancfg = { */
static WORKING_AREA(can_rx_wa, 256);
static msg_t can_rx(void *p) {
- EventListener el;
+ event_listener_t el;
CANRxFrame rxmsg;
(void)p;
chRegSetThreadName("receiver");
chEvtRegister(&CAND1.rxfull_event, &el, 0);
- while(!chThdShouldTerminate()) {
+ while(!chThdShouldTerminateX()) {
if (chEvtWaitAnyTimeout(ALL_EVENTS, MS2ST(100)) == 0)
continue;
- while (canReceive(&CAND1, CAN_ANY_MAILBOX, &rxmsg, TIME_IMMEDIATE) == RDY_OK) {
+ while (canReceive(&CAND1, CAN_ANY_MAILBOX, &rxmsg, TIME_IMMEDIATE) == MSG_OK) {
/* Process message.*/
palTogglePad(GPIOE, GPIOE_LED3_RED);
}
@@ -66,7 +66,7 @@ static msg_t can_tx(void * p) { txmsg.data32[0] = 0x55AA55AA;
txmsg.data32[1] = 0x00FF00FF;
- while (!chThdShouldTerminate()) {
+ while (!chThdShouldTerminateX()) {
canTransmit(&CAND1, CAN_ANY_MAILBOX, &txmsg, MS2ST(100));
chThdSleepMilliseconds(500);
}
|