mirror of
https://github.com/tsl0922/EPD-nRF5.git
synced 2025-12-06 15:42:48 +08:00
clang-format code
This commit is contained in:
30
GUI/Lunar.h
30
GUI/Lunar.h
@@ -3,13 +3,12 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#define YEAR0 (1900) /* The first year */
|
||||
#define EPOCH_YR (1970) /* EPOCH = Jan 1 1970 00:00:00 */
|
||||
#define SEC_PER_DY (86400) // 一天的秒数
|
||||
#define SEC_PER_HR (3600) // 一小时的秒数
|
||||
#define YEAR0 (1900) /* The first year */
|
||||
#define EPOCH_YR (1970) /* EPOCH = Jan 1 1970 00:00:00 */
|
||||
#define SEC_PER_DY (86400) // 一天的秒数
|
||||
#define SEC_PER_HR (3600) // 一小时的秒数
|
||||
|
||||
typedef struct devtm
|
||||
{
|
||||
typedef struct devtm {
|
||||
uint16_t tm_year;
|
||||
uint8_t tm_mon;
|
||||
uint8_t tm_mday;
|
||||
@@ -19,8 +18,7 @@ typedef struct devtm
|
||||
uint8_t tm_wday;
|
||||
} tm_t;
|
||||
|
||||
struct Lunar_Date
|
||||
{
|
||||
struct Lunar_Date {
|
||||
uint8_t IsLeap;
|
||||
uint8_t Date;
|
||||
uint8_t Month;
|
||||
@@ -36,15 +34,15 @@ extern const char Lunar_StemStrig[10][4];
|
||||
extern const char Lunar_BranchStrig[12][4];
|
||||
extern const char JieQiStr[24][7];
|
||||
|
||||
void LUNAR_SolarToLunar(struct Lunar_Date *lunar, uint16_t solar_year, uint8_t solar_month, uint8_t solar_date);
|
||||
uint8_t LUNAR_GetZodiac(const struct Lunar_Date *lunar);
|
||||
uint8_t LUNAR_GetStem(const struct Lunar_Date *lunar);
|
||||
uint8_t LUNAR_GetBranch(const struct Lunar_Date *lunar);
|
||||
uint8_t GetJieQiStr(uint16_t myear, uint8_t mmonth, uint8_t mday, uint8_t *day);
|
||||
uint8_t GetJieQi(uint16_t myear, uint8_t mmonth, uint8_t mday, uint8_t *JQdate);
|
||||
void LUNAR_SolarToLunar(struct Lunar_Date* lunar, uint16_t solar_year, uint8_t solar_month, uint8_t solar_date);
|
||||
uint8_t LUNAR_GetZodiac(const struct Lunar_Date* lunar);
|
||||
uint8_t LUNAR_GetStem(const struct Lunar_Date* lunar);
|
||||
uint8_t LUNAR_GetBranch(const struct Lunar_Date* lunar);
|
||||
uint8_t GetJieQiStr(uint16_t myear, uint8_t mmonth, uint8_t mday, uint8_t* day);
|
||||
uint8_t GetJieQi(uint16_t myear, uint8_t mmonth, uint8_t mday, uint8_t* JQdate);
|
||||
|
||||
void transformTime(uint32_t unix_time, struct devtm *result);
|
||||
uint32_t transformTimeStruct(struct devtm *result);
|
||||
void transformTime(uint32_t unix_time, struct devtm* result);
|
||||
uint32_t transformTimeStruct(struct devtm* result);
|
||||
uint8_t get_first_day_week(uint16_t year, uint8_t month);
|
||||
uint8_t get_last_day(uint16_t year, uint8_t month);
|
||||
unsigned char day_of_week_get(unsigned char month, unsigned char day, unsigned short year);
|
||||
|
||||
Reference in New Issue
Block a user