EasyManua.ls Logo

Dell EMC Edge 3200 - Build the PCA9535 Sample Application

Dell EMC Edge 3200
88 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Negative errno if failed.
DioSetLevel
Sets the GPIO level for output pins.
int DioSetLevel (unsigned char data, unsigned char mask)
Parameters dataThe new GPIO level to be set for the output pins.
maskGPIO 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
maskThe GPIO input pins are updated in the GetPinLevel only for the bits which are set to 1 in the
mask.
GetPinLevelPointer to store the read value. The first eight bits (Bit 0 to 7) contain the GPIO input
pins voltage level. The second eight bits (Bit 8 to 15) contain the GPIO output pins 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

Table of Contents

Related product manuals