PX4 Firmware
PX4 Autopilot Software http://px4.io
drv_io_expander.h File Reference

IO expander device API. More...

#include <stdint.h>
#include <sys/ioctl.h>
Include dependency graph for drv_io_expander.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _IOXIOCBASE   (0x2800)
 
#define _IOXIOC(_n)   (_IOC(_IOXIOCBASE, _n))
 
#define IOX_SET_MASK   _IOXIOC(1)
 set a bitmask (non-blocking) More...
 
#define IOX_GET_MASK   _IOXIOC(2)
 get a bitmask (blocking) More...
 
#define IOX_SET_MODE   _IOXIOC(3)
 set device mode (non-blocking) More...
 
#define IOX_SET_VALUE   _IOXIOC(4)
 set constant values (non-blocking) More...
 

Enumerations

enum  IOX_MODE { IOX_MODE_OFF, IOX_MODE_ON, IOX_MODE_TEST_OUT }
 

Detailed Description

IO expander device API.

Definition in file drv_io_expander.h.

Macro Definition Documentation

◆ _IOXIOC

#define _IOXIOC (   _n)    (_IOC(_IOXIOCBASE, _n))

Definition at line 50 of file drv_io_expander.h.

◆ _IOXIOCBASE

#define _IOXIOCBASE   (0x2800)

Definition at line 49 of file drv_io_expander.h.

◆ IOX_GET_MASK

#define IOX_GET_MASK   _IOXIOC(2)

get a bitmask (blocking)

Definition at line 56 of file drv_io_expander.h.

◆ IOX_SET_MASK

#define IOX_SET_MASK   _IOXIOC(1)

set a bitmask (non-blocking)

Definition at line 53 of file drv_io_expander.h.

◆ IOX_SET_MODE

#define IOX_SET_MODE   _IOXIOC(3)

set device mode (non-blocking)

Definition at line 59 of file drv_io_expander.h.

Referenced by PCA9685::ioctl(), and pca9685_main().

◆ IOX_SET_VALUE

#define IOX_SET_VALUE   _IOXIOC(4)

set constant values (non-blocking)

Definition at line 62 of file drv_io_expander.h.

Enumeration Type Documentation

◆ IOX_MODE

enum IOX_MODE
Enumerator
IOX_MODE_OFF 
IOX_MODE_ON 
IOX_MODE_TEST_OUT 

Definition at line 67 of file drv_io_expander.h.