aboutsummaryrefslogtreecommitdiff
path: root/src/cortexm.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/cortexm.c
parente1c1162a1a666387133780efa31935e5b6dcc5c7 (diff)
Probe function return bool, true if device identified.
Correctly identify LM3S3748.
Diffstat (limited to 'src/cortexm.c')
-rw-r--r--src/cortexm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cortexm.c b/src/cortexm.c
index 167fce8..4430e6e 100644
--- a/src/cortexm.c
+++ b/src/cortexm.c
@@ -315,7 +315,7 @@ static const char tdesc_cortex_mf[] =
" </feature>"
"</target>";
-int
+bool
cortexm_probe(struct target_s *target)
{
target->driver = cortexm_driver_str;
@@ -357,7 +357,7 @@ cortexm_probe(struct target_s *target)
CORTEXM_DEMCR_VC_CORERESET;
#define PROBE(x) \
- do { if (!(x)(target)) return 0; else target_check_error(target); } while (0)
+ do { if ((x)(target)) return true; else target_check_error(target); } while (0)
PROBE(stm32f1_probe);
PROBE(stm32f4_probe);
@@ -365,11 +365,10 @@ cortexm_probe(struct target_s *target)
PROBE(lpc11xx_probe);
PROBE(lpc43xx_probe);
PROBE(sam3x_probe);
- /* Try LMI last, as it doesn't fail. */
PROBE(lmi_probe);
#undef PROBE
- return 0;
+ return true;
}
static bool