Simulated the CD changer of a Saab to implement a bluetooth connection to the car stereo. Control of playback device (phone) with steering wheel buttons. Needs a RN52 bluetooth transciever and a CAN transiever. So far only audio playback and control via steering wheel buttons implemented. Hands free calling planned.

Dependencies:   mbed

Revision:
8:beb6c399490a
Parent:
7:2df2c6e8c0df
Child:
13:968af0520530
--- a/RN52.h	Thu Jan 14 22:20:38 2016 +0000
+++ b/RN52.h	Fri Jan 15 20:59:51 2016 +0000
@@ -1,18 +1,6 @@
 #ifndef RN52_H
 #define RN52_H
 
-typedef enum
-{
-    RN52_REBOOT,
-    RN52_GETSTATUS,
-    RN52_ASSISTANT,
-    RN52_CALLER_ID,
-    RN52_TRACK_METADATA,
-
-    RN52_COMMAND_LAST
-  
-} RN52_COMMAND;
-
 
 typedef enum
 {
@@ -31,6 +19,7 @@
     RN52_ACTIVE_CALL2,
     RN52_AUDIO_STREAMING,
     RN52_LOW_BATTERY,
+    RN52_NOT_SET,
 
     RN52_CONNECTION_LAST
   
@@ -83,7 +72,9 @@
     bool prev_track();
     bool toggle_play();
     bool maxvolume();
-    bool get(RN52_COMMAND cmd, RN52_RESULT * rn52_result);  
+    bool get_status(RN52_RESULT * result);
+    bool get_caller_id(RN52_RESULT * result);
+    bool get_track_metadata(RN52_RESULT * result);
     bool capture_response(char * str);
     void clear_serial();
     void copy_response(char * source, char * destination, char offset);