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I_CMD_WVTXM
PI_CMD_WVTXR
PI_CMD_X
PI_CMD_XA
PI_CMD_XOR
PI_CUSTOM_ERR_0
PI_CUSTOM_ERR_999
PI_DEFAULT_BUFFER_MILLIS

DEF_S Defaults

PI_DEFAULT_CFG_INTERNALS
PI_DEFAULT_CLK_MICROS
PI_DEFAULT_CLK_PERIPHERAL
PI_DEFAULT_DMA_CHANNEL
PI_DEFAULT_DMA_PRIMARY_CHANNEL
PI_DEFAULT_DMA_SECONDARY_CHANNEL
PI_DEFAULT_DUTYCYCLE_RANGE

dutycycle: 0-range

PI_DEFAULT_FOREGROUND
PI_DEFAULT_IF_FLAGS
PI_DEFAULT_MEM_ALLOC_MODE
PI_DEFAULT_SOCKET_ADDR_STR
PI_DEFAULT_SOCKET_PORT
PI_DEFAULT_SOCKET_PORT_STR
PI_DEFAULT_UPDATE_MASK_APLUS_BPLUS
PI_DEFAULT_UPDATE_MASK_A_B2
PI_DEFAULT_UPDATE_MASK_B1
PI_DEFAULT_UPDATE_MASK_COMPUTE
PI_DEFAULT_UPDATE_MASK_PI2B
PI_DEFAULT_UPDATE_MASK_PI3B
PI_DEFAULT_UPDATE_MASK_UNKNOWN
PI_DEFAULT_UPDATE_MASK_ZERO
PI_DEPRECATED
PI_DISABLE_FIFO_IF

ifFlags:

PI_DISABLE_SOCK_IF
PI_DUP_TAG
PI_EMPTY_WAVEFORM
PI_EVENT_BSC

Event auto generated on BSC slave activity

PI_FILE_APPEND
PI_FILE_CREATE
PI_FILE_IS_A_DIR
PI_FILE_MAX
PI_FILE_MIN
PI_FILE_NONE

files

PI_FILE_NOT_ROPEN
PI_FILE_NOT_WOPEN
PI_FILE_READ
PI_FILE_RW
PI_FILE_SLOTS

Files, I2C, SPI, SER

PI_FILE_TRUNC
PI_FILE_WRITE
PI_FIL_OPEN_FAILED
PI_FROM_CURRENT
PI_FROM_END
PI_FROM_START
PI_GPIO_IN_USE
PI_HIGH
PI_HPWM_ILLEGAL
PI_HW_CLK_MAX_FREQ
PI_HW_CLK_MIN_FREQ

hardware clock

PI_HW_PWM_MAX_FREQ
PI_HW_PWM_MIN_FREQ

hardware PWM

PI_HW_PWM_RANGE
PI_I2C_ADDR
PI_I2C_COMBINED_OFF
PI_I2C_COMBINED_ON
PI_I2C_END

bbI2CZip and i2cZip commands

PI_I2C_ESC
PI_I2C_FLAGS
PI_I2C_M_IGNORE_NAK
PI_I2C_M_NOSTART
PI_I2C_M_NO_RD_ACK
PI_I2C_M_RD
PI_I2C_M_RECV_LEN
PI_I2C_M_REV_DIR_ADDR
PI_I2C_M_TEN
PI_I2C_M_WR

flags for i2cTransaction, pi_i2c_msg_t

PI_I2C_OPEN_FAILED
PI_I2C_RDRW_IOCTL_MAX_MSGS

max pi_i2c_msg_t per transaction

PI_I2C_READ
PI_I2C_READ_FAILED
PI_I2C_SLOTS
PI_I2C_START
PI_I2C_STOP
PI_I2C_WRITE
PI_I2C_WRITE_FAILED
PI_INITIALISED
PI_INIT_FAILED

DEF_S Error Codes

PI_INPUT

mode: 0-7

PI_LOCALHOST_SOCK_IF
PI_LOW
PI_MAX_ACTIVE
PI_MAX_BUSY_DELAY

Longest busy delay

PI_MAX_DMA_CHANNEL
PI_MAX_DUTYCYCLE_RANGE
PI_MAX_EVENT

events

PI_MAX_GPIO
PI_MAX_I2C_ADDR
PI_MAX_I2C_DEVICE_COUNT
PI_MAX_MICS_DELAY
PI_MAX_MILS_DELAY
PI_MAX_MS
PI_MAX_PAD

pads

PI_MAX_PAD_STRENGTH
PI_MAX_SCRIPTS
PI_MAX_SCRIPT_PARAMS
PI_MAX_SCRIPT_TAGS
PI_MAX_SCRIPT_VARS
PI_MAX_SERVO_PULSEWIDTH
PI_MAX_SIGNUM
PI_MAX_SOCKET_PORT
PI_MAX_SPI_DEVICE_COUNT
PI_MAX_STEADY

filters

PI_MAX_TIMER
PI_MAX_USER_GPIO

