openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

time.c (1926B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  *
      7  * Time - Broadcom Time BroadSync API - shared functionality
      8  */
      9 
     10 #include <soc/drv.h>
     11 #include <bcm/time.h>
     12 
     13 
     14 /*
     15  * Function:
     16  *      bcm_time_spec_t_init
     17  * Purpose:
     18  *      Initialize bcm_time_spec_t structure 
     19  * Parameters:
     20  *      spec - (OUT) pointer to bcm_time_spec_t structure to initialize
     21  */
     22 void
     23 bcm_time_spec_t_init(bcm_time_spec_t *spec)
     24 {
     25     sal_memset(spec, 0, sizeof (bcm_time_spec_t));
     26 }
     27 
     28 
     29 /*
     30  * Function:
     31  *      bcm_time_interface_t_init
     32  * Purpose:
     33  *      Initialize bcm_time_interface_t structure 
     34  * Parameters:
     35  *      intf - (OUT) pointer to bcm_time_interface_t structure to initialize
     36  */
     37 void
     38 bcm_time_interface_t_init(bcm_time_interface_t *intf)
     39 {
     40     sal_memset(intf, 0, sizeof (bcm_time_interface_t));
     41 }
     42 
     43 
     44 /*
     45  * Function:
     46  *      bcm_time_capture_t_init
     47  * Purpose:
     48  *      Initialize bcm_time_capture_t structure 
     49  * Parameters:
     50  *      capture - (OUT) pointer to bcm_time_capture_t structure to initialize
     51  */
     52 void
     53 bcm_time_capture_t_init(bcm_time_capture_t *capture)
     54 {
     55     sal_memset(capture, 0, sizeof (bcm_time_capture_t));
     56 }
     57 
     58 /*
     59  * Function:
     60  *      bcm_time_synce_divisor_setting_t_init
     61  * Purpose:
     62  *      Initialize bcm_esw_time_synce_divisor_setting_t struct
     63  * Parameters:
     64         divisor - (OUT) Divisor setting
     65  * Returns:
     66  *      BCM_E_xxx
     67  * Notes:
     68  */
     69 void
     70 bcm_time_synce_divisor_setting_t_init(
     71     bcm_time_synce_divisor_setting_t *divisor)
     72 {
     73     sal_memset(divisor, 0, sizeof (bcm_time_synce_divisor_setting_t));
     74     return;
     75 }
     76 
     77 void
     78 bcm_time_ts_counter_t_init(
     79     bcm_time_ts_counter_t *counter)
     80 {
     81     sal_memset(counter, 0, sizeof(bcm_time_ts_counter_t));
     82 }
     83 
     84 void
     85 bcm_time_tod_t_init(
     86     bcm_time_tod_t *tod)
     87 {
     88     sal_memset(tod, 0, sizeof(bcm_time_tod_t));
     89 }
     90