librpipGpioGetValidPins
uint32_t librpipGpioGetValidPins(void);
Description
Gets the GPIO pins that are available for GPIO use after taking into account what the board physically has and removing any pins associated with active kernel modules or pins to ignore passed to librpipInit().
Parameters
None
Returns
A bit mask of valid pins.
Example
Print out all valid GPIO pin numbers:
uint32_t feature_set, pins, i; feature_set = librpipInit(LIBRPIP_BOARD_DETECT, LIBRPIP_FLAG_DEBUG_ON, 0); pins=librpipGpioGetValidPins(); for(i=0;i<32;i++) { if(pins & (1<<i)) fprintf(stdout,"Pin %u is available for GPIO functions\n",i); } librpipClose();