user_gpio: 0-31

PI_MAX_WAVES
PI_MAX_WAVE_CYCLES
PI_MAX_WAVE_DATABITS
PI_MAX_WAVE_DELAY
PI_MAX_WAVE_HALFSTOPBITS
PI_MAX_WDOG_TIMEOUT
PI_MEM_ALLOC_AUTO

memAllocMode

PI_MEM_ALLOC_MAILBOX
PI_MEM_ALLOC_PAGEMAP
PI_MIN_DMA_CHANNEL

DMA channel: 0-14

PI_MIN_DUTYCYCLE_RANGE

range: 25-40000

PI_MIN_GPIO

gpio: 0-53

PI_MIN_MS

millis: 10-60000

PI_MIN_PAD_STRENGTH
PI_MIN_SERVO_PULSEWIDTH
PI_MIN_SIGNUM

signum: 0-63

PI_MIN_SOCKET_PORT

port

PI_MIN_TIMER

timer: 0-9

PI_MIN_WAVE_DATABITS
PI_MIN_WAVE_HALFSTOPBITS
PI_MIN_WDOG_TIMEOUT

timeout: 0-60000

PI_MSG_TOOBIG
PI_NOTIFY_SLOTS
PI_NOT_HALTED
PI_NOT_HCLK_GPIO
PI_NOT_HPWM_GPIO
PI_NOT_I2C_GPIO
PI_NOT_INITIALISED
PI_NOT_PERMITTED
PI_NOT_PWM_GPIO
PI_NOT_SERIAL_GPIO
PI_NOT_SERVO_GPIO
PI_NOT_SPI_GPIO
PI_NO_ALERT_FUNC
PI_NO_AUX_SPI
PI_NO_FILE_ACCESS
PI_NO_FILE_MATCH
PI_NO_HANDLE
PI_NO_MEMORY
PI_NO_SCRIPT_ROOM
PI_NO_TX_WAVE
PI_NO_WAVEFORM_ID
PI_NTFY_FLAGS_ALIVE
PI_NTFY_FLAGS_EVENT
PI_NTFY_FLAGS_WDOG
PI_NUM_AUX_SPI_CHANNEL
PI_NUM_STD_SPI_CHANNEL
PI_OFF

level: 0-1

PI_ON
PI_OUTPUT
PI_PIGIF_ERR_0
PI_PIGIF_ERR_99
PI_PUD_DOWN
PI_PUD_OFF

pud: 0-2

PI_PUD_UP
PI_SCRIPT_FAILED
PI_SCRIPT_HALTED
PI_SCRIPT_INITING

script status

PI_SCRIPT_NOT_READY
PI_SCRIPT_RUNNING
PI_SCRIPT_WAITING
PI_SERVO_OFF

pulsewidth: 0, 500-2500

PI_SER_OPEN_FAILED
PI_SER_READ_FAILED
PI_SER_READ_NO_DATA
PI_SER_SLOTS
PI_SER_WRITE_FAILED
PI_SET
PI_SOCK_READ_FAILED
PI_SOCK_WRIT_FAILED
PI_SOME_PERMITTED
PI_SPI_MAX_BAUD
PI_SPI_MIN_BAUD
PI_SPI_OPEN_FAILED
PI_SPI_SLOTS
PI_SPI_XFER_FAILED
PI_TIMEOUT

level: only reported for GPIO time-out, see gpioSetWatchdog

PI_TIMER_FAILED
PI_TIME_ABSOLUTE
PI_TIME_RELATIVE

timetype: 0-1

PI_TOO_MANY_CBS
PI_TOO_MANY_CHARS
PI_TOO_MANY_OOL
PI_TOO_MANY_PARAM
PI_TOO_MANY_PULSES
PI_TOO_MANY_SEGS
PI_TOO_MANY_TAGS
PI_UNKNOWN_COMMAND
PI_WAVE_BLOCKS

PI_NTFY_FLAGS_BIT(x) =(((x)<<0)&31)

PI_WAVE_COUNT_PAGES
PI_WAVE_MAX_BAUD
PI_WAVE_MAX_CHARS
PI_WAVE_MAX_MICROS
PI_WAVE_MAX_PULSES
PI_WAVE_MIN_BAUD
PI_WAVE_MODE_ONE_SHOT

wave tx mode

PI_WAVE_MODE_ONE_SHOT_SYNC
PI_WAVE_MODE_REPEAT
PI_WAVE_MODE_REPEAT_SYNC
PI_WAVE_NOT_FOUND

special wave at return values

Pigif_bad_callback
Pigif_bad_connect
Pigif_bad_getaddrinfo
Pigif_bad_malloc
Pigif_bad_noib
Pigif_bad_recv
Pigif_bad_send
Pigif_bad_socket
Pigif_callback_not_found
Pigif_duplicate_callback
Pigif_notify_failed
Pigif_too_many_pis
Pigif_unconnected_pi
RISING_EDGE

gpioISR