Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Ajout de la RTC #26

wants to merge 4 commits into from

Conversation

rdmsr
Copy link

@rdmsr rdmsr commented Apr 16, 2021

J'ai commencé un petit article sur la RTC, n'hésitez pas à me dire si je devrait ajouter quelque chose :)

```c
unsigned char rtc_get_seconds()
{
unsigned char seconds = rtc_read(0);
Copy link
Member

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

while (rtc_is_updating());
outb(0x70, reg);

return inb(0x71);
Copy link
Member

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
{
Copy link
Member

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

Copy link
Member

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;
Copy link
Member

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 ?

@d0p1s4m4
Copy link
Member

is this pr still active ?

@Supercip971
Copy link
Member

up ?

@Supercip971
Copy link
Member

up :^(

@Supercip971
Copy link
Member

uwup !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants