Reorganized project
This commit is contained in:
7
main/include/a2dp.h
Normal file
7
main/include/a2dp.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
namespace a2dp {
|
||||
void init();
|
||||
void connect_to_last();
|
||||
}
|
||||
8
main/include/avrcp.h
Normal file
8
main/include/avrcp.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
namespace avrcp {
|
||||
void init();
|
||||
|
||||
uint8_t get_volume();
|
||||
void set_volume(uint8_t volume);
|
||||
}
|
||||
6
main/include/bluetooth.h
Normal file
6
main/include/bluetooth.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace bluetooth {
|
||||
void init();
|
||||
void set_scan_mode(bool connectable);
|
||||
}
|
||||
8
main/include/helper.h
Normal file
8
main/include/helper.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "esp_bt_device.h"
|
||||
#include "esp_a2dp_api.h"
|
||||
|
||||
const char* addr_to_str(esp_bd_addr_t bda);
|
||||
const char* connection_state_to_str(esp_a2d_connection_state_t state);
|
||||
|
||||
12
main/include/i2s.h
Normal file
12
main/include/i2s.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#define I2S_PORT I2S_NUM_0
|
||||
|
||||
namespace i2s {
|
||||
void init();
|
||||
|
||||
uint32_t get_sample_rate();
|
||||
void set_sample_rate(uint32_t sample_rate);
|
||||
}
|
||||
11
main/include/storage.h
Normal file
11
main/include/storage.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "esp_bt_device.h"
|
||||
|
||||
namespace nvs {
|
||||
void init();
|
||||
|
||||
void get_last_connection(esp_bd_addr_t last_connection);
|
||||
void set_last_connection(esp_bd_addr_t last_connection);
|
||||
bool has_last_connection();
|
||||
}
|
||||
14
main/include/wav.h
Normal file
14
main/include/wav.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#define WAV_PLAY_HELPER(str) #str
|
||||
#define WAV_PLAY(NAME) {\
|
||||
extern const uint8_t _binary_ ## NAME ## _wav_start[]; \
|
||||
extern const uint8_t _binary_ ## NAME ## _wav_end[]; \
|
||||
wav::play(_binary_ ## NAME ## _wav_start, _binary_ ## NAME ## _wav_end); \
|
||||
}
|
||||
|
||||
namespace wav {
|
||||
void play(const uint8_t* start, const uint8_t* end);
|
||||
}
|
||||
Reference in New Issue
Block a user