Skip to content

Commit

Permalink
ヘッダーファイル
Browse files Browse the repository at this point in the history
  • Loading branch information
23-yoshikawa committed Jun 1, 2024
1 parent 46c1b3c commit 2f9102b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions include/device/input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,27 @@ class InputModules {
* @param volume_pin ツマミのピン
* @param mpu_pins MPU6050のピン (sda, scl)
*/
class Builder {
private:
std::pair<PinName, PinName> joy_pins;
PinName volume_pin;
std::pair<PinName, PinName> mpu_pins;

public:
auto joy_pins(const PinName& pin) -> Builder&;
auto volume_pin(const PinName& pin) -> Builder&;
auto mpu_pins(const PinName& pin) -> Builder&;
};

private:
InputModules(
const std::pair<PinName, PinName>& joy_pins, const PinName& volume_pin,
const std::pair<PinName, PinName>& mpu_pins);

public:
static auto builder() -> Builder;
InputModules(Builder builder);

InputModules() = delete;
~InputModules() = default;
InputModules(const InputModules&) = delete;
Expand Down

0 comments on commit 2f9102b

Please sign in to comment.