28 uint32_t hi1 = SNVS_HPRTCMR, lo1 = SNVS_HPRTCLR;
31 uint32_t hi2 = SNVS_HPRTCMR, lo2 = SNVS_HPRTCLR;
32 if (lo1 == lo2 && hi1 == hi2)
34 periods = (uint64_t)hi2 << 32 | lo2;
42 uint32_t ms = (1000 * (periods % 32768)) / 32768;
43 time_t sec = periods / 32768;
48 logEntry->
hour =
t.tm_hour;
49 logEntry->
day =
t.tm_mday;
50 logEntry->
month =
t.tm_mon + 1;
51 logEntry->
year =
t.tm_year + 1900;
void write_to_file(int current, int voltage, int mintmp, int maxtmp, int avgtmp, int apps1, int apps2, int brake, int rpm, int I_actual, int powerStageTmp, int motorTmp, int Torque, int motor_voltage, int battery_voltage)