Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
RN52.h
- Committer:
- petter
- Date:
- 2016-01-04
- Revision:
- 2:10c60edc8573
- Parent:
- 0:6cf6e566c0da
- Child:
- 4:3041a571b7a7
File content as of revision 2:10c60edc8573:
#ifndef RN52_H #define RN52_H typedef enum { RN52_PLAYPAUSE, RN52_NEXTTRACK, RN52_PREVTRACK, RN52_CONNECT, RN52_DISCONNECT, RN52_REBOOT, RN52_VOLUMEUP, RN52_MAXVOLUME, RN52_GETSTATUS, RN52_ASSISTANT, RN52_CALLER_ID, RN52_TRACK_METADATA, RN52_COMMAND_LAST } RN52_COMMAND; typedef enum { RN52_LIMBO, RN52_CONNECTABLE, RN52_CONNECTABLE_DISCOVERABLE, RN52_CONNECTED, RN52_OUTGOING_CALL, RN52_INCOMING_CALL, RN52_ACTIVE_CALL, RN52_TEST_MODE, RN52_THREE_WAY_CALL_WAITING, RN52_THREE_WAY_CALL_ON_HOLD, RN52_THREE_WAY_CALL_MULTI_CALL, RN52_INCOMING_CALL_ON_HOLD, RN52_ACTIVE_CALL2, RN52_AUDIO_STREAMING, RN52_LOW_BATTERY, RN52_CONNECTION_LAST } RN52_CONNECTION; typedef enum { RN52_NO_EVENT, RN52_OTHER_EVENT, RN52_CALLER_ID_EVENT, RN52_TRACK_CHANGE_EVENT, RN52_EVENT_LAST } RN52_EVENT; typedef struct { RN52_EVENT event; bool media_connected; bool phone_connected; RN52_CONNECTION connection; char response[40]; } RN52_RESULT; //---------------------------------------------------------------------------- // CLASS //---------------------------------------------------------------------------- class RN52 { public: void init(); bool changed(); bool set(RN52_COMMAND cmd); bool get(RN52_COMMAND cmd, RN52_RESULT * rn52_result); void capture_response(char * str); }; #endif