Main Page
+
Namespaces
Namespace List
+
Namespace Members
All
Functions
Variables
+
Classes
Class List
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
v
w
+
Variables
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
v
w
+
Files
File List
+
File Members
+
All
a
b
c
d
e
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
c
d
e
g
m
p
q
r
s
u
w
+
Variables
c
d
h
l
m
p
r
s
v
w
Typedefs
Enumerations
Enumerator
+
Macros
a
b
c
d
g
h
i
l
m
n
o
p
r
s
t
v
w
vendor
rpi_ws281x
clk.h
Go to the documentation of this file.
1
/*
2
* clk.h
3
*
4
* Copyright (c) 2014 Jeremy Garff <jer @ jers.net>
5
*
6
* All rights reserved.
7
*
8
* Redistribution and use in source and binary forms, with or without modification, are permitted
9
* provided that the following conditions are met:
10
*
11
* 1. Redistributions of source code must retain the above copyright notice, this list of
12
* conditions and the following disclaimer.
13
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
14
* of conditions and the following disclaimer in the documentation and/or other materials
15
* provided with the distribution.
16
* 3. Neither the name of the owner nor the names of its contributors may be used to endorse
17
* or promote products derived from this software without specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
20
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
22
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*
28
*/
29
30
#ifndef __CLK_H__
31
#define __CLK_H__
32
33
#include <stdint.h>
34
35
typedef
struct
{
36
uint32_t
ctl
;
37
#define CM_CLK_CTL_PASSWD (0x5a << 24)
38
#define CM_CLK_CTL_MASH(val) ((val & 0x3) << 9)
39
#define CM_CLK_CTL_FLIP (1 << 8)
40
#define CM_CLK_CTL_BUSY (1 << 7)
41
#define CM_CLK_CTL_KILL (1 << 5)
42
#define CM_CLK_CTL_ENAB (1 << 4)
43
#define CM_CLK_CTL_SRC_GND (0 << 0)
44
#define CM_CLK_CTL_SRC_OSC (1 << 0)
45
#define CM_CLK_CTL_SRC_TSTDBG0 (2 << 0)
46
#define CM_CLK_CTL_SRC_TSTDBG1 (3 << 0)
47
#define CM_CLK_CTL_SRC_PLLA (4 << 0)
48
#define CM_CLK_CTL_SRC_PLLC (5 << 0)
49
#define CM_CLK_CTL_SRC_PLLD (6 << 0)
50
#define CM_CLK_CTL_SRC_HDMIAUX (7 << 0)
51
uint32_t
div
;
52
#define CM_CLK_DIV_PASSWD (0x5a << 24)
53
#define CM_CLK_DIV_DIVI(val) ((val & 0xfff) << 12)
54
#define CM_CLK_DIV_DIVF(val) ((val & 0xfff) << 0)
55
}
__attribute__
((packed,
aligned
(4))) cm_clk_t;
56
57
58
/*
59
* PWM and PCM clock offsets from https://www.scribd.com/doc/127599939/BCM2835-Audio-clocks
60
*
61
*/
62
#define CM_PCM_OFFSET (0x00101098)
63
#define CM_PWM_OFFSET (0x001010a0)
64
65
66
#endif
/* __CLK_H__ */
aligned
aligned(4))) cm_clk_t
__attribute__
Definition:
clk.h:35
__attribute__::ctl
uint32_t ctl
Definition:
clk.h:36
__attribute__::div
uint32_t div
Definition:
clk.h:51
ws281x
Author(s): Alexey Rogachevskiy
, Oleg Kalachev
autogenerated on Wed Jun 15 2022 02:46:00