is there a way to merge psoc creator digital I/O driver

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JeSy_1305731
Level 4
Level 4
First like received

in psoc creator, if you use the schematic tool to create 4 input switches,  and name them SW1, SW2, SW3, SW4,  the tool autogenerates 4 instances of the exact same code, the only difference is the name of the function,  it creates API  SW1_Read  SW1_Write,  SW2_Read, SW2_Write, SW3_Read  SW3_Write,  SW4_Read, SW4_Write,

Is there a way to get the tool to generate one copy of the API then you pass it the port.  for instance just having Read_Port, and Write_Port, then pass the port as variable. instead of having 4 coppies of the same code?

0 Likes
6 Replies