11#ifndef PICO_DRIVER_SRC_GPIO_GPIOBASIC_HPP_
12#define PICO_DRIVER_SRC_GPIO_GPIOBASIC_HPP_
16#if __has_include(<hardware/gpio.h>)
17#include "hardware/gpio.h"
100 virtual void Put(
bool value);
137#if __has_include(<gmock/gmock.h>)
143 MOCK_METHOD1(SetDir,
void(
bool));
144 MOCK_METHOD1(SetInputEnabled,
void(
bool));
145 MOCK_METHOD1(Put,
void(
bool));
146 MOCK_METHOD0(Get,
bool(
void));
147 MOCK_METHOD0(Toggle,
void(
void));
148 MOCK_METHOD0(PullUp,
void(
void));
149 MOCK_METHOD0(PullDown,
void(
void));
150 MOCK_METHOD0(DisablePulls,
void(
void));
Basic GPIO driver class.
Definition: gpiobasic.hpp:68
GpioBasic(SdkWrapper &sdk, uint pin)
Initialize the given GPIO pin and setup the pins.
virtual void PullDown()
Set this GPIO to be pulled down.
virtual void SetDir(bool out)
Set a single GPIO direction.
virtual bool Get()
Get state of a single GPIO.
virtual void Toggle()
Toggle the output level of this GPIO.
virtual ~GpioBasic()
deinit the GPIO by SdkWrapper::gpio_deinit();
virtual void Put(bool value)
Drive a single GPIO high/low.
virtual void SetInputEnabled(bool enabled)
Enable GPIO input.
virtual void PullUp()
Set this GPIO to be pulled up. .
virtual void DisablePulls()
Unset pulls on this GPIO.
Wrapper class for the RasPi Pico SDK functions.
Definition: sdkwrapper.hpp:74
Collection of the RP2040/RP2350 control.
Definition: adau1361.hpp:17
Wrapper for RasPi Pico SDK API.