Skip to content

Commit 6d15719

Browse files
committed
namespace audio_driver_local
1 parent f5e1f0d commit 6d15719

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/DriverPins.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,15 @@ class DriverPins {
291291
return addPin(pin);
292292
}
293293
/// Get pin information by function
294-
Optional<PinsFunction> getPin(PinFunction function, int pos = 0) {
294+
audio_driver_local::Optional<PinsFunction> getPin(PinFunction function, int pos = 0) {
295295
for (PinsFunction &pin : pins) {
296296
if (pin.function == function && pin.index == pos) return pin;
297297
}
298298
return {};
299299
}
300300

301301
/// Get pin information by pin ID
302-
Optional<PinsFunction> getPin(GpioPin pinId) {
302+
audio_driver_local::Optional<PinsFunction> getPin(GpioPin pinId) {
303303
for (PinsFunction &pin : pins) {
304304
if (pin.pin == pinId) return pin;
305305
}
@@ -313,29 +313,29 @@ class DriverPins {
313313
}
314314

315315
/// Finds the I2C pin info with the help of the function
316-
Optional<PinsI2C> getI2CPins(PinFunction function) {
316+
audio_driver_local::Optional<PinsI2C> getI2CPins(PinFunction function) {
317317
PinsI2C *pins = getPtr<PinsI2C>(function, i2c);
318318
if (pins == nullptr) return {};
319319
return *pins;
320320
}
321321

322322
/// Finds the SPI pin info with the help of the function
323-
Optional<PinsSPI> getSPIPins(PinFunction function) {
323+
audio_driver_local::Optional<PinsSPI> getSPIPins(PinFunction function) {
324324
PinsSPI *pins = getPtr<PinsSPI>(function, spi);
325325
if (pins == nullptr) return {};
326326
return *pins;
327327
}
328328

329329
/// Finds the I2S pin info with the help of the port
330-
Optional<PinsI2S> getI2SPins(int port) {
330+
audio_driver_local::Optional<PinsI2S> getI2SPins(int port) {
331331
for (PinsI2S &pins : i2s) {
332332
if (pins.port == port) return pins;
333333
}
334334
return {};
335335
}
336336

337337
/// Finds the I2S pin info with the help of the function
338-
Optional<PinsI2S> getI2SPins(PinFunction function = PinFunction::CODEC) {
338+
audio_driver_local::Optional<PinsI2S> getI2SPins(PinFunction function = PinFunction::CODEC) {
339339
PinsI2S *pins = getPtr<PinsI2S>(function, i2s);
340340
if (pins == nullptr) return {};
341341
return *pins;
@@ -401,15 +401,15 @@ class DriverPins {
401401
bool sd_active = true;
402402

403403
template <typename T>
404-
T *getPtr(PinFunction function, Vector<T> &vect) {
404+
T *getPtr(PinFunction function, audio_driver_local::Vector<T> &vect) {
405405
for (auto &pins : vect) {
406406
if (pins.function == function) return &pins;
407407
}
408408
return nullptr;
409409
}
410410

411411
template <typename T>
412-
bool set(T pin, Vector<T> &vect) {
412+
bool set(T pin, audio_driver_local::Vector<T> &vect) {
413413
T *pins = getPtr<T>(pin.function, vect);
414414
if (pins == nullptr) return false;
415415
*pins = pin;

0 commit comments

Comments
 (0)