C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
Probe Class Reference

The Probe provides a convenient class that can be used to observe behavior of programs. It may be used with a logical analyser. The one used here has eight channels, numbered from 0 to 7. More...

#include <probe.h>

Collaboration diagram for Probe:
Collaboration graph

Public Member Functions

 Probe (uint _channel)
 Construct a new Probe object.
 
void hi ()
 Generates a HI logical level on the GPIO.
 
void lo ()
 Generates a LO logical level on the GPIO.
 
void pulse_us (uint _duration=1)
 Generates a HI level pulse on the GPIO during _duration µs.
 
void copy (bool _value)
 Used to copy the boolean _value on th GPIO.
 
void pulse_train (uint nb)
 Generates a train of 10 us pulses on the GPIO.
 

Private Attributes

uint _gpio
 this is the GPIO output on wich signals will be generated. The numbers are those of Raspberry Pi Pico.
 

Static Private Attributes

static constexpr int _channel_map [8] = {6, 7, 8, 9, 16, 17, 21, 26}
 this is the mapping of GPIO number to the logic analyser channel. The choice of GPIO number is arbitrar. It will depends on free outputs on your specific hardware implementation.
 

Detailed Description

The Probe provides a convenient class that can be used to observe behavior of programs. It may be used with a logical analyser. The one used here has eight channels, numbered from 0 to 7.

Constructor & Destructor Documentation

◆ Probe()

Probe::Probe ( uint _channel)

Construct a new Probe object.

The Probe provides a convenient class that can be used to observe behavior of programs. It may be used with a logical analyser. The one used here has eight channel, numbered from 0 to 7.

Parameters
_channelthe channel number as it appears on the logic analyser display

Member Function Documentation

◆ copy()

void Probe::copy ( bool _value)

Used to copy the boolean _value on th GPIO.

Parameters
_value

◆ pulse_train()

void Probe::pulse_train ( uint nb)

Generates a train of 10 us pulses on the GPIO.

Parameters
nbNumber of pulses to generate.
Here is the call graph for this function:

◆ pulse_us()

void Probe::pulse_us ( uint _duration = 1)

Generates a HI level pulse on the GPIO during _duration µs.

Parameters
_durationdefault to 1
Here is the call graph for this function:
Here is the caller graph for this function:

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