Browse Source

add bluetooth stub

main
Hendrik Langer 8 years ago
parent
commit
0642e7c7f4
  1. 33
      src/bluetooth/bluetooth.cpp
  2. 15
      src/bluetooth/bluetooth.h
  3. 1
      src/main.cpp
  4. 2
      src/soundboard.h

33
src/bluetooth/bluetooth.cpp

@ -0,0 +1,33 @@
/*
* bluetooth
*
* see: esp-idf example bluetooth/a2dp_sink
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
//#include "nvs.h"
//#include "nvs_flash.h"
#include "esp_system.h"
#include "esp_log.h"
#include "bt.h"
#include "bluetooth.h"
using namespace std;
Bluetooth::Bluetooth() {
}
void Bluetooth::init() {
}
void Bluetooth::end() {
}

15
src/bluetooth/bluetooth.h

@ -0,0 +1,15 @@
#ifndef _BLUETOOTH_H
#define _BLUETOOTH_H
#include "hardware.h"
class Bluetooth {
public:
Bluetooth();
void init();
void end();
private:
};
#endif /* _BLUETOOTH_H */

1
src/main.cpp

@ -20,6 +20,7 @@ Keyboard keyboard;
SDCard sdcard; SDCard sdcard;
Sound sound; Sound sound;
Wifi wifi; Wifi wifi;
Bluetooth bluetooth;
static const char *soundFile[3][3] = {{"/T0.wav", "/T1.wav", "/T2.wav"}, static const char *soundFile[3][3] = {{"/T0.wav", "/T1.wav", "/T2.wav"},
{"/T3.wav", "/T4.wav", "/T5.wav"}, {"/T3.wav", "/T4.wav", "/T5.wav"},

2
src/soundboard.h

@ -7,6 +7,7 @@
#include "sdcard.h" #include "sdcard.h"
#include "sound.h" #include "sound.h"
#include "wifi.h" #include "wifi.h"
#include "bluetooth/bluetooth.h"
#define WIFI_SSID "ssid" #define WIFI_SSID "ssid"
#define WIFI_PASSWORD "password" #define WIFI_PASSWORD "password"
@ -15,6 +16,7 @@ extern Keyboard keyboard;
extern SDCard sdcard; extern SDCard sdcard;
extern Sound sound; extern Sound sound;
extern Wifi wifi; extern Wifi wifi;
extern Bluetooth bluetooth;
#endif /* _SOUNDBOARD_H */ #endif /* _SOUNDBOARD_H */

Loading…
Cancel
Save