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
-
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
-
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 mappingtIIC_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?