gcc -Wall -pthread -o prog prog.c -lpigpiod_if -lrt
sudo pigpiod
./prog # sudo is not required to run programs linked to pigpiod_if
ESSENTIAL | |
pigpio_start | Connects to the pigpio daemon |
pigpio_stop | Disconnects from the pigpio daemon |
BEGINNER | |
set_mode | Set a GPIO mode |
get_mode | Get a GPIO mode |
set_pull_up_down | Set/clear GPIO pull up/down resistor |
gpio_read | Read a GPIO |
gpio_write | Write a GPIO |
set_PWM_dutycycle | Start/stop PWM pulses on a GPIO |
get_PWM_dutycycle | Get the PWM dutycycle in use on a GPIO |
set_servo_pulsewidth | Start/stop servo pulses on a GPIO |
get_servo_pulsewidth | Get the servo pulsewidth in use on a GPIO |
callback | Create GPIO level change callback |
callback_ex | Create GPIO level change callback |
callback_cancel | Cancel a callback |
wait_for_edge | Wait for GPIO level change |
INTERMEDIATE | |
gpio_trigger | Send a trigger pulse to a GPIO. |
set_watchdog | Set a watchdog on a GPIO. |
set_PWM_range | Configure PWM range for a GPIO |
get_PWM_range | Get configured PWM range for a GPIO |
set_PWM_frequency | Configure PWM frequency for a GPIO |
get_PWM_frequency | Get configured PWM frequency for a GPIO |
read_bank_1 | Read all GPIO in bank 1 |
read_bank_2 | Read all GPIO in bank 2 |
clear_bank_1 | Clear selected GPIO in bank 1 |
clear_bank_2 | Clear selected GPIO in bank 2 |
set_bank_1 | Set selected GPIO in bank 1 |
set_bank_2 | Set selected GPIO in bank 2 |
start_thread | Start a new thread |
stop_thread | Stop a previously started thread |
ADVANCED | |
get_PWM_real_range | Get underlying PWM range for a GPIO |
notify_open | Request a notification handle |
notify_begin | Start notifications for selected GPIO |
notify_pause | Pause notifications |
notify_close | Close a notification |
bb_serial_read_open | Opens a GPIO for bit bang serial reads |
bb_serial_read | Reads bit bang serial data from a GPIO |
bb_serial_read_close | Closes a GPIO for bit bang serial reads |
bb_serial_invert | Invert serial logic (1 invert, 0 normal) |
hardware_clock | Start hardware clock on supported GPIO |
hardware_PWM | Start hardware PWM on supported GPIO |
set_glitch_filter | Set a glitch filter on a GPIO |
set_noise_filter | Set a noise filter on a GPIO |
SCRIPTS | |
store_script | Store a script |
run_script | Run a stored script |
script_status | Get script status and parameters |
stop_script | Stop a running script |
delete_script | Delete a stored script |
WAVES | |
wave_clear | Deletes all waveforms |
wave_add_new | Starts a new waveform |
wave_add_generic | Adds a series of pulses to the waveform |
wave_add_serial | Adds serial data to the waveform |
wave_create | Creates a waveform from added data |
wave_delete | Deletes one or more waveforms |
wave_send_once | Transmits a waveform once |
wave_send_repeat | Transmits a waveform repeatedly |
wave_chain | Transmits a chain of waveforms |
wave_tx_busy | Checks to see if the waveform has ended |
wave_tx_stop | Aborts the current waveform |
wave_get_micros | Length in microseconds of the current waveform |
wave_get_high_micros | Length of longest waveform so far |
wave_get_max_micros | Absolute maximum allowed micros |
wave_get_pulses | Length in pulses of the current waveform |
wave_get_high_pulses | Length of longest waveform so far |
wave_get_max_pulses | Absolute maximum allowed pulses |
wave_get_cbs | Length in cbs of the current waveform |
wave_get_high_cbs | Length of longest waveform so far |
wave_get_max_cbs | Absolute maximum allowed cbs |
I2C | |
i2c_open | Opens an I2C device |
i2c_close | Closes an I2C device |
i2c_write_quick | smbus write quick |
i2c_write_byte | smbus write byte |
i2c_read_byte | smbus read byte |
i2c_write_byte_data | smbus write byte data |
i2c_write_word_data | smbus write word data |
i2c_read_byte_data | smbus read byte data |
i2c_read_word_data | smbus read word data |
i2c_process_call | smbus process call |
i2c_write_block_data | smbus write block data |
i2c_read_block_data | smbus read block data |
i2c_block_process_call | smbus block process call |
i2c_write_i2c_block_data | smbus write I2C block data |
i2c_read_i2c_block_data | smbus read I2C block data |
i2c_read_device | Reads the raw I2C device |
i2c_write_device | Writes the raw I2C device |
i2c_zip | Performs multiple I2C transactions |
bb_i2c_open | Opens GPIO for bit banging I2C |
bb_i2c_close | Closes GPIO for bit banging I2C |
bb_i2c_zip | Performs multiple bit banged I2C transactions |
SPI | |
spi_open | Opens a SPI device |
spi_close | Closes a SPI device |
spi_read | Reads bytes from a SPI device |
spi_write | Writes bytes to a SPI device |
spi_xfer | Transfers bytes with a SPI device |
SERIAL | |
serial_open | Opens a serial device |
serial_close | Closes a serial device |
serial_write_byte | Writes a byte to a serial device |
serial_read_byte | Reads a byte from a serial device |
serial_write | Writes bytes to a serial device |
serial_read | Reads bytes from a serial device |
serial_data_available | Returns number of bytes ready to be read |
CUSTOM | |
custom_1 | User custom function 1 |
custom_2 | User custom function 2 |
UTILITIES | |
get_current_tick | Get current tick (microseconds) |
get_hardware_revision | Get hardware revision |
get_pigpio_version | Get the pigpio version |
pigpiod_if_version | Get the pigpiod_if version |
pigpio_error | Get a text description of an error code. |
time_sleep | Sleeps for a float number of seconds |
time_time | Float number of seconds since the epoch |
seconds: the number of seconds to delay.
errnum: the error code.
thread_func: the main function for the new thread.
userdata: a pointer to an arbitrary argument.
pth: the thread to be stopped.
addrStr: specifies the host or IP address of the Pi running the
pigpio daemon. It may be NULL in which case localhost
is used unless overridden by the PIGPIO_ADDR environment
variable.
portStr: specifies the port address used by the Pi running the
pigpio daemon. It may be NULL in which case "8888"
is used unless overridden by the PIGPIO_PORT environment
variable.
gpio: 0-53.
mode: PI_INPUT, PI_OUTPUT, PI_ALT0, PI_ALT1,
PI_ALT2, PI_ALT3, PI_ALT4, PI_ALT5.
gpio: 0-53.
gpio: 0-53.
pud: PI_PUD_UP, PI_PUD_DOWN, PI_PUD_OFF.
gpio:0-53.
gpio: 0-53.
level: 0, 1.
user_gpio: 0-31.
dutycycle: 0-range (range defaults to 255).
user_gpio: 0-31.
user_gpio: 0-31.
range: 25-40000.
25(#1), 50(#2), 100(#3), 125(#4), 200(#5), 250(#6),
400(#7), 500(#8), 625(#9), 800(#10), 1000(#11), 1250(#12),
2000(#13), 2500(#14), 4000(#15), 5000(#16), 10000(#17), 20000(#18)
user_gpio: 0-31.
user_gpio: 0-31.
user_gpio: 0-31.
frequency: >=0 (Hz).
Hertz
1: 40000 20000 10000 8000 5000 4000 2500 2000 1600
1250 1000 800 500 400 250 200 100 50
2: 20000 10000 5000 4000 2500 2000 1250 1000 800
625 500 400 250 200 125 100 50 25
4: 10000 5000 2500 2000 1250 1000 625 500 400
313 250 200 125 100 63 50 25 13
sample
rate
(us) 5: 8000 4000 2000 1600 1000 800 500 400 320
250 200 160 100 80 50 40 20 10
8: 5000 2500 1250 1000 625 500 313 250 200
156 125 100 63 50 31 25 13 6
10: 4000 2000 1000 800 500 400 250 200 160
125 100 80 50 40 25 20 10 5
user_gpio: 0-31.
user_gpio: 0-31.
pulsewidth: 0 (off), 500 (anti-clockwise) - 2500 (clockwise).
Update Rate (Hz) 50 100 200 400 500
1E6/Hz 20000 10000 5000 2500 2000
set_PWM_frequency(25, 400);
set_PWM_range(25, 2500);
user_gpio: 0-31.
handle: 0-31 (as returned by notify_open)
bits: a mask indicating the GPIO to be notified.
typedef struct
{
uint16_t seqno;
uint16_t flags;
uint32_t tick;
uint32_t level;
} gpioReport_t;
handle: 0-31 (as returned by notify_open)
handle: 0-31 (as returned by notify_open)
user_gpio: 0-31.
timeout: 0-60000.
user_gpio: 0-31
steady: 0-300000
user_gpio: 0-31
steady: 0-300000
active: 0-1000000
bits: a bit mask with 1 set if the corresponding GPIO is
to be cleared.
bits: a bit mask with 1 set if the corresponding GPIO is
to be cleared.
bits: a bit mask with 1 set if the corresponding GPIO is
to be set.
bits: a bit mask with 1 set if the corresponding GPIO is
to be set.
gpio: see description
frequency: 0 (off) or 4689-250000000 (250M)
4 clock 0 All models
5 clock 1 All models but A and B (reserved for system use)
6 clock 2 All models but A and B
20 clock 0 All models but A and B
21 clock 1 All models but A and Rev.2 B (reserved for system use)
32 clock 0 Compute module only
34 clock 0 Compute module only
42 clock 1 Compute module only (reserved for system use)
43 clock 2 Compute module only
44 clock 1 Compute module only (reserved for system use)
gpio: see descripton
PWMfreq: 0 (off) or 1-125000000 (125M)
PWMduty: 0 (off) to 1000000 (1M)(fully on)
12 PWM channel 0 All models but A and B
13 PWM channel 1 All models but A and B
18 PWM channel 0 All models
19 PWM channel 1 All models but A and B
40 PWM channel 0 Compute module only
41 PWM channel 1 Compute module only
45 PWM channel 1 Compute module only
52 PWM channel 0 Compute module only
53 PWM channel 1 Compute module only
numPulses: the number of pulses.
pulses: an array of pulses.
user_gpio: 0-31.
baud: 50-1000000
data_bits: number of data bits (1-32)
stop_bits: number of stop half bits (2-8)
offset: >=0
numBytes: >=1
str: an array of chars.
typedef struct
{
uint32_t gpioOn;
uint32_t gpioOff;
uint32_t usDelay;
} gpioPulse_t;
wave_id: >=0, as returned by wave_create.
wave_id: >=0, as returned by wave_create.
wave_id: >=0, as returned by wave_create.
buf: pointer to the wave_ids and optional command codes
bufSize: the number of bytes in buf
Name | Cmd & Data | Meaning |
Loop Start | 255 0 | Identify start of a wave block |
Loop Repeat | 255 1 x y | loop x + y*256 times |
Delay | 255 2 x y | delay x + y*256 microseconds |
Loop Forever | 255 3 | loop forever |
#include <stdio.h>
#include <pigpiod_if.h>
#define WAVES 5
#define GPIO 4
int main(int argc, char *argv[])
{
int i, wid[WAVES];
if (pigpio_start(0, 0)<0) return -1;
set_mode(GPIO, PI_OUTPUT);
for (i=0; i<WAVES; i++)
{
wave_add_generic(2, (gpioPulse_t[])
{{1<<GPIO, 0, 20},
{0, 1<<GPIO, (i+1)*200}});
wid[i] = wave_create();
}
wave_chain((char []) {
wid[4], wid[3], wid[2], // transmit waves 4+3+2
255, 0, // loop start
wid[0], wid[0], wid[0], // transmit waves 0+0+0
255, 0, // loop start
wid[0], wid[1], // transmit waves 0+1
255, 2, 0x88, 0x13, // delay 5000us
255, 1, 30, 0, // loop end (repeat 30 times)
255, 0, // loop start
wid[2], wid[3], wid[0], // transmit waves 2+3+0
wid[3], wid[1], wid[2], // transmit waves 3+1+2
255, 1, 10, 0, // loop end (repeat 10 times)
255, 1, 5, 0, // loop end (repeat 5 times)
wid[4], wid[4], wid[4], // transmit waves 4+4+4
255, 2, 0x20, 0x4E, // delay 20000us
wid[0], wid[0], wid[0], // transmit waves 0+0+0
}, 46);
while (wave_tx_busy()) time_sleep(0.1);
for (i=0; i<WAVES; i++) wave_delete(wid[i]);
pigpio_stop();
}
user_gpio: 0-31.
pulseLen: 1-100.
level: 0,1.
script: the text of the script.
script_id: >=0, as returned by store_script.
numPar: 0-10, the number of parameters.
param: an array of parameters.
script_id: >=0, as returned by store_script.
param: an array to hold the returned 10 parameters.
PI_SCRIPT_INITING
PI_SCRIPT_HALTED
PI_SCRIPT_RUNNING
PI_SCRIPT_WAITING
PI_SCRIPT_FAILED
script_id: >=0, as returned by store_script.
script_id: >=0, as returned by store_script.
user_gpio: 0-31.
baud: 50-250000
data_bits: 1-32
user_gpio: 0-31, previously opened with bb_serial_read_open.
buf: an array to receive the read bytes.
bufSize: >=0
user_gpio: 0-31, previously opened with bb_serial_read_open.
user_gpio: 0-31, previously opened with bb_serial_read_open.
invert: 0-1, 1 invert, 0 normal.
i2c_bus: >=0.
i2c_addr: 0-0x7F.
i2c_flags: 0.
SDA | SCL | |
I2C 0 | 0 | 1 |
I2C 1 | 2 | 3 |
S (1 bit) : Start bit
P (1 bit) : Stop bit
Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0.
A, NA (1 bit) : Accept and not accept bit.
Addr (7 bits): I2C 7 bit address.
Comm (8 bits): Command byte, a data byte which often selects a register.
Data (8 bits): A data byte.
Count (8 bits): A data byte containing the length of a block operation.
[..]: Data sent by the device.
handle: >=0, as returned by a call to i2c_open.
handle: >=0, as returned by a call to i2c_open.
bit: 0-1, the value to write.
S Addr Rd/Wr [A] P
handle: >=0, as returned by a call to i2c_open.
bVal: 0-0xFF, the value to write.
S Addr Wr [A] Data [A] P
handle: >=0, as returned by a call to i2c_open.
S Addr Rd [A] [Data] NA P
handle: >=0, as returned by a call to i2c_open.
i2c_reg: 0-255, the register to write.
bVal: 0-0xFF, the value to write.
S Addr Wr [A] Comm [A] Data [A] P
handle: >=0, as returned by a call to i2c_open.
i2c_reg: 0-255, the register to write.
wVal: 0-0xFFFF, the value to write.
S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P
handle: >=0, as returned by a call to i2c_open.
i2c_reg: 0-255, the register to read.
S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P
handle: >=0, as returned by a call to i2c_open.
i2c_reg: 0-255, the register to read.
S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P
handle: >=0, as returned by a call to i2c_open.
i2c_reg: 0-255, the register to write/read.
wVal: 0-0xFFFF, the value to write.
S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A]
S Addr Rd [A] [DataLow] A [DataHigh] NA P
handle: >=0, as returned by a call to i2c_open.
i2c_reg: 0-255, the register to write.
buf: an array with the data to send.
count: 1-32, the number of bytes to write.
S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P
handle: >=0, as returned by a call to i2c_open.
i2c_reg: 0-255, the register to read.
buf: an array to receive the read data.
S Addr Wr [A] Comm [A]
S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P
handle: >=0, as returned by a call to i2c_open.
i2c_reg: 0-255, the register to write/read.
buf: an array with the data to send and to receive the read data.
count: 1-32, the number of bytes to write.
S Addr Wr [A] Comm [A] Count [A] Data [A] ...
S Addr Rd [A] [Count] A [Data] ... A P
handle: >=0, as returned by a call to i2c_open.
i2c_reg: 0-255, the register to read.
buf: an array to receive the read data.
count: 1-32, the number of bytes to read.
S Addr Wr [A] Comm [A]
S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P
handle: >=0, as returned by a call to i2c_open.
i2c_reg: 0-255, the register to write.
buf: the data to write.
count: 1-32, the number of bytes to write.
S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P
handle: >=0, as returned by a call to i2c_open.
buf: an array to receive the read data bytes.
count: >0, the number of bytes to read.
handle: >=0, as returned by a call to i2c_open.
buf: an array containing the data bytes to write.
count: >0, the number of bytes to write.
handle: >=0, as returned by a call to i2cOpen
inBuf: pointer to the concatenated I2C commands, see below
inLen: size of command buffer
outBuf: pointer to buffer to hold returned data
outLen: size of output buffer
Name | Cmd & Data | Meaning |
End | 0 | No more commands |
Escape | 1 | Next P is two bytes |
On | 2 | Switch combined flag on |
Off | 3 | Switch combined flag off |
Address | 4 P | Set I2C address to P |
Flags | 5 lsb msb | Set I2C flags to lsb + (msb << 8) |
Read | 6 P | Read P bytes of data |
Write | 7 P ... | Write P bytes of data |
Set address 0x53, write 0x32, read 6 bytes
Set address 0x1E, write 0x03, read 6 bytes
Set address 0x68, write 0x1B, read 8 bytes
End
0x04 0x53 0x07 0x01 0x32 0x06 0x06
0x04 0x1E 0x07 0x01 0x03 0x06 0x06
0x04 0x68 0x07 0x01 0x1B 0x06 0x08
0x00
SDA: 0-31
SCL: 0-31
baud: 50-500000
SDA: 0-31, the SDA GPIO used in a prior call to bb_i2c_open
SDA: 0-31 (as used in a prior call to bb_i2c_open)
inBuf: pointer to the concatenated I2C commands, see below
inLen: size of command buffer
outBuf: pointer to buffer to hold returned data
outLen: size of output buffer
Name | Cmd & Data | Meaning |
End | 0 | No more commands |
Escape | 1 | Next P is two bytes |
Start | 2 | Start condition |
Stop | 3 | Stop condition |
Address | 4 P | Set I2C address to P |
Flags | 5 lsb msb | Set I2C flags to lsb + (msb << 8) |
Read | 6 P | Read P bytes of data |
Write | 7 P ... | Write P bytes of data |
Set address 0x53
start, write 0x32, (re)start, read 6 bytes, stop
Set address 0x1E
start, write 0x03, (re)start, read 6 bytes, stop
Set address 0x68
start, write 0x1B, (re)start, read 8 bytes, stop
End
0x04 0x53
0x02 0x07 0x01 0x32 0x02 0x06 0x06 0x03
0x04 0x1E
0x02 0x07 0x01 0x03 0x02 0x06 0x06 0x03
0x04 0x68
0x02 0x07 0x01 0x1B 0x02 0x06 0x08 0x03
0x00
MISO | MOSI | SCLK | CE0 | CE1 | CE2 | |
Main SPI | 9 | 10 | 11 | 8 | 7 | - |
Aux SPI | 19 | 20 | 21 | 18 | 17 | 16 |
spi_channel: 0-1 (0-2 for the auxiliary SPI).
baud: 32K-125M (values above 30M are unlikely to work).
spi_flags: see below.
21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m
Mode POL PHA
0 0 0
1 0 1
2 1 0
3 1 1
handle: >=0, as returned by a call to spi_open.
handle: >=0, as returned by a call to spi_open.
buf: an array to receive the read data bytes.
count: the number of bytes to read.
handle: >=0, as returned by a call to spi_open.
buf: the data bytes to write.
count: the number of bytes to write.
handle: >=0, as returned by a call to spi_open.
txBuf: the data bytes to write.
rxBuf: the received data bytes.
count: the number of bytes to transfer.
ser_tty: the serial device to open.
baud: the baud rate in bits per second, see below.
ser_flags: 0.
handle: >=0, as returned by a call to serial_open.
handle: >=0, as returned by a call to serial_open.
handle: >=0, as returned by a call to serial_open.
handle: >=0, as returned by a call to serial_open.
buf: the array of bytes to write.
count: the number of bytes to write.
handle: >=0, as returned by a call to serial_open.
buf: an array to receive the read data.
count: the maximum number of bytes to read.
handle: >=0, as returned by a call to serial_open.
arg1: >=0
arg2: >=0
argx: extra (byte) arguments
argc: number of extra arguments
arg1: >=0
argc: extra (byte) arguments
count: number of extra arguments
retBuf: buffer for returned data
retMax: maximum number of bytes to return
user_gpio: 0-31.
edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE.
f: the callback function.
Parameter Value Meaning
GPIO 0-31 The GPIO which has changed state
edge 0-2 0 = change to low (a falling edge)
1 = change to high (a rising edge)
2 = no level change (a watchdog timeout)
tick 32 bit The number of microseconds since boot
WARNING: this wraps around from
4294967295 to 0 roughly every 72 minutes
user_gpio: 0-31.
edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE.
f: the callback function.
userdata: a pointer to arbitrary user data.
Parameter Value Meaning
GPIO 0-31 The GPIO which has changed state
edge 0-2 0 = change to low (a falling edge)
1 = change to high (a rising edge)
2 = no level change (a watchdog timeout)
tick 32 bit The number of microseconds since boot
WARNING: this wraps around from
4294967295 to 0 roughly every 72 minutes
userdata pointer Pointer to an arbitrary object
callback_id: >=0, as returned by a call to callback or callback_ex.
user_gpio: 0-31.
edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE.
timeout: >=0.
typedef void (*CBFunc_t)
(unsigned user_gpio, unsigned level, uint32_t tick);
typedef void (*CBFuncEx_t)
(unsigned user_gpio, unsigned level, uint32_t tick, void * user);
#define PI_MIN_WAVE_DATABITS 1
#define PI_MAX_WAVE_DATABITS 32
RISING_EDGE 0
FALLING_EDGE 1
EITHER_EDGE. 2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Type 1 X X - - X - - X X X X X - - X X
Type 2 - - X X X - - X X X X X - - X X
Type 3 X X X X X X X X X X X X X X
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Type 1 - X X - - X X X X X - - - - - -
Type 2 - X X - - - X X X X - X X X X X
Type 3 X X X X X X X X X X X X - - - -
typedef struct
{
uint32_t gpioOn;
uint32_t gpioOff;
uint32_t usDelay;
} gpioPulse_t;
typedef void *(gpioThreadFunc_t) (void *);
PI_OFF 0
PI_ON 1
PI_CLEAR 0
PI_SET 1
PI_LOW 0
PI_HIGH 1
PI_TIMEOUT 2
PI_INPUT 0
PI_OUTPUT 1
PI_ALT0 4
PI_ALT1 5
PI_ALT2 6
PI_ALT3 7
PI_ALT4 3
PI_ALT5 2
PI_PUD_OFF 0
PI_PUD_DOWN 1
PI_PUD_UP 2
PI_SERVO_OFF 0
PI_MIN_SERVO_PULSEWIDTH 500
PI_MAX_SERVO_PULSEWIDTH 2500
#define PI_HW_PWM_RANGE 1000000
#define PI_HW_PWM_MIN_FREQ 1
#define PI_HW_PWM_MAX_FREQ 125000000
PI_MIN_DUTYCYCLE_RANGE 25
PI_MAX_DUTYCYCLE_RANGE 40000
#define PI_MIN_WAVE_HALFSTOPBITS 2
#define PI_MAX_WAVE_HALFSTOPBITS 8
PI_MIN_WDOG_TIMEOUT 0
PI_MAX_WDOG_TIMEOUT 60000
typedef enum
{
pigif_bad_send = -2000,
pigif_bad_recv = -2001,
pigif_bad_getaddrinfo = -2002,
pigif_bad_connect = -2003,
pigif_bad_socket = -2004,
pigif_bad_noib = -2005,
pigif_duplicate_callback = -2006,
pigif_bad_malloc = -2007,
pigif_bad_callback = -2008,
pigif_notify_failed = -2009,
pigif_callback_not_found = -2010,
} pigifError_t;