Skip to content
This repository was archived by the owner on Apr 25, 2021. It is now read-only.

Commit c09ad1f

Browse files
committed
인터럽트 SYS_TIMER_TICKS_CPU 추가
1 parent b9c9e71 commit c09ad1f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/mphalport.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,5 @@ mp_uint_t mp_hal_ticks_us(void) {
6565
}
6666

6767
mp_uint_t mp_hal_ticks_cpu(void) {
68-
// return OPENPIE_CONTROLLER->INSNS;
69-
return 0; // return (mp_uint_t) __syscall0(SYS_TIMER_TICKS_CPU);
68+
return (mp_uint_t) __syscall0(SYS_TIMER_TICKS_CPU);
7069
}

src/syscall_table.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#define SYS_TIMER (0x080000)
5151
#define SYS_TIMER_TICKS_MS (SYS_TIMER | 1)
5252
#define SYS_TIMER_TICKS_US (SYS_TIMER | 2)
53+
#define SYS_TIMER_TICKS_CPU (SYS_TIMER | 3)
5354
#define SYS_TIMER_WORLD_TIME (SYS_TIMER | 16)
5455
#define SYS_TIMER_UP_TIME (SYS_TIMER | 17)
5556
#define SYS_TIMER_CPU_TIME (SYS_TIMER | 18)

0 commit comments

Comments
 (0)