Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
aliases.hpp
Go to the documentation of this file.
1/**
2 * @file aliases.hpp
3 * @brief Optional convenience aliases for SBL namespaces
4 *
5 * Include this header to bring driver functions and common types
6 * into the sbl:: namespace for shorter code. This is opt-in.
7 *
8 * Without aliases (explicit):
9 * sbl::driver::Gpio::set_mode(pin, sbl::driver::PinMode::Output);
10 * sbl::driver::Timer::delay_ms(500);
11 *
12 * With aliases (convenient):
13 * sbl::Gpio::set_mode(pin, sbl::PinMode::Output);
14 * sbl::Timer::delay_ms(500);
15 */
16
17#ifndef SBL_ALIASES_HPP_
18#define SBL_ALIASES_HPP_
19
20#include <sbl/driver/gpio.hpp>
21#include <sbl/driver/timer.hpp>
22#include <sbl/driver/init.hpp>
23
24namespace sbl {
25
26// Driver class aliases
27using Gpio = driver::Gpio;
28using Timer = driver::Timer;
29using PinMode = driver::PinMode;
30
31// Driver function aliases
32using driver::init;
33
34} // namespace sbl
35
36#endif // SBL_ALIASES_HPP_
Root namespace for all Sound Byte Libs functionality.
Definition aliases.hpp:24
driver::Gpio Gpio
Definition aliases.hpp:27
driver::Timer Timer
Definition aliases.hpp:28
driver::PinMode PinMode
Definition aliases.hpp:29