Nintendo R.O.B. Control Library
v1.1.2
Library to control the Nintendo Robotic Operating Buddy
|
The pulse driver interface. More...
#include <pulse_driver.hpp>
Public Member Functions | |
virtual | ~PulseDriver (void) |
virtual nes::rob::error_code | init (void *reserved=nullptr)=0 |
Initialize the pulse driver. More... | |
virtual nes::rob::error_code | pulse (void *reserved=nullptr) const =0 |
Generate a protocol specific pulse. More... | |
virtual nes::rob::error_code | rest (void *reserved=nullptr) const =0 |
Generate a protocol specified rest period. More... | |
The pulse driver interface.
A pulse driver is responsible for generating protocol signals to be interpreted by the Nintendo R.O.B.
|
inlinevirtual |
|
pure virtual |
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. |
Implemented in nes::rob::WWaveDriver, nes::rob::LedNtscDriver, and nes::rob::ArduinoDebugDriver.
|
pure virtual |
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. |
Implemented in nes::rob::WWaveDriver, nes::rob::LedNtscDriver, and nes::rob::ArduinoDebugDriver.
|
pure virtual |
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. |
Implemented in nes::rob::WWaveDriver, nes::rob::LedNtscDriver, and nes::rob::ArduinoDebugDriver.