Just4Trionic - CAN and BDM FLASH programmer for Saab cars

Dependencies:   mbed

Revision:
5:1775b4b13232
Parent:
2:bf3a2b29259a
--- a/bdmcpu32.h	Wed Sep 11 11:55:51 2013 +0000
+++ b/bdmcpu32.h	Sat Apr 25 17:07:08 2015 +0000
@@ -31,9 +31,9 @@
 // MCU status macros
 #ifndef IGNORE_VCC_PIN
 //    #define IS_CONNECTED    (PIN_PWR)
-    #define IS_CONNECTED    (bool)((LPC_GPIO1->FIOPIN) & (1 << 30))     // PIN_POWER is p19 p1.30
+#define IS_CONNECTED    (bool)((LPC_GPIO1->FIOPIN) & (1 << 30))     // PIN_POWER is p19 p1.30
 #else
-    #define IS_CONNECTED    true
+#define IS_CONNECTED    true
 #endif    // IGNORE_VCC_PIN
 
 //#define IN_BDM              (PIN_FREEZE)
@@ -51,6 +51,18 @@
 uint8_t bkpt_high();
 uint8_t reset_low();
 uint8_t reset_high();
+uint8_t berr_low();
+uint8_t berr_high();
+uint8_t berr_input();
+
+// BDM Clock speed
+enum bdm_speed {
+    SLOW,
+    FAST,
+    TURBO,
+    NITROUS
+};
+void bdm_clk_mode(bdm_speed mode);
 
 // memory
 uint8_t memread_byte(uint8_t* result, const uint32_t* addr);