Hi all,

I would like to modify the adapter driver interfaces to allow per-instance 
driver variable structures.

This would:

*         Get rid of loads of static and global variables.

*         Allow multiple interfaces

The proposed prototypes below mostly add this per-instance variable as an 
instance handle.
Drivers could keep using the current system and be modified when suitable to 
use the per -instance parameters.

Is this something that is wanted?
Do you have any thoughts on the proposed organisation below?

Thanks,

Evan

Proposed interface driver prototypes:
{
                char *name;
                const char **transports;
                const struct swd_driver *swd;
                const struct command_registration *commands;

                int (*create)(Jim_GetOptInfo *options, int interface_num, 
adapter_handle_t *new_handle);
                int (*destroy)(adapter_handle_t handle);

                int (*init)(adapter_handle_t handle);
                int (*quit)(adapter_handle_t handle);

                int (*speed)(adapter_handle_t handle, int speed);
                int (*power_dropout)(adapter_handle_t handle, int 
*power_dropout);
                int (*srst_asserted)(adapter_handle_t handle, int 
*srst_asserted);

                /* JTAG functions - to be split out into separate structure 
soon */
                int (*execute_queue)(adapter_handle_t handle, struct 
jtag_command *cmd_queue);
                int (*khz)(adapter_handle_t handle, int khz, int *jtag_speed);
                int (*speed_div)(adapter_handle_t handle, int speed, int *khz);

};


------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to