OpenBIC
OpenSource Bridge-IC
plat_datetime.c File Reference
#include <zephyr.h>
#include <stdio.h>
#include <stdlib.h>
#include <logging/log.h>
#include <sys/timeutil.h>
#include "plat_datetime.h"
#include "pldm_firmware_update.h"
#include "mctp.h"
#include "pldm.h"
Include dependency graph for plat_datetime.c:

Macros

#define BMC_EID   0x08
 
#define RTC_SYNC_INTERVAL_SEC   10
 
#define RTC_WORKQ_STACK_SIZE   2048
 
#define RTC_WORKQ_PRIORITY   CONFIG_MAIN_THREAD_PRIORITY + 2
 

Functions

 LOG_MODULE_REGISTER (plat_datetime)
 
 K_THREAD_STACK_DEFINE (rtc_workq_stack, RTC_WORKQ_STACK_SIZE)
 
 K_WORK_DELAYABLE_DEFINE (rtc_sync_work, rtc_sync_work_handler)
 
int get_datetime_from_bmc (struct tm *tm_now)
 
void rtc_init_once (void)
 
time_t rtc_time (time_t *tloc)
 
void rtc_get_tm (struct tm *tm_now)
 

Variables

struct k_work_q rtc_workq
 

Macro Definition Documentation

◆ BMC_EID

#define BMC_EID   0x08

◆ RTC_SYNC_INTERVAL_SEC

#define RTC_SYNC_INTERVAL_SEC   10

◆ RTC_WORKQ_PRIORITY

#define RTC_WORKQ_PRIORITY   CONFIG_MAIN_THREAD_PRIORITY + 2

◆ RTC_WORKQ_STACK_SIZE

#define RTC_WORKQ_STACK_SIZE   2048

Function Documentation

◆ get_datetime_from_bmc()

int get_datetime_from_bmc ( struct tm *  tm_now)
Here is the call graph for this function:

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( rtc_workq_stack  ,
RTC_WORKQ_STACK_SIZE   
)

◆ K_WORK_DELAYABLE_DEFINE()

K_WORK_DELAYABLE_DEFINE ( rtc_sync_work  ,
rtc_sync_work_handler   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_datetime  )

◆ rtc_get_tm()

void rtc_get_tm ( struct tm *  tm_now)
Here is the call graph for this function:

◆ rtc_init_once()

void rtc_init_once ( void  )

◆ rtc_time()

time_t rtc_time ( time_t *  tloc)

Variable Documentation

◆ rtc_workq

struct k_work_q rtc_workq