Sound Byte Libs
0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
driver.hpp
Go to the documentation of this file.
1
/**
2
* @file driver.hpp
3
* @brief GPIO driver interface - canonical types for MCU driver implementations
4
* @ingroup hal
5
*
6
* This header provides everything a GPIO driver needs:
7
* - GpioHandle: Pin reference with port, pin, and polarity
8
* - PinMode: Pin configuration modes
9
*
10
* Drivers implement the following static interface:
11
* @code
12
* static void set_mode(const sbl::GpioHandle& handle, sbl::gpio::PinMode mode);
13
* static void write(const sbl::GpioHandle& handle, bool value);
14
* static bool read(const sbl::GpioHandle& handle);
15
* static void toggle(const sbl::GpioHandle& handle);
16
* @endcode
17
*
18
* Usage in driver:
19
* @code
20
* #include <sbl/hw/hal/gpio/driver.hpp>
21
* using sbl::gpio::PinMode;
22
* @endcode
23
*/
24
25
#ifndef SBL_HW_HAL_GPIO_DRIVER_HPP_
26
#define SBL_HW_HAL_GPIO_DRIVER_HPP_
27
28
#include "
handle.hpp
"
29
#include "
types.hpp
"
30
31
namespace
sbl
{
32
33
namespace
gpio {
34
using
PinMode
=
sbl::hal::gpio::PinMode
;
35
using
PinLevel
=
sbl::hal::gpio::PinLevel
;
36
}
// namespace gpio
37
38
}
// namespace sbl
39
40
#endif
// SBL_HW_HAL_GPIO_DRIVER_HPP_
sbl::hal::gpio::PinMode
PinMode
GPIO pin modes.
Definition
types.hpp:25
sbl::hal::gpio::PinLevel
PinLevel
Digital logic levels.
Definition
types.hpp:39
sbl
Root namespace for all Sound Byte Libs code.
Definition
audio_capture.hpp:16
types.hpp
MIDI message types.
handle.hpp
UART handle type for hardware abstraction.
src
sbl
hw
hal
gpio
driver.hpp
Generated by
1.9.8