VMX-pi C++ HAL Library for Raspberry Pi
VMX-pi Robotics Controller & Vision/Motion Processor
Macros | Typedefs | Enumerations | Variables
VMXResource.h File Reference
#include <stdint.h>
#include "VMXChannel.h"
#include "VMXErrors.h"

Go to the source code of this file.

Macros

#define INVALID_VMX_RESOURCE_HANDLE(vmx_res_handle)   (((uint8_t)vmx_res_handle)==INVALID_VMX_RESOURCE_INDEX)
 Macro that returns true if the provide VMX Resource Handle is invalid.
 
#define CREATE_VMX_RESOURCE_HANDLE(res_type, res_index)   ((((uint16_t)res_type)<<8) | (uint8_t)res_index)
 Macro that creates a VMX Resource Handle from a VMXResourceType and VMXResourceIndex.
 
#define EXTRACT_VMX_RESOURCE_TYPE(res_handle)   (VMXResourceType)(res_handle >> 8)
 Macro that extracts a VMXResourceType from VMXResourceHandle.
 
#define EXTRACT_VMX_RESOURCE_INDEX(res_handle)   (uint8_t)(res_handle & 0x00FF)
 Macro that extracts a VMXResourcIndex from a VMXResourceHandle.
 

Typedefs

typedef uint8_t VMXResourceIndex
 Zero-based index of a particular VMX Resource, relative to a specific VMXResourceType.
 
typedef uint16_t VMXResourceHandle
 Handle to a particular VMX Resource.
 
typedef uint8_t VMXResourcePortIndex
 Zero-based index of a particular VMX Resource Port of a VMX Resource.
 

Enumerations

enum  VMXResourceType {
  Undefined, DigitalIO, PWMGenerator, InputCapture,
  PWMCapture = InputCapture, Encoder, Accumulator, AnalogTrigger,
  Interrupt, UART, SPI, I2C,
  LEDArrayDriver_OneWire, MaxVMXResourceType = LEDArrayDriver_OneWire
}
 Enumerates the various types of VMXResources. More...
 

Variables

const VMXResourceIndex INVALID_VMX_RESOURCE_INDEX = 255
 Value indicating a VMXResourceIndex is invalid.
 

Enumeration Type Documentation

◆ VMXResourceType

Enumerates the various types of VMXResources.

Enumerator
DigitalIO 

VMX Resource providing Digital Input and Digital Output Control on a VMX Digital Channel.

PWMGenerator 

VMX Resource providing PWM Generation Control of a VMX Digital Channel in output mode.

InputCapture 

VMX Resource providing Timer Input Capture of a VMX FlexIO Digital Channel in input mode.

PWMCapture 

VMX Resource providing PWM Capture of a VMX FlexIO Digital Channel in input mode.

NOTE: This resource type is deprecated, and replaced by the InputCapture resource.

Encoder 

VMX Resource providing Quadrature Encoder of a VMX Channel pair in input mode.

Accumulator 

VMX Resource providing Oversampling/Averaging/Accumulation of a VMX Analog Input Channel.

AnalogTrigger 

VMX Resource providing Interrupt generation from a VMX Analog Input Channel.

Interrupt 

VMX Resource providing Interrupt generation from a VMX Digital Channel in input mode.

UART 

VMX Resource providing UART communication via a VMX Channel pair.

SPI 

VMX Resource providing SPI communication via a four VMX Channel set.

I2C 

VMX Resource providing I2C communication via a VMX Channel pair.

LEDArrayDriver_OneWire 

VMX Resource providing One-wire LEDArray management via a VMX Channel.