Nintendo R.O.B. Control Library
v1.1.2
Library to control the Nintendo Robotic Operating Buddy
|
The Arduino implementation of the hardware abstraction layer interface. More...
#include <hal_arduino.hpp>
Public Member Functions | |
nes::rob::error_code | delayMicroseconds (unsigned int us) const override |
Delay program execution for the specified number of microseconds. More... | |
nes::rob::error_code | digitalWrite (unsigned int pin, int state) const override |
Drive the output voltage of a digital GPIO pin. More... | |
nes::rob::error_code | init (void *reserved=nullptr) override |
Initialize the HAL. More... | |
nes::rob::error_code | pinMode (unsigned int pin, int mode) const override |
Drive the output voltage of a digital GPIO pin. More... | |
![]() | |
virtual | ~HardwareAbstractionLayer (void) |
Additional Inherited Members | |
![]() | |
static const int | PIN_MODE_INPUT = INPUT |
The GPIO mode used to sample digital signals. More... | |
static const int | PIN_MODE_INPUT_PULLUP = INPUT_PULLUP |
The GPIO mode used to sample digital signals with internal pullup resistor enabled. More... | |
static const int | PIN_MODE_OUTPUT = OUTPUT |
The GPIO mode used to write digital signals. More... | |
static const int | PIN_STATE_HIGH = HIGH |
The digital signal value indicating high voltage (typically Vcc) More... | |
static const int | PIN_STATE_LOW = LOW |
The digital signal value indicating low voltage (typically Vdd) More... | |
The Arduino implementation of the hardware abstraction layer interface.
The hardware abstraction layer abstracts Arduino specific behavior such as GPIO peripherals, clock timing, and other configuration.
|
overridevirtual |
Delay program execution for the specified number of microseconds.
[in] | us | The number of microseconds to delay |
nes::rob::error_code
describing errors encountered during processing nes::rob::hal_error::success | No errors encountered during processing. |
nes::rob::hal_error::sys_clock | An unspecified error occured while interacting with the system clock. |
Implements nes::rob::HardwareAbstractionLayer.
|
overridevirtual |
Drive the output voltage of a digital GPIO pin.
[in] | pin | The pin number associated to the target GPIO pin |
[in] | state | The desired state of the pin |
PIN_STATE_HIGH
PIN_STATE_LOW
nes::rob::error_code
describing errors encountered during processing nes::rob::hal_error::success | No errors encountered during processing. |
nes::rob::hal_error::peripheral_gpio | An unspecified error occured while interacting with the GPIO peripheral. |
Implements nes::rob::HardwareAbstractionLayer.
|
overridevirtual |
Initialize the HAL.
Performs necessary operations to initialize the hardware abstraction layer implementation.
[in,out] | reserved | Supports hardware specific initialization parameters |
nes::rob::error_code
describing errors encountered during processing nes::rob::hal_error::success | No errors encountered during processing. |
nes::rob::hal_error::sys_config | An unspecified error occured during system configuration. |
Implements nes::rob::HardwareAbstractionLayer.
|
overridevirtual |
Drive the output voltage of a digital GPIO pin.
[in] | pin | The pin number associated to the target GPIO pin |
[in] | mode | The desired mode of operation for the pin |
PIN_MODE_INPUT
PIN_MODE_INPUT_PULLUP
PIN_MODE_OUTPUT
nes::rob::error_code
describing errors encountered during processing nes::rob::hal_error::success | No errors encountered during processing. |
nes::rob::hal_error::peripheral_gpio | An unspecified error occured while interacting with the GPIO peripheral. |
Implements nes::rob::HardwareAbstractionLayer.