OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "libutil.h"
#include <logging/log.h>
Macros | |
#define | MINUTES_IN_HOUR 60 |
#define | HOURS_IN_DAY 24 |
#define | DAYS_IN_YEAR 365 |
#define | LEAP_YEAR_CYCLE 4 |
#define | MINUTES_FROM_1970_1996 (820454400 / 60) |
Functions | |
LOG_MODULE_REGISTER (plat_fru_date) | |
int | is_leap_year (int year) |
int | days_in_month (int year, int month) |
void | store_ascii_to_result (char *str, uint8_t *result, int *index) |
uint8_t | store_time_to_result (int year, int month, int day, int hour, int minute, int weekday, uint8_t *result) |
uint8_t | calculate_time_in_hex (long long total_minutes, uint8_t *result) |
uint8_t | get_fru_date (uint16_t *data, uint16_t *return_data) |
#define DAYS_IN_YEAR 365 |
#define HOURS_IN_DAY 24 |
#define LEAP_YEAR_CYCLE 4 |
#define MINUTES_FROM_1970_1996 (820454400 / 60) |
#define MINUTES_IN_HOUR 60 |
uint8_t calculate_time_in_hex | ( | long long | total_minutes, |
uint8_t * | result | ||
) |
int days_in_month | ( | int | year, |
int | month | ||
) |
uint8_t get_fru_date | ( | uint16_t * | data, |
uint16_t * | return_data | ||
) |
int is_leap_year | ( | int | year | ) |
LOG_MODULE_REGISTER | ( | plat_fru_date | ) |
void store_ascii_to_result | ( | char * | str, |
uint8_t * | result, | ||
int * | index | ||
) |
uint8_t store_time_to_result | ( | int | year, |
int | month, | ||
int | day, | ||
int | hour, | ||
int | minute, | ||
int | weekday, | ||
uint8_t * | result | ||
) |