OpenCores
URL https://opencores.org/ocsvn/mips32r1/mips32r1/trunk

Subversion Repositories mips32r1

[/] [mips32r1/] [trunk/] [Software/] [demos/] [XD3_I2C/] [src/] [drivers/] [piezo.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ayersg
#ifndef __PIEZO_H__
2
#define __PIEZO_H__
3
 
4
#include <stdint.h>
5
 
6
#define PIEZO_ADDRESS 0xA0000000
7
 
8
/* Following are defined for a 100 MHz Piezo driver */
9
#define C0      3058104
10
#define C1      1529052
11
 
12
#define C4      191110
13
#define C4s     180388
14
#define D4f     C4s
15
#define D4      170264
16
#define D4s     160705
17
#define E4f     D4s
18
#define E4      151685
19
#define F4      143172
20
#define F4s     135138
21
#define G4f     F4s
22
#define G4      127551
23
#define G4s     120395
24
#define A4f     G4s
25
#define A4      113636
26
#define A4s     107259
27
#define B4f     A4s
28
#define B4      101239
29
#define C5      95557
30
#define C5s     90192
31
#define D5f     C5s
32
#define D5      85131
33
#define D5s     80354
34
#define E5f     D5s
35
#define E5      75843
36
 
37
#define C8      11945
38
 
39
 
40
void Piezo_set(uint32_t count, int enable);
41
void Piezo_play(uint32_t note);
42
 
43
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.