Digineural Posted June 9, 2011 Report Share Posted June 9, 2011 (edited) I'm looking to map UI input buttons to an input matrix that is managed by an IC over IIC. I think I'm having a little trouble modifying the SEQ to manage this process. Here is a rundown of what I was looking to do with the least evasive code changes possible. I'm merely asking if I'm moving down the right path or if there is a better way. I can only have up to 12 switches per IC and only 4 addresses on the IIC bus so that still leaves all the encoders and a few switches to still go through APP_DIN_NotifyToggle 1. I want to create a mapping table that defines a IIC mapping to SRIO mapping using the following layout: IIC ADDR, IIC PIN, SR, SR PIN 2. I thought if I create a new TASK, that I can copy APP_DIN_NotifyToggle and modify it to look sort of like the following but the key is passing everything to the existing button handler typedef{ u32 pin; u32 pin_value; }tIIC_Input_Mapping; void TASK_IIC_DIN_Handler() { // Convert the IIC input to a DIN mapping tIIC_Input_Mapping IIC_Input_Mapping = IIC_TO_DIN_MAPPING( /*IIC Input logic here */ ); // forward to UI button handler SEQ_UI_Button_Handler(IIC_Input_Mapping.pin, IIC_Input_Mapping.pin_value); } Thoughts? Am I moving down the right path? Edited June 9, 2011 by Digineural Quote Link to comment Share on other sites More sharing options...
TK. Posted June 9, 2011 Report Share Posted June 9, 2011 In the MBSEQ V4 application I've reduced the heap memory to get more space for other variables, therefore it won't be possible to add another task. But you could just hook the handler into the existing SEQ_TASK_Period1ms in app.c The input mapping won't be required, as a mapping already exists - just add an offset to the pin number, such as +128 to get unique pin numbers which can be referenced in the MBSEQ_HW.V4 file (128 = SR 17 pin 0 upwards) best regards, thorsten. 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.