diff options
Diffstat (limited to 'FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/freedom-metal/src/rtc.c')
-rw-r--r-- | FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/freedom-metal/src/rtc.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/freedom-metal/src/rtc.c b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/freedom-metal/src/rtc.c index 8b79892df..ff43ec32c 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/freedom-metal/src/rtc.c +++ b/FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/freedom-metal/src/rtc.c @@ -7,21 +7,25 @@ #include <stddef.h> extern inline uint64_t metal_rtc_get_rate(const struct metal_rtc *const rtc); -extern inline uint64_t metal_rtc_set_rate(const struct metal_rtc *const rtc, const uint64_t rate); +extern inline uint64_t metal_rtc_set_rate(const struct metal_rtc *const rtc, + const uint64_t rate); extern inline uint64_t metal_rtc_get_compare(const struct metal_rtc *const rtc); -extern inline uint64_t metal_rtc_set_compare(const struct metal_rtc *const rtc, const uint64_t compare); +extern inline uint64_t metal_rtc_set_compare(const struct metal_rtc *const rtc, + const uint64_t compare); extern inline uint64_t metal_rtc_get_count(const struct metal_rtc *const rtc); -extern inline uint64_t metal_rtc_set_count(const struct metal_rtc *const rtc, const uint64_t count); -extern inline int metal_rtc_run(const struct metal_rtc *const rtc, const enum metal_rtc_run_option option); -extern inline struct metal_interrupt *metal_rtc_get_interrupt(const struct metal_rtc *const rtc); +extern inline uint64_t metal_rtc_set_count(const struct metal_rtc *const rtc, + const uint64_t count); +extern inline int metal_rtc_run(const struct metal_rtc *const rtc, + const enum metal_rtc_run_option option); +extern inline struct metal_interrupt * +metal_rtc_get_interrupt(const struct metal_rtc *const rtc); extern inline int metal_rtc_get_interrupt_id(const struct metal_rtc *const rtc); struct metal_rtc *metal_rtc_get_device(int index) { #ifdef __METAL_DT_MAX_RTCS if (index < __METAL_DT_MAX_RTCS) { - return (struct metal_rtc *) __metal_rtc_table[index]; + return (struct metal_rtc *)__metal_rtc_table[index]; } #endif return NULL; } - |