summaryrefslogtreecommitdiffstatshomepage
path: root/ui-commit.h
blob: 40bcb311502fa9f79cf94866af0352f9c649c4ec (plain)
1
2
3
4
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-co
#ifndef UI_COMMIT_H
#define UI_COMMIT_H

extern void cgit_print_commit(char *hex);

#endif /* UI_COMMIT_H */
ighlight">
#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/i2c.h"
extern "C" {
#include "hardware/rtc.h"
}

#include "init.hpp"

void init_rtc() {
    datetime_t init_date = {
        .year = INIT_DATETIME_YEAR,
        .month = INIT_DATETIME_MONTH,
        .day = INIT_DATETIME_DAY,
        .dotw = INIT_DATETIME_DOTW, // 0 is Sunday, so 5 is Friday
        .hour = INIT_DATETIME_HOUR,
        .min = INIT_DATETIME_MIN,
        .sec = INIT_DATETIME_SEC };
    rtc_init();
    rtc_set_datetime(&init_date);
}

void init_all() {
    stdio_init_all();
    init_rtc();
}