LPC: Cleanup regs_size (in bytes).

Also use sizeof() to make it clear why we multiple and divide by 4.
This commit is contained in:
Allen Ibara 2014-01-10 10:59:44 -08:00
parent df9c19f071
commit 487252150f
3 changed files with 3 additions and 3 deletions

View File

@ -131,7 +131,7 @@ void arm7tdmi_jtag_handler(jtag_dev_t *dev)
t->mem_write_words = (void *)do_nothing;
t->mem_read_bytes = (void *)do_nothing;
t->mem_write_bytes = (void *)do_nothing;
t->regs_size = 16 * 4;
t->regs_size = 16 * sizeof(uint32_t);
t->regs_read = (void *)arm7_regs_read;
t->regs_write = (void *)arm7_regs_write;
t->pc_write = (void *)do_nothing;

View File

@ -116,7 +116,7 @@ lpc11xx_probe(struct target_s *target)
static void
lpc11x_iap_call(struct target_s *target, struct flash_param *param, unsigned param_len)
{
uint32_t regs[target->regs_size / 4];
uint32_t regs[target->regs_size / sizeof(uint32_t)];
/* fill out the remainder of the parameters and copy the structure to RAM */
param->opcodes[0] = 0xbe00;

View File

@ -331,7 +331,7 @@ static int32_t sector_number(uint32_t addr)
static void lpc43xx_iap_call(struct target_s *target, struct flash_param *param, unsigned param_len)
{
uint32_t regs[target->regs_size / 4];
uint32_t regs[target->regs_size / sizeof(uint32_t)];
uint32_t iap_entry;
target_mem_read_words(target, &iap_entry, IAP_ENTRYPOINT_LOCATION, sizeof(iap_entry));