diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-31 09:38:43 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-31 09:38:43 +0000 |
commit | 9cb3af610a1d7cc2d8c1433f54077938d0268a8f (patch) | |
tree | 7429d8f73b1fba650f6674227291da316477b126 /src/target/cortex_m3.c | |
parent | fbe8cf72a5e6c80fed5fba8754d790ca63ad2b65 (diff) |
Add wrappers for target->type->examined:
- replace all checks of target->type->examined with target_was_examined().
- replace all setting of target->type->examined with target_set_examined().
- replace clearing of target->type->examined with target_reset_examined().
- add documentation in target_s to warn not to access field directly.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1962 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/cortex_m3.c')
-rw-r--r-- | src/target/cortex_m3.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index ab217f98..8a5983be 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -1429,9 +1429,9 @@ int cortex_m3_examine(struct target_s *target) if ((retval = ahbap_debugport_init(swjdp)) != ERROR_OK) return retval; - if (!target->type->examined) + if (!target_was_examined(target)) { - target->type->examined = 1; + target_set_examined(target); /* Read from Device Identification Registers */ if ((retval = target_read_u32(target, CPUID, &cpuid)) != ERROR_OK) @@ -1526,7 +1526,7 @@ int cortex_m3_target_request_data(target_t *target, u32 size, u8 *buffer) int cortex_m3_handle_target_request(void *priv) { target_t *target = priv; - if (!target->type->examined) + if (!target_was_examined(target)) return ERROR_OK; armv7m_common_t *armv7m = target->arch_info; swjdp_common_t *swjdp = &armv7m->swjdp_info; |