Depretly seeking USER_DIN_NotifyToggle.......

Hi,

I would like to use some latching switchs in the MB I’m working on and I have found the following post:

http://www.midibox.org/forum/index.php?topic=5006.0

What I am trying to find is where the USER_DIN_NotifyToggle function is filtering the 0->1 events out in the MBLC App

Chur

Rowan

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 :wink:

;; switch to display page 0

LC_SFB_DISPLAY_Page0

;; don’t continue if button has been depressed

IFSET MIOS_PARAMETER2, 0, return

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

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.

Thanks,

I’ll be back with more question soon no doubt.

Kind regards

Rowan