diff options
author | Martin Burnicki <martin.burnicki@meinberg.de> | 2022-07-19 18:10:33 +0200 |
---|---|---|
committer | Martin Burnicki <martin.burnicki@meinberg.de> | 2022-07-19 18:10:33 +0200 |
commit | 4ca78530a221289e680ce24f02cc3e209820f3b5 (patch) | |
tree | 3f5566d5eabce39ebd407490d5f9a013c916651b | |
parent | aa7ed781432e349acfb69a74a77ecee988f0d7f3 (diff) | |
download | mbgtools-lx-4ca78530a221289e680ce24f02cc3e209820f3b5.tar.gz mbgtools-lx-4ca78530a221289e680ce24f02cc3e209820f3b5.zip |
Rename some symbols to match a more common naming convention
Also fix a spelling error in a debug/status message.
-rw-r--r-- | mbglib/common/mbg_syn1588_util.h | 21 | ||||
-rw-r--r-- | mbgstatus/mbgstatus.c | 9 |
2 files changed, 18 insertions, 12 deletions
diff --git a/mbglib/common/mbg_syn1588_util.h b/mbglib/common/mbg_syn1588_util.h index f279bf9..46bf824 100644 --- a/mbglib/common/mbg_syn1588_util.h +++ b/mbglib/common/mbg_syn1588_util.h @@ -1,7 +1,7 @@ /************************************************************************** * - * $Id: mbg_syn1588_util.h 1.2 2022/07/06 15:09:08 martin.burnicki REL_M $ + * $Id: mbg_syn1588_util.h 1.3 2022/07/19 16:05:17 martin.burnicki REL_M $ * * Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany * @@ -9,6 +9,9 @@ * * ----------------------------------------------------------------------- * $Log: mbg_syn1588_util.h $ + * Revision 1.3 2022/07/19 16:05:17 martin.burnicki + * Renamed some symbols to match a more common naming convention. + * Fixed a spelling error in a debug message. * Revision 1.2 2022/07/06 15:09:08 martin.burnicki * Support SYN1588 insync range boundary code instead of the original enum. * Revision 1.1 2022/05/31 13:41:41 martin.burnicki @@ -111,13 +114,13 @@ static __mbg_inline /*HDR*/ * @brief Check if the PTP stack is in sync. * * This is the case if the determined time offset is inside - * a specified boundary. See ::syn1588_get_in_sync_boundary_code. + * a specified boundary. See ::syn1588_get_insync_boundary_code. * * @param[in] ptp_sync_status The sync status word read from a device. * * @return @a true, if in sync, else @a false. * - * @see ::syn1588_get_in_sync_boundary_code + * @see ::syn1588_get_insync_boundary_code */ bool syn1588_ptp_in_sync( SYN1588_PTP_SYNC_STATUS ptp_sync_status ) { @@ -162,11 +165,11 @@ static __mbg_inline /*HDR*/ * * @see ::syn1588_ptp_in_sync */ -uint syn1588_get_in_sync_boundary_code( SYN1588_PTP_SYNC_STATUS ptp_sync_status ) +uint syn1588_get_insync_boundary_code( SYN1588_PTP_SYNC_STATUS ptp_sync_status ) { return ( ptp_sync_status & DEF_PSS_BITMASK_PTP_INSYNC_BND_CODE ) >> DEF_PSS_SHIFT_PTP_INSYNC_BND_CODE; -} // syn1588_get_in_sync_boundary_code +} // syn1588_get_insync_boundary_code @@ -452,7 +455,7 @@ void syn1588_decode_sync_status( SYN1588_PTP_SYNC_STATUS ptp_sync_status, PCPS_H uint32_t ptp_state = syn1588_ptp_state_from_sync_status( ptp_sync_status ); bool ptp_in_sync = syn1588_ptp_in_sync( ptp_sync_status ); - uint32_t in_sync_boundary_idx = syn1588_get_in_sync_boundary_code( ptp_sync_status ); + uint32_t insync_boundary_code = syn1588_get_insync_boundary_code( ptp_sync_status ); bool timescale_is_ptp = ( ptp_sync_status & DEF_PSS_BIT_PTP_TIMESCALE ) != 0; @@ -466,9 +469,9 @@ void syn1588_decode_sync_status( SYN1588_PTP_SYNC_STATUS ptp_sync_status, PCPS_H fprintf( stderr, " Leap 59: %i, Leap 61: %i\n", leap_59, leap_61 ); fprintf( stderr, " PTP State: 0x%08X (%s), in sync: %i, boundary: %u (%s)\n", ptp_state, mbg_syn1588_chk_get_ptp_state_str( ptp_state ), - ptp_in_sync, in_sync_boundary_idx, - mbg_syn1588_get_boundary_str( in_sync_boundary_idx ) ); - fprintf( stderr, " lSync runnig: %s\n\n", lsync_running ? "Yes" : "No" ); + ptp_in_sync, insync_boundary_code, + mbg_syn1588_get_boundary_str( insync_boundary_code ) ); + fprintf( stderr, " lSync running: %s\n\n", lsync_running ? "Yes" : "No" ); } #endif diff --git a/mbgstatus/mbgstatus.c b/mbgstatus/mbgstatus.c index 01192eb..7e87717 100644 --- a/mbgstatus/mbgstatus.c +++ b/mbgstatus/mbgstatus.c @@ -1,7 +1,7 @@ /************************************************************************** * - * $Id: mbgstatus.c 1.37 2022/07/06 15:09:51 martin.burnicki REL_M $ + * $Id: mbgstatus.c 1.38 2022/07/19 16:07:11 martin.burnicki REL_M $ * * Description: * Main file for mbgstatus program which demonstrates how to @@ -10,6 +10,9 @@ * * ----------------------------------------------------------------------- * $Log: mbgstatus.c $ + * Revision 1.38 2022/07/19 16:07:11 martin.burnicki + * Account for a changed function name. + * Fixed a spelling error in a status message. * Revision 1.37 2022/07/06 15:09:51 martin.burnicki * Support SYN1588 insync range boundary code. * Revision 1.36 2022/06/30 13:00:22 martin.burnicki @@ -934,7 +937,7 @@ void show_syn1588_ptp_sync_status( const DEVICE_STATUS *p_ds ) ptp_state_str = mbg_syn1588_chk_get_ptp_state_str( ptp_state ); ptp_in_sync = syn1588_ptp_in_sync( p_ds->syn1588_ptp_sync_status ); - insync_boundary_code = syn1588_get_in_sync_boundary_code( p_ds->syn1588_ptp_sync_status ); + insync_boundary_code = syn1588_get_insync_boundary_code( p_ds->syn1588_ptp_sync_status ); mbg_syn1588_snprint_insync_boundary_code( insync_boundary_str, sizeof( insync_boundary_str ), insync_boundary_code, true ); lsync_running = syn1588_lsync_running( p_ds->syn1588_ptp_sync_status ); @@ -995,7 +998,7 @@ print_details: printf( "\n" ); - printf( " lSync runnig: %s\n", lsync_running ? "Yes" : "No" ); + printf( " lSync running: %s\n", lsync_running ? "Yes" : "No" ); } out: |