Nintendo R.O.B. Control Library  v1.1.2
Library to control the Nintendo Robotic Operating Buddy
Public Member Functions | List of all members
nes::rob::PulseDriver Class Referenceabstract

The pulse driver interface. More...

#include <pulse_driver.hpp>

Inheritance diagram for nes::rob::PulseDriver:
Inheritance graph
[legend]

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...
 

Detailed Description

The pulse driver interface.

A pulse driver is responsible for generating protocol signals to be interpreted by the Nintendo R.O.B.

Constructor & Destructor Documentation

◆ ~PulseDriver()

virtual nes::rob::PulseDriver::~PulseDriver ( void  )
inlinevirtual

Member Function Documentation

◆ init()

virtual nes::rob::error_code nes::rob::PulseDriver::init ( void *  reserved = nullptr)
pure virtual

Initialize the pulse driver.

Performs necessary operations to initialize the pulse driver implementation.

Parameters
[in,out]reservedSupports driver specific initialization parameters
Returns
an nes::rob::error_code describing errors encountered during processing
Return values
nes::rob::pulse_driver_error::successNo errors encountered during processing.
nes::rob::pulse_driver_error::hal_initA HAL error occured during the pulse driver initialization.

Implemented in nes::rob::WWaveDriver, nes::rob::LedNtscDriver, and nes::rob::ArduinoDebugDriver.

◆ pulse()

virtual nes::rob::error_code nes::rob::PulseDriver::pulse ( void *  reserved = nullptr) const
pure virtual

Generate a protocol specific pulse.

Performs necessary GPIO operations to generate a protocol compatible pulse.

Parameters
[in,out]reservedSupports driver specific implementation parameters
Returns
an nes::rob::error_code describing errors encountered during processing
Return values
nes::rob::pulse_driver_error::successNo errors encountered during processing.
nes::rob::pulse_driver_error::hal_clockA clock error occured during pulse generation.
nes::rob::pulse_driver_error::hal_gpio_configUnable to configure GPIO peripheral for pulse generation.
nes::rob::pulse_driver_error::hal_gpio_stateUnable to set GPIO state during pulse generation.

Implemented in nes::rob::WWaveDriver, nes::rob::LedNtscDriver, and nes::rob::ArduinoDebugDriver.

◆ rest()

virtual nes::rob::error_code nes::rob::PulseDriver::rest ( void *  reserved = nullptr) const
pure virtual

Generate a protocol specified rest period.

Places GPIO in resting state and awaits a period defined by the protocol.

Parameters
[in,out]reservedSupports driver specific implementation parameters
Returns
an nes::rob::error_code describing errors encountered during processing
Return values
nes::rob::pulse_driver_error::successNo errors encountered during processing.
nes::rob::pulse_driver_error::hal_clockA clock error occured while observing rest period.
nes::rob::pulse_driver_error::hal_gpio_configUnable to configure GPIO peripheral for resting state.
nes::rob::pulse_driver_error::hal_gpio_stateUnable to set GPIO pin in resting state.

Implemented in nes::rob::WWaveDriver, nes::rob::LedNtscDriver, and nes::rob::ArduinoDebugDriver.


The documentation for this class was generated from the following file: