caf_rpi_gpio/mock_gpio

Mocks GPIO pins of a Raspberry PI.

It uses two directories:

/tmp/gpio/in    //pins that are exported as inputs
/tmp/gpio/out   //pins written by the app

and a JSON file with the current config:

/tmp/gpio/meta.json

Files use names gpio<pin#>, i.e., gpio3, and contain 1 or 0.

An external app can just write files in /tmp/gpio/in to trigger poll actions.

Source: