Altera_Forum
Honored Contributor
16 years agoquestion about driver of user component
I got a problem unsolved about driver of user component.
In my component's header file named "my_component.h", I have defined the macros for alt_sys_init() to automatically integrate my component into the system. The macros are like:# define MY_COMPONENT_INSTANCE(name, dev) my_component_state dev = { name##_BASE }# define MY_COMPONENT_INIT(name, dev) .... Then after alt_sys_init() executes, there should be a struct(my_component_state) named dev. My question is, can I use the struct? If the anser is NO, then how can I communicate with the instance of the driver in application level?