remove target_type register_command callback

Uses chaining of command_registration structures to eliminate all
target_type register_callback routines.  Exports the command_handler
registration arrays for those target types that are used by others.
This commit is contained in:
Zachary T Welch
2009-11-23 08:17:01 -08:00
parent 144e3678bd
commit 66ee303456
31 changed files with 89 additions and 149 deletions

View File

@@ -28,9 +28,6 @@
#define AVR_JTAG_INS_LEN 4
/* cli handling */
int avr_register_commands(struct command_context *cmd_ctx);
/* forward declarations */
int avr_target_create(struct target *target, Jim_Interp *interp);
int avr_init_target(struct command_context *cmd_ctx, struct target *target);
@@ -91,17 +88,10 @@ struct target_type avr_target =
.add_watchpoint = avr_add_watchpoint,
.remove_watchpoint = avr_remove_watchpoint,
*/
.register_commands = avr_register_commands,
.target_create = avr_target_create,
.init_target = avr_init_target,
};
int avr_register_commands(struct command_context *cmd_ctx)
{
LOG_DEBUG("%s", __FUNCTION__);
return ERROR_OK;
}
int avr_target_create(struct target *target, Jim_Interp *interp)
{
struct avr_common *avr = calloc(1, sizeof(struct avr_common));