-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ajout de la RTC #26
base: master
Are you sure you want to change the base?
Ajout de la RTC #26
Conversation
```c | ||
unsigned char rtc_get_seconds() | ||
{ | ||
unsigned char seconds = rtc_read(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
peut être utilier une macro RTC_SECOND_REGISTER à la place de 0
src/x86_64/périphériques/RTC.md
Outdated
while (rtc_is_updating()); | ||
outb(0x70, reg); | ||
|
||
return inb(0x71); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il faudrait mieux utiliser des registres à la place des valeurs magique comme 0x71 0x70...
@@ -13,19 +13,27 @@ Elle peut être utilisée pour avoir la date et heure précise. (voir ACPI pour | |||
# Lire le temps | |||
Il est possible de lire depuis la RTC en utilisant les fonctions suivantes: | |||
```c | |||
|
|||
enum | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the documentation, put a markdown table instead of a C code enum, it's better for reading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and add other register, like STATUS_REGISTER_B, week, day, hour, ... in the table (maybe ?)
outb(0x70, 0x0A); | ||
return inb(0x71) & 0x80; | ||
outb(CMOS_ADDRESS, STATUS_REGISTER_A); | ||
return inb(CMOS_DATA) & 0x80; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a signification of the last bit ?
is this pr still active ? |
up ? |
up :^( |
uwup ! |
J'ai commencé un petit article sur la RTC, n'hésitez pas à me dire si je devrait ajouter quelque chose :)