Where pinx is the number of the gpio you want. There are 12 posible gpio with button order: Y-,Y+,X-,X+,start,select,a,b,tr,y,x,tl,hk. Use -1 for unused pins. For example gpio=21,13,26,19,-1,-1,22,24,-1,-1,-1,-1,-1 uses gpios 21,13,26,19 for axis and gpios 22 and 24 for A and B buttons, the rest of buttons are unused.

Where pinx is the number of the gpio you want. There are 12 posible gpio with button order: Y-,Y+,X-,X+,start,select,a,b,tr,y,x,tl,hk. Use -1 for unused pins. For example gpio=21,13,26,19,-1,-1,22,24,-1,-1,-1,-1,-1 uses gpios 21,13,26,19 for axis and gpios 22 and 24 for A and B buttons, the rest of buttons are unused.

If you have a TFT screen connected on your RPi B+ you can't use all the gpios. You can run the following command for using only the gpios not used by the tft screen (Be careful, not all tft screen use the same pins. GPIOs used with this map: 21,13,26,19,5,6,22,4,20,17,27,16,12):