cen64/si/rtc.h
Christopher Bonhage 8f64dcd8b3 Implement RTC write support
* Set local time offset when writing to Joybus or 64DD RTC.
* Refactor get_local_time to use ISO C Time APIs.

Special thanks to @jago85 and @LuigiBlood for their research!
2021-09-04 22:02:29 +02:00

28 lines
730 B
C

//
// si/rtc.h: RTC routines
//
// CEN64: Cycle-Accurate Nintendo 64 Emulator.
// Copyright (C) 2016, Mike Ryan.
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//
#ifndef __si_rtc_h__
#define __si_rtc_h__
#include "common.h"
#include "si/controller.h"
void rtc_init(struct rtc * rtc);
int rtc_status(struct rtc * rtc,
uint8_t *send_buf, uint8_t send_bytes,
uint8_t *recv_buf, uint8_t recv_bytes);
int rtc_read(struct rtc * rtc,
uint8_t *send_buf, uint8_t send_bytes,
uint8_t *recv_buf, uint8_t recv_bytes);
int rtc_write(struct rtc * rtc,
uint8_t *send_buf, uint8_t send_bytes,
uint8_t *recv_buf, uint8_t recv_bytes);
#endif