mirror of
https://github.com/drasko/codezero.git
synced 2026-02-26 16:53:14 +01:00
Timer Code tested
This commit is contained in:
@@ -21,12 +21,16 @@ variant = type
|
||||
# Path for uart files
|
||||
LIBDEV_UART_PATH = join(PROJROOT, 'conts/libdev/uart')
|
||||
|
||||
# Path for timer files
|
||||
LIBDEV_TIEMR_PATH = join(PROJROOT, 'conts/libdev/timer/sp804')
|
||||
|
||||
e = env.Clone()
|
||||
e.Append(CPPPATH = [LIBDEV_UART_PATH + '/include'],
|
||||
e.Append(CPPPATH = [LIBDEV_UART_PATH + '/include', LIBDEV_TIEMR_PATH + '/include'],
|
||||
CCFLAGS = ['-nostdinc', '-DVARIANT_' + variant.upper(),
|
||||
'-DPLATFORM_' + platform.upper()])
|
||||
|
||||
source = Glob('uart/src' + '/*.c')
|
||||
source = Glob('uart/src' + '/*.c') + \
|
||||
Glob('timer/sp804/src' + '/*.c')
|
||||
|
||||
objects = e.StaticObject(source)
|
||||
library = e.StaticLibrary('libdev-' + variant, objects)
|
||||
|
||||
@@ -56,6 +56,10 @@
|
||||
#define SP804_TIMERMIS 0x14
|
||||
#define SP804_TIMERBGLOAD 0x18
|
||||
|
||||
struct sp804_timer {
|
||||
unsigned int base;
|
||||
};
|
||||
|
||||
void sp804_init(unsigned int timer_base, int runmode, int wrapmode, \
|
||||
int width, int irq_enable);
|
||||
void sp804_irq_handler(unsigned int timer_base);
|
||||
|
||||
Reference in New Issue
Block a user