-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed rtc so that we use UIE interrupts
- Loading branch information
Showing
19 changed files
with
427 additions
and
178 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include <lcom/lcf.h> | ||
|
||
#include <stdint.h> | ||
|
||
int(util_get_LSB)(uint16_t val, uint8_t *lsb) { | ||
if(lsb==NULL){printf("Lsb is a null pointer\n"); return 1;} | ||
*lsb = (uint8_t) val; | ||
return 0; | ||
} | ||
|
||
int(util_get_MSB)(uint16_t val, uint8_t *msb) { | ||
if(msb==NULL){printf("Msb is a null pointer\n"); return 1;} | ||
*msb = (uint8_t) (val >> 8); | ||
return 0; | ||
} | ||
|
||
int (util_sys_inb)(int port, uint8_t *value) { | ||
if(value==NULL){printf("Value is a null pointer\n"); return 1;} | ||
uint32_t val; | ||
if(sys_inb(port, &val)){printf("Error reading from the port\n"); return 1;} | ||
|
||
util_get_LSB(val, value); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.