The main header code of the C wrapper for libpruio. More...
Go to the source code of this file.
The main header code of the C wrapper for libpruio.
This file provides the declarations of the PruIo class member functions in C syntax. It also can be used to create language bindings for non-C languages to use libpruio in polyglot applications.
Licence: LGPLv2
Copyright 2014 by Thomas{ dOt ]Freiherr[ At ]gmx[ DoT }net
Definition in file pruio_c_wrapper.h.
C wrapper to create a PruIo instance.
Av | avaraging for default steps (0 to 16, defaults to 0) |
OpD | open delay for default steps (0 to 0x3FFFF, defaults to 0x98) |
SaD | sample delay for default steps (0 to 255, defaults to 0) |
Pru | number of PRU subsystem to use (0 or 1, defaults to 1) |
This function wraps the constructor, check PruIo::PruIo() for details.
Since the constructor reads the original devices configurations and the destructor restores them, it's recommended to create and use just one PruIo instance at the same time.
void pruio_destroy | ( | PruIo * | Io) |
C wrapper to destroy a PruIo instance.
Io | The pointer of the instance. |
This function wraps the destructor, check PruIo::~PruIo() for details. (Doxygen should create a link here?!)
C wrapper for function PruIo::config().
Io | The pointer of the PruIo instance |
Samp | number of samples to fetch (defaults to zero) |
Mask | mask for active steps (defaults to all 8 channels active in steps 1 to 8) |
Tmr | timer value in [ns] to specify the sampling rate (defaults to zero, MM only) |
Mds | modus for output (defaults to 4 = 16 bit) |
ClDv | divisor for ADC input clock (defaults to 0 = full speed = 2.4 MHz) |
This function wraps the member function config, check PruIo::config() for details.
C wrapper for function PruIo::adc_step().
Io | The pointer of the PruIo instance |
Stp | step index (0 = step 0 => charge step, 1 = step 1 (=> AIN0 by default), ..., 17 = idle step) |
ChN | channel number to scan (0 = AIN0, 1 = AIN1, ...) |
Av | new value for avaraging (defaults to 4) |
SaD | new value for sample delay (defaults to 0) |
OpD | new value for open delay (defaults to 0x98) |
This function wraps the member function adc_step, check PruIo::adc_step() for details.
C wrapper for function PruIo::gpio_get_config().
Io | The pointer of the PruIo instance |
Ball | the CPU ball number to describe |
This function wraps the member function adc_step, check PruIo::gpio_get_config() for details.
C wrapper for function PruIo::gpio_set().
Io | The pointer of the PruIo instance |
Ball | the CPU ball number to set |
Modus | the mode for the GPIO |
Lokk | the locking specification |
This function wraps the member function adc_step, check PruIo::gpio_set() for details.
C wrapper for function PruIo::gpio_get().
Io | The pointer of the PruIo instance |
Ball | the CPU ball number to test |
This function wraps the member function adc_step, check PruIo::gpio_get() for details.
C wrapper for function PruIo::gpio_out().
Io | The pointer of the PruIo instance |
Ball | the CPU ball number to test |
Modus | the state to set (0 = low, high otherwise) |
This function wraps the member function adc_step, check PruIo::gpio_out() for details.
C wrapper for function PruIo::mm_trg_pin().
Io | The pointer of the PruIo instance |
Ball | the CPU ball number to test |
GpioV | the state to check (defaults to high = 1) |
Skip | the number of samples to skip (defaults to 0 = zero, max. 1023) |
This function wraps the member function adc_step, check PruIo::mm_trg_pin() for details.
C wrapper for function PruIo::mm_trg_ain().
Io | The pointer of the PruIo instance |
Stp | the step number to use for trigger input |
AdcV | the sample value to match (positive check greater than, negative check less than) |
Rela | if AdcV is relative to the current input |
Skip | the number of samples to skip (defaults to 0 = zero, max. 1023) |
This function wraps the member function adc_step, check PruIo::mm_trg_ain() for details.
C wrapper for function PruIo::mm_trg_pre().
Io | The pointer of the PruIo instance |
Stp | the step number to use for trigger input |
AdcV | the sample value to match (positive check greater than, negative check less than) |
Samp | the number of samples for the pre-trigger |
Rela | if AdcV is relative to the current input |
This function wraps the member function adc_step, check PruIo::mm_trg_pre() for details.
C wrapper for function PruIo::mm_start().
Io | The pointer of the PruIo instance |
Trg1 | settings for first trigger (default = no trigger) |
Trg2 | settings for second trigger (default = no trigger) |
Trg3 | settings for third trigger (default = no trigger) |
Trg4 | settings for fourth trigger (default = no trigger) |
This function wraps the member function adc_step, check PruIo::mm_start() for details.