Build The Pca9535 Sample Application - Dell EGW-3200 User Manual

Hide thumbs Also See for EGW-3200:
Table of Contents

Advertisement

Negative errno if failed.
DioSetLevel
Sets the GPIO level for output pins.
int DioSetLevel (unsigned char data, unsigned char mask)
Parameters
data—The new GPIO level to be set for the output pins.
mask—GPIO output pins are changed only for those corresponding to the bits that are set to 1 in the
mask. Other pin values remain unchanged.
Return codes
0 if the initialization is successful.
Negative errno if failed.
DioGetLevel
Gets the current GPIO level for both input and output pins.
int DioGetLevel (unsigned int mask, unsigned int* GetPinLevel)
Parameters
mask—The GPIO input pins are updated in the GetPinLevel only for the bits which are set to 1 in the
mask.
GetPinLevel—Pointer to store the read value. The first eight bits (Bit 0 to 7) contain the GPIO input
pin's voltage level. The second eight bits (Bit 8 to 15) contain the GPIO output pin's voltage level.
Return codes
0 if the initialization is successful.
Negative errno if failed.
Error codes
For the various functions previously listed, the following is the Errno values in case of failure.
enum errorcodes {
Error_Pointer_Invalid = -100,
Error_I2C_controller_NotFound,
Error_I2C_Open_Failed,
Error_I2C_Bus_Invalid,
Error_Mutex_Failed,
Error_I2CTransfer_Partial,
Error_I2CTransfer_SlaveAddressNotAcknowledged,
Error_I2CTransfer_ClockStretchTimeout,
Error_I2CTransfer_UnknownError
};

Build the PCA9535 sample application

Prerequisites
Visual Studio 2019 is required for this task. Do download and install, perform the following steps:
1. Select Workloads.
2. Open Visual Studio Installer and click Modify to customize your installation.
Setting Up the Windows 10 Operating System
31

Advertisement

Table of Contents
loading

Table of Contents