aboutsummaryrefslogtreecommitdiff
path: root/src/nrf51.c
diff options
context:
space:
mode:
authorGareth McMullin2015-03-14 15:18:22 -0700
committerGareth McMullin2015-03-14 15:18:22 -0700
commit6f5b1873d7b986fe7b3bc1f267bae9f7649630a5 (patch)
tree81246a079184046887e2accd5585bd916d426584 /src/nrf51.c
parentf5c856af3b3b0155050e793f50c29965d2c8326d (diff)
Use size_t for sizes in flash functions. Fix all sign compare warnings.
Diffstat (limited to 'src/nrf51.c')
-rw-r--r--src/nrf51.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nrf51.c b/src/nrf51.c
index 6c1a8b9..55c9a58 100644
--- a/src/nrf51.c
+++ b/src/nrf51.c
@@ -27,9 +27,9 @@
#include "command.h"
#include "gdb_packet.h"
-static int nrf51_flash_erase(struct target_s *target, uint32_t addr, int len);
+static int nrf51_flash_erase(struct target_s *target, uint32_t addr, size_t len);
static int nrf51_flash_write(struct target_s *target, uint32_t dest,
- const uint8_t *src, int len);
+ const uint8_t *src, size_t len);
static bool nrf51_cmd_erase_all(target *t);
static bool nrf51_cmd_read_hwid(target *t);
@@ -163,7 +163,7 @@ bool nrf51_probe(struct target_s *target)
return false;
}
-static int nrf51_flash_erase(struct target_s *target, uint32_t addr, int len)
+static int nrf51_flash_erase(struct target_s *target, uint32_t addr, size_t len)
{
ADIv5_AP_t *ap = adiv5_target_ap(target);
@@ -210,7 +210,7 @@ static int nrf51_flash_erase(struct target_s *target, uint32_t addr, int len)
}
static int nrf51_flash_write(struct target_s *target, uint32_t dest,
- const uint8_t *src, int len)
+ const uint8_t *src, size_t len)
{
ADIv5_AP_t *ap = adiv5_target_ap(target);
uint32_t offset = dest % 4;