git.ucc.asn.au
/
matches
/
MCTX3420.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
9c953731305c765a3420925a42bbc0962eae85be
[matches/MCTX3420.git]
/
BBB code
/
PWM_real
/
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
17
void pwm_init(void);
18
void pwm_start(void);
19
void pwm_stop(void);
20
void pwm_set_duty(int duty_percent);
21
void pwm_set_period(int freq);
UCC
git Repository :: git.ucc.asn.au