Nintendo R.O.B. Control Library
v1.1.2
Library to control the Nintendo Robotic Operating Buddy
|
The W square wave implementation of the pulse driver interface. More...
#include <w_wave_driver.hpp>
Public Member Functions | |
WWaveDriver (HardwareAbstractionLayer *hal, unsigned int pin) | |
constructor More... | |
nes::rob::error_code | init (void *reserved=nullptr) override |
Initialize the pulse driver. More... | |
nes::rob::error_code | pulse (void *reserved=nullptr) const override |
Generate a protocol specific pulse. More... | |
nes::rob::error_code | rest (void *reserved=nullptr) const override |
Generate a protocol specified rest period. More... | |
![]() | |
virtual | ~PulseDriver (void) |
The W square wave implementation of the pulse driver interface.
This implementation typically requires some form of hardware modification, which provides access to the ribbon cable running between the IC in R.O.B.s head and the motherboard in the base. The pulses emitted are modeled after the W square wave generated by the IC in R.O.B.'s head.
WWaveDriver::WWaveDriver | ( | HardwareAbstractionLayer * | hal, |
unsigned int | pin | ||
) |
constructor
[in] | hal | A HardwareAbstractionLayer instance |
[in] | pin | The digital GPIO pin used to generate pulses |
|
overridevirtual |
Initialize the pulse driver.
Performs necessary operations to initialize the pulse driver implementation.
[in,out] | reserved | Supports driver specific initialization parameters |
nes::rob::error_code
describing errors encountered during processing nes::rob::pulse_driver_error::success | No errors encountered during processing. |
nes::rob::pulse_driver_error::hal_init | A HAL error occured during the pulse driver initialization. |
Implements nes::rob::PulseDriver.
|
overridevirtual |
Generate a protocol specific pulse.
Performs necessary GPIO operations to generate a protocol compatible pulse.
[in,out] | reserved | Supports driver specific implementation parameters |
nes::rob::error_code
describing errors encountered during processing nes::rob::pulse_driver_error::success | No errors encountered during processing. |
nes::rob::pulse_driver_error::hal_clock | A clock error occured during pulse generation. |
nes::rob::pulse_driver_error::hal_gpio_config | Unable to configure GPIO peripheral for pulse generation. |
nes::rob::pulse_driver_error::hal_gpio_state | Unable to set GPIO state during pulse generation. |
Implements nes::rob::PulseDriver.
|
overridevirtual |
Generate a protocol specified rest period.
Places GPIO in resting state and awaits a period defined by the protocol.
[in,out] | reserved | Supports driver specific implementation parameters |
nes::rob::error_code
describing errors encountered during processing nes::rob::pulse_driver_error::success | No errors encountered during processing. |
nes::rob::pulse_driver_error::hal_clock | A clock error occured while observing rest period. |
nes::rob::pulse_driver_error::hal_gpio_config | Unable to configure GPIO peripheral for resting state. |
nes::rob::pulse_driver_error::hal_gpio_state | Unable to set GPIO pin in resting state. |
Implements nes::rob::PulseDriver.