• Benoit Rat's avatar
    wr: Adding hook for WR state · 78b2d08c
    Benoit Rat authored
    When changing the state of the WR servo we can call a hook (function
    pointer) to a function defined by a user in the upper layer (wrpc-sw).
    The purpose of the hook is to add new functionalities when we reach a
    specific state (Alarms, IRIGB, etc...) without needing to change the
    code of PPSI.
    
    [This is a rework of the original patch by Benoit. Mainly, I added
    the extra integer argument to the hook (so I call it twice: both
    entering and leaving the servo), and I removed the function to
    set the hook from wrpc: the main function can set the pointer directly]
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    78b2d08c
wr-constants.h 3.93 KB