From 2637f072a1e973826ea4b374125621ef1a0dc901 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Sat, 3 Nov 2012 23:51:53 +1300 Subject: Probe function return bool, true if device identified. Correctly identify LM3S3748. --- src/cortexm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/cortexm.c') 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[] = " " ""; -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 -- cgit v1.2.3