Well, I make some mods in the C wrapper to support the switch matrix stuff, but with sm_simple.inc and sm_fast.inc I get always the same probleme : when I press a switch, it can’t stop toggle between on and off… don’t know why, it works with the example app (so it’s not a hardware problem).
I want to use the same dout for driving switch and led matrix (led matrix not yet solder). Maybe it would be a better idea to make those change in mios?
I want to use encoder too… so I think there I can’t use sm_fast.inc?
Well, I make some mods in the C wrapper to support the switch matrix stuff, but with sm_simple.inc and sm_fast.inc I get always the same probleme : when I press a switch, it can’t stop toggle between on and off… don’t know why, it works with the example app (so it’s not a hardware problem).
well, what should I say to this statement? I don’t know your code
I want to use the same dout for driving switch and led matrix (led matrix not yet solder). Maybe it would be a better idea to make those change in mios?
no, because matrices are always very hardware dependent and require customizations which are better located in the application, because parametrized code would be too slow.
MIOS already provides a hook which allows to prepare the DOUTs before they are updated. However, currently it is not possible to use this hook in C… I know… this will be added to the C wrapper once I find the time.
I want to use encoder too… so I think there I can’t use sm_fast.inc?
you can use two seperate DIN/DOUT chains, one for the standard MIOS stuff, one for the button matrix stuff. You only need to change the pinning in sm_fast.inc
USER_Tick
extern _Tick
call SM_ButtonHandler
lfsr FSR0, STACK_HEAD ;; initialize stack
lfsr FSR2, STACK_HEAD
goto _Tick
USER_SR_Service_Prepare
;; TODO
;; not forwarded to C yet -- no problem at all, but some additional
;; SFRs needs to be saved.
call SM_PrepareCol
return
USER_SR_Service_Finish
;; TODO
;; not forwarded to C yet -- no problem at all, but some additional
;; SFRs needs to be saved.
call SM_GetRow
return
I try to customise to make the matrix works… I need to check again maybe my error is stupid