Device-Chip-Adapter-Gpiod
view release on metacpan or search on metacpan
lib/Device/Chip/Adapter/Gpiod.xs view on Meta::CPAN
SV *chip_ptr
CODE:
struct gpiod_chip *chip = (struct gpiod_chip*)SvIV(chip_ptr);
RETVAL = gpiod_chip_num_lines(chip);
OUTPUT:
RETVAL
void
gpiod_read_lines(chip_ptr, ...)
SV *chip_ptr
PPCODE:
struct gpiod_chip *chip = (struct gpiod_chip*)SvIV(chip_ptr);
int *values;
unsigned int *offsets;
int num_lines = items - 1;
struct gpiod_line_bulk lines;
struct gpiod_line_request_config config;
Newx(values, num_lines, int);
Newx(offsets, num_lines, unsigned int);
lib/Device/Chip/Adapter/Gpiod.xs view on Meta::CPAN
}
}
}
Safefree(values);
Safefree(offsets);
void
gpiod_write_lines(chip_ptr, ...)
SV *chip_ptr
PPCODE:
struct gpiod_chip *chip = (struct gpiod_chip*)SvIV(chip_ptr);
int *values;
unsigned int *offsets;
int num_lines = (items - 1) / 2;
struct gpiod_line_bulk lines;
struct gpiod_line_request_config config;
Newx(values, num_lines, int);
Newx(offsets, num_lines, unsigned int);
( run in 0.759 second using v1.01-cache-2.11-cpan-5511b514fd6 )