Jump to content

Depretly seeking USER_DIN_NotifyToggle.......


Rowan

Recommended Posts

As far as I see in lc_buttons_inc are not filtered:

;; --------------------------------------------------------------------------

;;  This function is called when an button has been toggled

;;  Input:

;;     o Button number in WREG and MIOS_PARAMETER1

;;     o Button value MIOS_PARAMETER2:

;;       - 1 if button has been released (=5V)

;;       - 0 if button has been pressed (=0V)

;; --------------------------------------------------------------------------

LC_BUTTON_Handle

...

r;; send third MIDI byte: 0x7f if button pressed, else 0x00

movlw 0x7f

IFSET MIOS_PARAMETER2, 0, movlw 0x00

call MIOS_MIDI_TxBufferPut

...

The handling of the special purpose buttons are handled in lc_sfb.inc.

Thre you can see how to filter 0->1 transitions. Just return if MIOS_PARAMETER2 is 0 ;)

;; switch to display page 0

LC_SFB_DISPLAY_Page0

;; don't continue if button has been depressed

IFSET MIOS_PARAMETER2, 0, return

Link to comment
Share on other sites

raphael,

Thank you for your post.

This is the part of the code I'm after. Do you think I am right in thinking that the Host itself "Logic" is really only interested in the 0x00 >  0x7f  >  0x00 transition  ??? thereby toggling the specified host function?

I'm going to have to modify the app, but I trying to understand how MIOS handels voltages on spacific shit register pins, can I define different behaviour (i.e. some buttons momentary and others latching) for individule pins  ???

 

;; send third MIDI byte: 0x7f if button pressed, else 0x00

  movlw  0x7f

  IFSET  MIOS_PARAMETER2, 0, movlw 0x00

Link to comment
Share on other sites

This is the part of the code I'm after. Do you think I am right in thinking that the Host itself "Logic" is really only interested in the 0x00 >  0x7f  >  0x00 transition  Huh thereby toggling the specified host function?

yes!

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...