Nico Bollen / LIN

Dependents:   MBED_LIN_RGB_Master_Example

Revision:
4:41b153e9a39c
Parent:
3:3656b0de0e43
Child:
5:b42737f5dabc
--- a/LinMaster.h	Tue May 26 08:33:46 2015 +0000
+++ b/LinMaster.h	Tue Jun 16 06:22:42 2015 +0000
@@ -1,7 +1,7 @@
 /*
  * A master device LIN communication library for mbed
  * 
- * Copyright (C) 2014 TASS Belgium NV
+ * Copyright (C) 2015 Bollen Nico
  * 
  * Released under GPL v2
  *
@@ -34,11 +34,13 @@
  * #include "mbed.h"
  * #include "LinMaster.h"
  * 
- * LinMaster lin(p30);
+ * LinMaster lin(p10, p9);
  * 
  * int main() {
  *     (void)lin.init();
- *     (void)lin.sendframe(M2S, 0x3C, (uint8_t*)u8Data, 8);
+ *     (void)MyLinMaster.tx_frame(&M2Sframe);
+ *     while(MyLinMaster.status() != LinMaster::IDLE);
+ *     void)MyLinMaster.rx_frame(&S2Mframe);
  * }
  * @endcode
  */
@@ -133,7 +135,7 @@
      *   true on succes,
      *   false on fail
      */
-    bool tx_frame(Frame_t * ptrFrame);
+    bool send_frame(Frame_t * ptrFrame);
     
     /** Receive a frame on the LIN bus
      *
@@ -142,7 +144,7 @@
      *   true on succes,
      *   false on fail
      */
-    bool rx_frame(Frame_t * ptrFrame);
+    bool get_rx_data(Frame_t * ptrFrame);
     
     void TickEventHndl(void);
     
@@ -215,8 +217,9 @@
     uint16_t RXtimeoutSubCTR;
     uint16_t u16HalfBitPeriod;
 
-    PinName  MyInPin;
-    PinName  MyOutPin;
+    DigitalOut  LinOutPin;
+    DigitalIn   LinInPin;
+    InterruptIn LinIntPin;
     Ticker   MyTicker;
     Timer    MyTimer;