]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - embedded/app/usbcan/can/lpc17xx_can.h
lpc17xx embedded: new function for obtaining chip bittiming constant parameters.
[lincan.git] / embedded / app / usbcan / can / lpc17xx_can.h
index 5f9f4c0a533206d1cb8b2751ae2710c3c63c35b9..9a8b25977de117fbd489eddc6e48f2765e967bec 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "can/can.h"
 #include "can/canmsg.h"
+#include "can/can_bittiming.h"
 
 #ifdef __cplusplus
 extern "C"
@@ -155,29 +156,9 @@ void CAN_init(struct canchip_t *chip);
 void CAN_send(struct canchip_t *chip, canmsg_t* msg);
 void CAN_recv(struct canchip_t *chip, canmsg_t* msg);
 
-
-/*
- * CAN harware-dependent bit-timing constant
- *
- * Used for calculating and checking bit-timing parameters
- */
-
-struct can_bittiming_const {
-       char name[16];          /* Name of the CAN controller hardware */
-       uint32_t tseg1_min;        /* Time segement 1 = prop_seg + phase_seg1 */
-       uint32_t tseg1_max;
-       uint32_t tseg2_min;        /* Time segement 2 = phase_seg2 */
-       uint32_t tseg2_max;
-       uint32_t sjw_max;          /* Synchronisation jump width */
-       uint32_t brp_min;          /* Bit-rate prescaler */
-       uint32_t brp_max;
-       uint32_t brp_inc;
-};
-
 struct can_lmc1_chip_data
 {
        int flags;
-       struct can_bittiming_const btc;
 };