MCPcopy Create free account
hub / github.com/OpenEarable/open-earable / get_data

Method get_data

src/custom_sensor/PDM_Sensor.cpp:20–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20void PDM_Sensor::get_data(int sensorID, byte *data) {
21 if (sensorID != PDM_MIC) {
22 memset(data, 0, sizeof(int16_t) * AUDIO_STREAM_PACKAGE_SIZE); /////??????
23 return;
24 }
25
26 memcpy(data, _buffer, sizeof(int16_t) * AUDIO_STREAM_PACKAGE_SIZE);
27}
28
29void PDM_Sensor::setBuffer(uint8_t * buffer) {
30 _buffer = buffer;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected