|
|
| HardwareGPIO_RPI ()=default |
| | Constructor for HardwareGPIO_RPI.
|
| | HardwareGPIO_RPI (const char *devName) |
| | Constructor for HardwareGPIO_RPI with custom device name.
|
|
| ~HardwareGPIO_RPI () |
| | Destructor for HardwareGPIO_RPI.
|
| int | analogRead (pin_size_t pinNumber) override |
| | Read an analog value from a pin (if supported).
|
| void | analogReference (uint8_t mode) override |
| | Set the analog reference mode.
|
| void | analogWrite (pin_size_t pinNumber, int value) override |
| | Write an analog value (PWM) to a pin.
|
| void | analogWriteFrequency (pin_size_t pin, uint32_t freq) |
| | Set PWM frequency for a pin.
|
| void | analogWriteResolution (uint8_t bits) |
| | Set the resolution (number of bits) for analogWrite (PWM output).
|
| void | begin () |
| | Initialize the GPIO hardware interface for Raspberry Pi.
|
| PinStatus | digitalRead (pin_size_t pinNumber) override |
| | Read a digital value from a GPIO pin.
|
| void | digitalWrite (pin_size_t pinNumber, PinStatus status) override |
| | Write a digital value to a GPIO pin.
|
| void | noTone (uint8_t _pin) override |
| | Stop tone generation on a pin.
|
| | operator bool () |
| | Boolean conversion operator.
|
| void | pinMode (pin_size_t pinNumber, PinMode pinMode) override |
| | Set the mode of a GPIO pin (INPUT, OUTPUT, etc).
|
| unsigned long | pulseIn (uint8_t pin, uint8_t state, unsigned long timeout=1000000L) override |
| | Measure pulse duration on a pin.
|
| unsigned long | pulseInLong (uint8_t pin, uint8_t state, unsigned long timeout=1000000L) override |
| | Measure long pulse duration on a pin.
|
| void | tone (uint8_t _pin, unsigned int frequency, unsigned long duration=0) override |
| | Generate a tone on a pin.
|
GPIO hardware abstraction for Raspberry Pi in the Arduino emulator.
This class implements the Arduino-style GPIO interface for Raspberry Pi platforms, allowing digital and analog I/O, PWM, and timing functions to be used in a manner compatible with Arduino code. It provides methods to configure pin modes, read and write digital/analog values, generate PWM signals, and perform timing operations such as pulse measurement and tone generation.
The class inherits from HardwareGPIO and is intended for use within the emulator when running on Raspberry Pi hardware. It manages pin state, analog reference, and PWM frequency settings for supported pins.
- Note
- This class is only available when USE_RPI is defined.