1platform-hooks {#hooks} 2============== 3 4Hooks can be defined per supported platform to allow for highly custom 5operations if needed. This feature of MRAA should only be used by developers 6defining the board definitions, NOT an end user. 7 8##Types of Hooks 9 10###REPLACE 11Defining a replace function will entirely replace the associate function. This 12should only be done if your new function can handle everything the mraa 13function would normally. 14 15###PRE 16Any functionality defined here will be performed when the main function is 17called. 18 19###POST 20Any functionality perfomed here is done just before the normal function 21returns. All post functions will have passed into them the return value that 22would normally be returned. 23 24##Hooks 25### GPIO 26 * init (pre-post) 27 * mode (replace-pre-post) 28 * dir (replace-pre-post) 29 * write (pre-post) 30 * use-mmaped (replace-pre-post) 31 32### I2C 33 * init (pre-post) - On RAW 34