Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
Notice that foo is not actually used at all. If I compile my program written like above, it appears to work properly. I can place a breakpoint at the "structPntr->SetDriveMode(PIN_DM_STRONG);" line and it shows me the correct function address both in foo and in the SetDriveMode function pointer. However, if I just comment out the "foo = PIN1_SetDriveMode;" line and recompile, it will not work properly and when the debugger halts at the breakpoint, the member values of *structPntr are blank. I would greatly appreciate any thoughts y'all might have. Thanks.