2014-10-03 10:18:13 +01:00
|
|
|
platform-hooks {#hooks}
|
|
|
|
|
==============
|
|
|
|
|
|
|
|
|
|
Hooks can be defined per supported platform to allow for highly custom
|
|
|
|
|
operations if needed. This feature of MRAA should only be used by developers
|
|
|
|
|
defining the board definitions, NOT an end user.
|
2014-06-27 15:37:48 +01:00
|
|
|
|
2014-06-27 15:46:51 +01:00
|
|
|
##Types of Hooks
|
2014-06-27 15:37:48 +01:00
|
|
|
|
2014-06-27 15:46:51 +01:00
|
|
|
###REPLACE
|
2014-10-03 10:18:13 +01:00
|
|
|
Defining a replace function will entirely replace the associate function. This
|
|
|
|
|
should only be done if your new function can handle everything the mraa
|
|
|
|
|
function would normally.
|
2014-06-27 15:37:48 +01:00
|
|
|
|
2014-06-27 15:46:51 +01:00
|
|
|
###PRE
|
2014-10-03 10:18:13 +01:00
|
|
|
Any functionality defined here will be performed when the main function is
|
|
|
|
|
called.
|
2014-06-27 15:37:48 +01:00
|
|
|
|
2014-06-27 15:46:51 +01:00
|
|
|
###POST
|
2014-10-03 10:18:13 +01:00
|
|
|
Any functionality perfomed here is done just before the normal function
|
|
|
|
|
returns. All post functions will have passed into them the return value that
|
|
|
|
|
would normally be returned.
|
2014-06-27 15:37:48 +01:00
|
|
|
|
2014-06-27 15:46:51 +01:00
|
|
|
##Hooks
|
|
|
|
|
### GPIO
|
2014-07-18 13:19:29 +01:00
|
|
|
* init (pre-post)
|
2014-06-27 15:46:51 +01:00
|
|
|
* mode (replace-pre-post)
|
|
|
|
|
* dir (replace-pre-post)
|
|
|
|
|
* write (pre-post)
|
|
|
|
|
* use-mmaped (replace-pre-post)
|
2014-07-14 18:19:07 +01:00
|
|
|
|
|
|
|
|
### I2C
|
|
|
|
|
* init (pre-post) - On RAW
|