pca9555.h File Reference

Go to the source code of this file.

Defines

#define IOXP_PORT0   0x80
#define IOXP_PORT1   0x81
#define IOXP_PIN0   0
#define IOXP_PIN1   1
#define IOXP_PIN2   2
#define IOXP_PIN3   3
#define IOXP_PIN4   4
#define IOXP_PIN5   5
#define IOXP_PIN6   6
#define IOXP_PIN7   7
#define GPIO_CFG_INVERT   0x00010000
#define GPIO_CFG_NORM   0x00020000

Functions

int IOExpInit (void)
int IOExpPinConfigSet (int bank, int bit, uint32_t flags)
int IOExpRawWrite (int bank, int value)
int IOExpRawRead (int bank, int *value)
int IOExpSetBitLow (int bank, int bit)
int IOExpSetBitHigh (int bank, int bit)
int IOExpGetBit (int bank, int bit, int *value)
int IOExpSetBit (int bank, int bit, int value)

Define Documentation

#define IOXP_PORT0   0x80

Definition at line 48 of file pca9555.h.

Referenced by InitKEY(), InitLED(), NutSetLed(), and sys_key().

#define IOXP_PORT1   0x81
Examples:
ioexpander/ioexpander.c.

Definition at line 49 of file pca9555.h.

Referenced by main(), Thread1(), and Thread2().

#define IOXP_PIN0   0

Definition at line 51 of file pca9555.h.

#define IOXP_PIN1   1

Definition at line 52 of file pca9555.h.

#define IOXP_PIN2   2

Definition at line 53 of file pca9555.h.

#define IOXP_PIN3   3

Definition at line 54 of file pca9555.h.

#define IOXP_PIN4   4

Definition at line 55 of file pca9555.h.

#define IOXP_PIN5   5

Definition at line 56 of file pca9555.h.

#define IOXP_PIN6   6

Definition at line 57 of file pca9555.h.

#define IOXP_PIN7   7

Definition at line 58 of file pca9555.h.

#define GPIO_CFG_INVERT   0x00010000

Definition at line 60 of file pca9555.h.

Referenced by IOExpPinConfigSet().

#define GPIO_CFG_NORM   0x00020000

Definition at line 61 of file pca9555.h.

Referenced by IOExpPinConfigSet().


Function Documentation

int IOExpInit ( void   ) 
Examples:
ioexpander/ioexpander.c.

Definition at line 75 of file pca9555.c.

References malloc, memset(), PCA_CONF, pca_ctrl, PCA_PINV, PCA_POUT, and TwMasterRegWrite().

Referenced by main().

int IOExpPinConfigSet ( int  bank,
int  bit,
uint32_t  flags 
)

Definition at line 102 of file pca9555.c.

References GPIO_CFG_INVERT, GPIO_CFG_NORM, GPIO_CFG_OUTPUT, PCA_CONF, pca_ctrl, PCA_PINV, PCA_POUT, and TwMasterRegWrite().

Referenced by InitKEY(), and InitLED().

int IOExpRawWrite ( int  bank,
int  value 
)

Definition at line 129 of file pca9555.c.

References pca_ctrl, PCA_POUT, and TwMasterRegWrite().

int IOExpRawRead ( int  bank,
int *  value 
)
Examples:
ioexpander/ioexpander.c.

Definition at line 143 of file pca9555.c.

References PCA_PINP, and TwMasterRegRead().

Referenced by sys_key(), and Thread2().

int IOExpSetBitLow ( int  bank,
int  bit 
)

Definition at line 187 of file pca9555.c.

References pca_ctrl, PCA_POUT, and TwMasterRegWrite().

Referenced by IOExpSetBit().

int IOExpSetBitHigh ( int  bank,
int  bit 
)

Definition at line 173 of file pca9555.c.

References pca_ctrl, PCA_POUT, and TwMasterRegWrite().

Referenced by InitLED(), and IOExpSetBit().

int IOExpGetBit ( int  bank,
int  bit,
int *  value 
)

Definition at line 156 of file pca9555.c.

References PCA_PINP, and TwMasterRegRead().

int IOExpSetBit ( int  bank,
int  bit,
int  value 
)

Definition at line 201 of file pca9555.c.

References IOExpSetBitHigh(), and IOExpSetBitLow().

Referenced by NutSetLed().


© 2000-2010 by contributors - visit http://www.ethernut.de/