Click or drag to resize

GpioAPIGetGroupCount Method

Gets the number of pin-groups for the specified port.

Namespace: RAYLASE.SPICE3.ClientLib
Assembly: RAYLASE.SPICE3.ClientLib (in RAYLASE.SPICE3.ClientLib.dll) Version: 3.6.0
Syntax
C#
public int GetGroupCount(
	IOPort port
)

Parameters

port  IOPort
The port selector

Return Value

Int32
How many pin-groups the port has.
Remarks

Each port is evenly divided into multiple pin-groups of equal size.

For example, PortA has two pin-groups with 8 pins each.

Important note  Important

The I/O direction can only be configured per pin-group, and even then only if the port actually supports having its direction changed.

Please refer to 10.4.2 GPIO Port Configuration Procedures for further details.

Example
The number of pins per group can be found simply:
C#
int pinsPerGroup = myClientAPIInstance.Gpio.GetPinCount(IOPort.PortA) / myClientAPIInstance.Gpio.GetGroupCount(IOPort.PortA);
See Also