Software Library API naibrd 1.62
See all documentation at naii.docs.com
naibrd_DevEtc.c File Reference
#include "naibrd.h"
#include "devices/naibrd_DevEtc.h"
#include "naibrd_config.h"
#include "nai_ether.h"
#include "advanced/naibrd_adv.h"

Macros

#define ETC_I2C_ADDR   0x6B /*datasheet page 18 DS1683*/
 
#define RD_ETC_REG_CMD   0x0A /*page 13 datasheet DS1683*/
 
#define RD_ETC_REG_CMD_RESP_LEN   4 /*page 13 datasheet DS1683*/
 
#define RD_ETC_REG_CMD_ARGC   0
 
#define RD_ETC_DATA_BUF_LEN   4
 
#define BACKPLANE_I2C_UNIT_NUM   2
 
#define I2C_DEV_TYPE_BACKPLANE   3
 

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_ETC_Open (int32_t cardIndex, naibrd_comm_t comm)
 Opens access to the Elapsed Time Counter (ETC) in the SIU chassis based on the communication mode.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ETC_GetElapsedTime (int32_t cardIndex, uint32_t *outyear, uint32_t *outday, uint32_t *outhour, uint32_t *outmin, uint32_t *outsec)
 Retrieves the Elapsed Time Counter (ETC) value in terms of year, day, hour, minutes and seconds.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ETC_GetTotalSeconds (int32_t cardIndex, uint32_t *outtotal_seconds)
 Retrieves the Elapsed Time Counter (ETC) value in terms of total seconds.
 

Macro Definition Documentation

◆ BACKPLANE_I2C_UNIT_NUM

#define BACKPLANE_I2C_UNIT_NUM   2

◆ ETC_I2C_ADDR

#define ETC_I2C_ADDR   0x6B /*datasheet page 18 DS1683*/

◆ I2C_DEV_TYPE_BACKPLANE

#define I2C_DEV_TYPE_BACKPLANE   3

◆ RD_ETC_DATA_BUF_LEN

#define RD_ETC_DATA_BUF_LEN   4

◆ RD_ETC_REG_CMD

#define RD_ETC_REG_CMD   0x0A /*page 13 datasheet DS1683*/

◆ RD_ETC_REG_CMD_ARGC

#define RD_ETC_REG_CMD_ARGC   0

◆ RD_ETC_REG_CMD_RESP_LEN

#define RD_ETC_REG_CMD_RESP_LEN   4 /*page 13 datasheet DS1683*/