40static int8_t gs_time_zone = 0;
130 *zone = gs_time_zone;
148 timeptr.tm_year = t->
year - 1900;
149 timeptr.tm_mon = t->
month - 1;
150 timeptr.tm_wday = t->
week;
151 timeptr.tm_mday = t->
day;
152 timeptr.tm_hour = t->
hour;
153 timeptr.tm_min = t->
minute;
154 timeptr.tm_sec = t->
second;
157 *timestamp = mktime(&timeptr) - gs_time_zone * 3600;
driver bpc basic header file
uint8_t bpc_irq_handler(bpc_handle_t *handle)
irq handler
uint8_t bpc_init(bpc_handle_t *handle)
initialize the chip
struct bpc_handle_s bpc_handle_t
bpc handle structure definition
struct bpc_s bpc_t
bpc structure definition
uint8_t bpc_deinit(bpc_handle_t *handle)
close the chip
uint8_t bpc_basic_deinit(void)
basic example deinit
uint8_t bpc_basic_convert_timestamp(bpc_t *t, time_t *timestamp)
basic example convert the time to a unix timestamp
uint8_t bpc_basic_irq_handler(void)
basic irq
uint8_t bpc_basic_get_timestamp_time_zone(int8_t *zone)
basic example get the local time zone
uint8_t bpc_basic_set_timestamp_time_zone(int8_t zone)
basic example set the local time zone
uint8_t bpc_basic_init(void(*callback)(bpc_t *data))
basic example init
uint8_t bpc_interface_timestamp_read(bpc_time_t *t)
interface timestamp read
void bpc_interface_delay_ms(uint32_t ms)
interface delay ms
void bpc_interface_debug_print(const char *const fmt,...)
interface print format data
#define DRIVER_BPC_LINK_INIT(HANDLE, STRUCTURE)
initialize bpc_handle_t structure
#define DRIVER_BPC_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_BPC_LINK_TIMESTAMP_READ(HANDLE, FUC)
link timestamp_read function
#define DRIVER_BPC_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_BPC_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
link receive_callback function