Automatic commit of irc logs
[matches/MCTX3420.git] / BBB code / pwm.h
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <errno.h>
4 #include <unistd.h>
5 #include <sys/types.h>
6 #include <sys/stat.h>
7 #include <sys/mman.h>
8 #include <fcntl.h>
9 #include <sys/wait.h>
10 #include <sched.h>
11 #include <stdint.h>
12
13 #define START    0x44e00000    // see datasheet of AM335x
14 #define LENGTH   1024
15 #define OFFSET_1 0xcc          // offset of PWM1 clock (see datasheet of AM335x p.1018)
16 #define FREQ     50                        //50Hz pwm frequency for pressure regulator
17
18 void pwm_init(void);
19 void pwm_start(void);
20 void pwm_stop(void);
21 void pwm_set_duty(int duty_percent);
22 void pwm_set_period(int freq);

UCC git Repository :: git.ucc.asn.au