Main Logic Analyzer API using the SUMP Protocol. When you try to connect to the Logic Analzyer - SUMP calls the following requests 1) RESET, 2) ID and then 3) GET_METADATA: This is used to populate the Device! All other requests are called when you click on the capture button.
More...
|
|
| LogicAnalyzer () |
| | Default Constructor.
|
| |
|
| ~LogicAnalyzer () |
| | Destructor.
|
| |
| void | begin (Stream &procesingStream, AbstractCapture *capture, uint32_t maxCaptureSize, uint8_t pinStart=0, uint8_t numberOfPins=8, bool setup_pins=false) |
| | Starts the processing.
|
| |
|
uint16_t | startPin () |
| | Provides the GPIO number of the start pin which is used for capturing.
|
| |
|
uint16_t | numberOfPins () |
| | Provides the number of subsequent GPIO pins which will be used for capturing.
|
| |
|
Stream & | stream () |
| | provides command output stream of capturing divice
|
| |
|
Status | status () |
| | provides the actual Status
|
| |
|
void | setStatus (Status status) |
| | Defines the actual status.
|
| |
|
RingBuffer & | buffer () |
| | Provides access to the buffer.
|
| |
|
void | processCommand () |
| | process the next available command - Call this function from your Arduino loop()!
|
| |
|
PinBitArray | triggerValues () |
| | provides the trigger values
|
| |
|
void | setTriggerValues (PinBitArray values) |
| | defines the trigger values
|
| |
|
PinBitArray | triggerMask () |
| | provides the trigger mask
|
| |
|
void | setTriggerMask (PinBitArray values) |
| | defines the trigger mask
|
| |
|
int | readCount () |
| | provides the read count
|
| |
|
void | setReadCount (int count) |
| | defines the read count
|
| |
|
int | delayCount () |
| | provides the delay count
|
| |
|
void | setDelayCount (int count) |
| | defines the delay count
|
| |
|
uint64_t | captureFrequency () |
| | provides the caputring frequency
|
| |
|
uint64_t | delayTimeUs () |
| | Provides the delay time between measurements in microseconds.
|
| |
|
void | setCaptureFrequency (uint64_t value) |
| | defines the caputring frequency
|
| |
|
bool | isContinuousCapture () |
| | checks if the caputring is continuous
|
| |
|
void | setContinuousCapture (bool cont) |
| | defines the caputring as continuous
|
| |
|
void | setEventHandler (EventHandler eh) |
| | defines a event handler that gets notified on some defined events
|
| |
|
void | clear () |
| | Resets the status and buffer.
|
| |
|
size_t | size () |
| | returns the max buffer size
|
| |
|
size_t | available () |
| | returns the avialable buffer entries
|
| |
|
void | setLogger (Stream &logger) |
| | Activate the logging by defining the logging output Stream.
|
| |
|
void | setCaptureOnArm (bool capture) |
| | Switch automatic capturing on ARMED status on/off.
|
| |
|
void | setDescription (const char *name) |
| | Defines the Description.
|
| |
|
void | setAllocateBuffer (bool do_allocate) |
| | Allows to switch of the automatic buffer allocation - call before begin!
|
| |
|
void | capture () |
| | starts the capturing
|
| |
|
|
LogicAnalyzerState & | state () |
| | Provides a reference to the LogicAnalyzerState.
|
| |
|
bool | hasCommand () |
| | checks if there is a command available
|
| |
|
uint8_t | command () |
| | gets the next 1 byte command
|
| |
|
Sump4ByteComandArg & | commandExt () |
| | gets the next 4 byte command
|
| |
|
void | write (uint8_t cmd, uint32_t number) |
| | writes a byte command with uint32_t number argument
|
| |
|
void | write (uint8_t cmd, const char *str) |
| | writes a byte command with char* argument
|
| |
|
PinBitArray | commandExtPinBitArray () |
| | Provides the command as PinBitArray.
|
| |
|
void | raiseEvent (Event event) |
| | raises an event
|
| |
| void | setupDelay (uint32_t divider) |
| |
| void | sendMetadata () |
| |
| void | processCommand (int cmd) |
| |
Main Logic Analyzer API using the SUMP Protocol. When you try to connect to the Logic Analzyer - SUMP calls the following requests 1) RESET, 2) ID and then 3) GET_METADATA: This is used to populate the Device! All other requests are called when you click on the capture button.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
| void logic_analyzer::LogicAnalyzer::setupDelay |
( |
uint32_t |
divider | ) |
|
|
inlineprotected |
This function calculates what delay we need for the specific sample rate. The dividers are based on SUMP's 100Mhz clock. For example, a 1MHz sample rate has a divider of 99 (0x63 in the command byte). rate = clock / (divider + 1) rate = 100,000,000 / (99 + 1) result is 1,000,000 saying we want a 1MHz sample rate. We calculate our inter sample delay from the divider and the delay between samples gives us the sample rate per second. So for 1MHz, delay = (99 + 1) / 100 which gives us a 1 microsecond delay. For 500KHz, delay = (199 + 1) / 100 which gives us a 2 microsecond delay.