Skip to content
Discussion options

You must be logged in to vote

Sorry for not seeing this sooner.

The first case is trivial since it is the inherent behavior of the singlepulse property. Writing a 1 to the field will set it to 1 since it is writable, and then it will automatically clear to 0 due to singlepulse.

field {
    sw = rw;
    hw = r;
    singlepulse;
};

The second case is possible if you make the field have a "write-zero-to-set" access policy:

field {
    sw = rw;
    hw = r;
    onwrite = wzs;
    singlepulse;
};

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xinwu-cyber
Comment options

Answer selected by amykyta3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants