-
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.
- Loading branch information
Showing
54 changed files
with
1,588 additions
and
1,424 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
/*Timer*/ | ||
#define TIMER_0_IRQ 0 | ||
#define TIMER_CLOCK_FREQ 1193182 | ||
|
||
#define TIMER_REG(timer) 0x40+timer | ||
#define TIMER_CNTRL_REG 0x43 | ||
|
||
#define TIMER_RBK (BIT(7) | BIT(6)) | ||
#define TIMER_RBK_NOT_COUNT BIT(5) | ||
#define TIMER_RBK_NOT_STATUS BIT(4) | ||
#define TIMER_RBK_SEL(timer) BIT((timer) + 1) | ||
|
||
#define TIMER_CNTRL_WORD_SEL(timer) (timer << 6) | ||
#define TIMER_CNTRL_INIT_LSB_MSB (BIT(4) | BIT(5)) | ||
|
||
#define TIMER_STATUS_ACCESS (BIT(4) | BIT(5)) | ||
#define TIMER_STATUS_OP_MODE (BIT(3) | BIT(2) | BIT(1)) |
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,22 @@ | ||
#ifndef _LCOM_TIMER_H_ | ||
#define _LCOM_TIMER_H_ | ||
|
||
#include <lcom/lcf.h> | ||
#include <stdint.h> | ||
#include "macros.h" | ||
|
||
int (timer_set_frequency)(uint8_t timer, uint32_t freq); | ||
|
||
int (timer_subscribe_int)(uint8_t *bit_no); | ||
|
||
int (timer_unsubscribe_int)(); | ||
|
||
void (timer_int_handler)(); | ||
|
||
int (timer_get_conf)(uint8_t timer, uint8_t *st); | ||
|
||
int (timer_display_conf)(uint8_t timer, uint8_t st, enum timer_status_field field); | ||
|
||
|
||
#endif | ||
|
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.