1 // SPDX-License-Identifier: GPL-2.0-or-later
3 /***************************************************************************
4 * Copyright (C) 2005 by Dominic Rath *
5 * Dominic.Rath@gmx.de *
6 ***************************************************************************/
12 #include "algorithm.h"
13 #include <helper/binarybuffer.h>
15 void init_mem_param(struct mem_param
*param
, uint32_t address
, uint32_t size
, enum param_direction direction
)
17 param
->address
= address
;
19 param
->value
= malloc(size
);
20 param
->direction
= direction
;
23 void destroy_mem_param(struct mem_param
*param
)
29 void init_reg_param(struct reg_param
*param
, char *reg_name
, uint32_t size
, enum param_direction direction
)
31 param
->reg_name
= reg_name
;
33 param
->value
= malloc(DIV_ROUND_UP(size
, 8));
34 param
->direction
= direction
;
37 void destroy_reg_param(struct reg_param
*param
)