Lines Matching +full:5 +full:v
22 #define DA9052_GET_TIME_RETRIES 5
59 uint8_t v[2][5]; in da9052_read_alarm() local
63 ret = da9052_group_read(rtc->da9052, DA9052_ALARM_MI_REG, 5, &v[0][0]); in da9052_read_alarm()
71 DA9052_ALARM_MI_REG, 5, &v[idx][0]); in da9052_read_alarm()
77 if (memcmp(&v[0][0], &v[1][0], 5) == 0) { in da9052_read_alarm()
78 rtc_tm->tm_year = (v[0][4] & DA9052_RTC_YEAR) + 100; in da9052_read_alarm()
79 rtc_tm->tm_mon = (v[0][3] & DA9052_RTC_MONTH) - 1; in da9052_read_alarm()
80 rtc_tm->tm_mday = v[0][2] & DA9052_RTC_DAY; in da9052_read_alarm()
81 rtc_tm->tm_hour = v[0][1] & DA9052_RTC_HOUR; in da9052_read_alarm()
82 rtc_tm->tm_min = v[0][0] & DA9052_RTC_MIN; in da9052_read_alarm()
104 uint8_t v[3]; in da9052_set_alarm() local
124 v[0] = rtc_tm->tm_hour; in da9052_set_alarm()
125 v[1] = rtc_tm->tm_mday; in da9052_set_alarm()
126 v[2] = rtc_tm->tm_mon; in da9052_set_alarm()
128 ret = da9052_group_write(da9052, DA9052_ALARM_H_REG, 3, v); in da9052_set_alarm()
157 uint8_t v[2][6]; in da9052_rtc_read_time() local
161 ret = da9052_group_read(rtc->da9052, DA9052_COUNT_S_REG, 6, &v[0][0]); in da9052_rtc_read_time()
169 DA9052_COUNT_S_REG, 6, &v[idx][0]); in da9052_rtc_read_time()
175 if (memcmp(&v[0][0], &v[1][0], 6) == 0) { in da9052_rtc_read_time()
176 rtc_tm->tm_year = (v[0][5] & DA9052_RTC_YEAR) + 100; in da9052_rtc_read_time()
177 rtc_tm->tm_mon = (v[0][4] & DA9052_RTC_MONTH) - 1; in da9052_rtc_read_time()
178 rtc_tm->tm_mday = v[0][3] & DA9052_RTC_DAY; in da9052_rtc_read_time()
179 rtc_tm->tm_hour = v[0][2] & DA9052_RTC_HOUR; in da9052_rtc_read_time()
180 rtc_tm->tm_min = v[0][1] & DA9052_RTC_MIN; in da9052_rtc_read_time()
181 rtc_tm->tm_sec = v[0][0] & DA9052_RTC_SEC; in da9052_rtc_read_time()
199 uint8_t v[6]; in da9052_rtc_set_time() local
208 v[0] = tm->tm_sec; in da9052_rtc_set_time()
209 v[1] = tm->tm_min; in da9052_rtc_set_time()
210 v[2] = tm->tm_hour; in da9052_rtc_set_time()
211 v[3] = tm->tm_mday; in da9052_rtc_set_time()
212 v[4] = tm->tm_mon + 1; in da9052_rtc_set_time()
213 v[5] = tm->tm_year - 100; in da9052_rtc_set_time()
215 ret = da9052_group_write(rtc->da9052, DA9052_COUNT_S_REG, 6, v); in da9052_rtc_set_time()