mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 14:11:48 -06:00
Display more config info at DS1302 RTC initialization
For systems which use Super capacitor or rechargable battery, trickle charge status is displayed. Good for users with ECB-RAMF for example. Trickle charge can be turned on/off with the RTC.COM utility and the status set will now be display at boot time.
This commit is contained in:
@@ -122,7 +122,14 @@ DSRTC_INIT1:
|
||||
CALL DSRTC_CLK2TIM
|
||||
LD HL,DSRTC_TIMBUF
|
||||
CALL PRTDT
|
||||
;
|
||||
PRTS(" CHARGE=$")
|
||||
CALL DSRTC_TSTCHG
|
||||
JR NZ,NOCHG1
|
||||
PRTS("ON$")
|
||||
JR NOCHG2
|
||||
NOCHG1:
|
||||
PRTS("OFF$")
|
||||
NOCHG2:
|
||||
XOR A ; SIGNAL SUCCESS
|
||||
RET
|
||||
;
|
||||
@@ -260,6 +267,17 @@ DSRTC_TIM2CLK:
|
||||
LD (DSRTC_DAY),A
|
||||
RET
|
||||
;
|
||||
; TEST CLOCK FOR CHARGE DATA
|
||||
;
|
||||
DSRTC_TSTCHG:
|
||||
LD C,$91 ; CHARGE RESISTOR & DIODE VALUES
|
||||
CALL DSRTC_CMD ; SEND THE COMMAND
|
||||
CALL DSRTC_GET ; READ THE REGISTER
|
||||
CALL DSRTC_END ; FINISH IT
|
||||
AND %11110000 ; CHECK FOR
|
||||
CP %10100000 ; ENABLED FLAG
|
||||
RET
|
||||
;
|
||||
; TEST CLOCK FOR VALID DATA
|
||||
; READ CLOCK HALT BIT AND RETURN ZF BASED ON BIT VALUE
|
||||
; 0 = RUNNING
|
||||
|
||||
Reference in New Issue
Block a user