diff --git a/inc/timer_module.h b/inc/timer_module.h new file mode 100644 index 0000000..8403691 --- /dev/null +++ b/inc/timer_module.h @@ -0,0 +1,6 @@ +#ifndef _TIMER_MODULE_ +#define _TIMER_MODULE_ + +void buzz_init(); + +#endif \ No newline at end of file diff --git a/src/timer_module.c b/src/timer_module.c new file mode 100644 index 0000000..98d74d9 --- /dev/null +++ b/src/timer_module.c @@ -0,0 +1,16 @@ +#include "BA45F5250.h" +#include "stdint.h" +#include "build-in.h" +#include "timer_module.h" + +void buzz_init() +{ + _pas15 = 0; + _pas14 = 1; + _ptmc0 = 0b00100000; + _ptmc1 = 0b10101000; + _ptmrpl = 0b11110100; + _ptmrph = 0b00000001; + _ptmal = 0b11111010; + _ptmah = 0b00000000; +} \ No newline at end of file