aboutsummaryrefslogtreecommitdiff
path: root/src/stm32f4.c
diff options
context:
space:
mode:
authorGareth McMullin2012-11-03 23:51:53 +1300
committerGareth McMullin2012-11-03 23:53:25 +1300
commit2637f072a1e973826ea4b374125621ef1a0dc901 (patch)
tree5dc228f1e9256ab4e26ae3e0c2ac15cc4d33098b /src/stm32f4.c
parente1c1162a1a666387133780efa31935e5b6dcc5c7 (diff)
Probe function return bool, true if device identified.
Correctly identify LM3S3748.
Diffstat (limited to 'src/stm32f4.c')
-rw-r--r--src/stm32f4.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/stm32f4.c b/src/stm32f4.c
index b483510..ecf99e1 100644
--- a/src/stm32f4.c
+++ b/src/stm32f4.c
@@ -133,24 +133,24 @@ uint16_t stm32f4_flash_write_stub[] = {
// ...
};
-int stm32f4_probe(struct target_s *target)
+bool stm32f4_probe(struct target_s *target)
{
uint32_t idcode;
idcode = adiv5_ap_mem_read(adiv5_target_ap(target), DBGMCU_IDCODE);
switch(idcode & 0xFFF) {
case 0x411: /* Documented to be 0x413! This is what I read... */
- case 0x413:
+ case 0x413:
target->driver = stm32f4_driver_str;
target->xml_mem_map = stm32f4_xml_memory_map;
target->flash_erase = stm32f4_flash_erase;
target->flash_write = stm32f4_flash_write;
- return 0;
- }
- return -1;
+ return true;
+ }
+ return false;
}
-
+
static int stm32f4_flash_erase(struct target_s *target, uint32_t addr, int len)
{
ADIv5_AP_t *ap = adiv5_target_ap(target);