Rowan Posted February 13, 2006 Report Share Posted February 13, 2006 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.0What I am trying to find is where the USER_DIN_NotifyToggle function is filtering the 0->1 events out in the MBLC AppChurRowan Quote Link to comment Share on other sites More sharing options...
raphael Posted February 13, 2006 Report Share Posted February 13, 2006 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 0LC_SFB_DISPLAY_Page0 ;; don't continue if button has been depressed IFSET MIOS_PARAMETER2, 0, return Quote Link to comment Share on other sites More sharing options...
Rowan Posted February 13, 2006 Author Report Share Posted February 13, 2006 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 Quote Link to comment Share on other sites More sharing options...
TK. Posted February 14, 2006 Report Share Posted February 14, 2006 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. Quote Link to comment Share on other sites More sharing options...
Rowan Posted February 15, 2006 Author Report Share Posted February 15, 2006 Thanks,I'll be back with more question soon no doubt.Kind regardsRowan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.