mirror of
https://github.com/polyfractal/rustl8710.git
synced 2025-07-31 19:01:05 +00:00
Initial checkin
This commit is contained in:
parent
d4f581cea3
commit
34016a7bd3
1285 changed files with 536346 additions and 0 deletions
37
component/common/mbed/targets/hal/rtl8195a/timer_api.h
Normal file
37
component/common/mbed/targets/hal/rtl8195a/timer_api.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************/
|
||||
#ifndef MBED_EXT_TIMER_API_EXT_H
|
||||
#define MBED_EXT_TIMER_API_EXT_H
|
||||
|
||||
#include "device.h"
|
||||
//#include "rtl8195a.h"
|
||||
|
||||
typedef void (*gtimer_irq_handler)(uint32_t id);
|
||||
|
||||
typedef struct gtimer_s gtimer_t;
|
||||
enum {
|
||||
TIMER0 = 2, // GTimer 2, share with PWM_3
|
||||
TIMER1 = 3, // GTimer 3, share with PWM_0
|
||||
TIMER2 = 4, // GTimer 4, share with PWM_1
|
||||
TIMER3 = 5, // GTimer 5, share with PWM_2
|
||||
TIMER4 = 0, // GTimer 0, share with software-RTC functions
|
||||
|
||||
GTIMER_MAX = 5
|
||||
};
|
||||
|
||||
void gtimer_init (gtimer_t *obj, uint32_t tid);
|
||||
void gtimer_deinit (gtimer_t *obj);
|
||||
uint32_t gtimer_read_tick (gtimer_t *obj);
|
||||
uint64_t gtimer_read_us (gtimer_t *obj);
|
||||
void gtimer_reload (gtimer_t *obj, uint32_t duration_us);
|
||||
void gtimer_start (gtimer_t *obj);
|
||||
void gtimer_start_one_shout (gtimer_t *obj, uint32_t duration_us, void* handler, uint32_t hid);
|
||||
void gtimer_start_periodical (gtimer_t *obj, uint32_t duration_us, void* handler, uint32_t hid);
|
||||
void gtimer_stop (gtimer_t *obj);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue