test

Fork of CANnucleo by Zoltan Hudak

Revision:
1:eb04f7f0478d
Parent:
0:e29bc8e0dddd
Child:
2:09a0d2838572
--- a/can_api.c	Sun Jul 19 09:06:26 2015 +0000
+++ b/can_api.c	Sun Jul 19 14:04:31 2015 +0000
@@ -1,15 +1,13 @@
 /*
  can_api.c for STMicroelectronics mbed boards equipped with Controller Area Network interface:
 
- NUCLEO-F070RB
  NUCLEO-F072RB
+ NUCLEO-F091RC
  NUCLEO-F103RB
  NUCLEO-F302R8
+ NUCLEO-F303RE
  NUCLEO-F334R8
- NUCLEO-F303RE
- NUCLEO-F091RC
  DISCO-F334C8
- DISCO-F746NG
 
  Copyright (c) 2015 Zoltan Hudak <hudakz@inbox.com>
  All rights reserved.
@@ -63,15 +61,12 @@
  * @retval
  */
 int can_frequency(can_t* obj, int hz) {
-
-    /* Disable the NVIC for CAN reception */
-
     HAL_NVIC_DisableIRQ(USB_LP_CAN1_RX0_IRQn);
 
 #if defined(TARGET_NUCLEO_F103RB) || \
     defined(TARGET_NUCLEO_F302R8) || \
+    defined(TARGET_NUCLEO_F303RE) || \
     defined(TARGET_NUCLEO_F334R8) || \
-    defined(TARGET_NUCLEO_F303RE) || \
     defined(TARGET_DISCO_F334C8)
     // APB1 pheripheral clock = 36000000Hz
 
@@ -118,8 +113,7 @@
         _canHandle.Init.BS2 = CAN_BS2_4TQ;
     }
 
-#elif defined(TARGET_NUCLEO_F070RB) || \
-      defined(TARGET_NUCLEO_F072RB) || \ 
+#elif defined(TARGET_NUCLEO_F072RB) || \ 
       defined(TARGET_NUCLEO_F091RC)
     // APB1 pheripheral clock = 48000000Hz
 
@@ -198,10 +192,6 @@
  * @param
  * @retval
  */
-//void can_irq_set(can_t* obj, CanIrqType irq, uint32_t enable)
-//{
-
-//}
 void can_irq_set(void (*fptr) (void)) {
     rxCompleteCallback = fptr;
 }
@@ -351,3 +341,4 @@
 
     // not implemented
 }
+