rpihw.h
Go to the documentation of this file.
1 /*
2  * rpihw.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 
31 #ifndef __RPIHW_H__
32 #define __RPIHW_H__
33 
34 #include <stdint.h>
35 
36 typedef struct {
37  uint32_t type;
38 #define RPI_HWVER_TYPE_UNKNOWN 0
39 #define RPI_HWVER_TYPE_PI1 1
40 #define RPI_HWVER_TYPE_PI2 2
41 #define RPI_HWVER_TYPE_PI4 3
42  uint32_t hwver;
43  uint32_t periph_base;
44  uint32_t videocore_base;
45  char *desc;
46 } rpi_hw_t;
47 
48 
49 const rpi_hw_t *rpi_hw_detect(void);
50 
51 
52 #endif /* __RPIHW_H__ */
uint32_t hwver
Definition: rpihw.h:42
const rpi_hw_t * rpi_hw_detect(void)
Definition: rpihw.c:513
uint32_t videocore_base
Definition: rpihw.h:44
Definition: rpihw.h:36
uint32_t type
Definition: rpihw.h:37
char * desc
Definition: rpihw.h:45
uint32_t periph_base
Definition: rpihw.h:43


ws281x
Author(s): Alexey Rogachevskiy , Oleg Kalachev
autogenerated on Wed Jun 15 2022 02:46:00