Timer module config for PWM fucntion

This commit is contained in:
Miducc
2023-06-23 09:43:42 +07:00
parent 5bdcd8ad93
commit ca87312d05
2 changed files with 22 additions and 0 deletions

16
src/timer_module.c Normal file
View File

@@ -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;
}