Debian Codegraph @

thirdparty/analogdevicesinc/no-OS/ad9361/sw/platform_generic/platform.c

raw symbols SCIP
1 /***************************************************************************//**
2 * @file Platform.c
3 * @brief Implementation of Platform Driver.
4 * @author DBogdan ([email protected])
5 ********************************************************************************
6 * Copyright 2013(c) Analog Devices, Inc.
7 *
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
12 * - Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * - Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 * - Neither the name of Analog Devices, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 * - The use of this software may or may not infringe the patent rights
22 * of one or more patent holders. This license does not release you
23 * from the requirement that you obtain separate licenses from these
24 * patent holders to use this software.
25 * - Use of the software either in source or binary form, must be run
26 * on or directly connected to an Analog Devices Inc. component.
27 *
28 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
29 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
30 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31 * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
34 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 *******************************************************************************/
39
40 /******************************************************************************/
41 /***************************** Include Files **********************************/
42 /******************************************************************************/
43 #include "stdint.h"
44 #include "../util.h"
45 #include "platform.h"
46
47 /***************************************************************************//**
48 * @brief usleep
49 *******************************************************************************/
50 static inline void usleep(unsigned long usleep)
51 {
52
53 }
54
55 /***************************************************************************//**
56 * @brief spi_init
57 *******************************************************************************/
58 int32_t spi_init(uint32_t device_id,
59 uint8_t clk_pha,
60 uint8_t clk_pol)
61 {
62 return 0;
63 }
64
65 /***************************************************************************//**
66 * @brief spi_read
67 *******************************************************************************/
68 int32_t spi_read(uint8_t *data,
69 uint8_t bytes_number)
70 {
71 return 0;
72 }
73
74 /***************************************************************************//**
75 * @brief spi_write_then_read
76 *******************************************************************************/
77 int spi_write_then_read(struct spi_device *spi,
78 const unsigned char *txbuf, unsigned n_tx,
79 unsigned char *rxbuf, unsigned n_rx)
80 {
81 return 0;
82 }
83
84 /***************************************************************************//**
85 * @brief gpio_init
86 *******************************************************************************/
87 void gpio_init(uint32_t device_id)
88 {
89
90 }
91
92 /***************************************************************************//**
93 * @brief gpio_direction
94 *******************************************************************************/
95 void gpio_direction(uint8_t pin, uint8_t direction)
96 {
97
98 }
99
100 /***************************************************************************//**
101 * @brief gpio_is_valid
102 *******************************************************************************/
103 bool gpio_is_valid(int number)
104 {
105 return 0;
106 }
107
108 /***************************************************************************//**
109 * @brief gpio_data
110 *******************************************************************************/
111 void gpio_data(uint8_t pin, uint8_t data)
112 {
113
114 }
115
116 /***************************************************************************//**
117 * @brief gpio_set_value
118 *******************************************************************************/
119 void gpio_set_value(unsigned gpio, int value)
120 {
121
122 }
123
124 /***************************************************************************//**
125 * @brief udelay
126 *******************************************************************************/
127 void udelay(unsigned long usecs)
128 {
129
130 }
131
132 /***************************************************************************//**
133 * @brief mdelay
134 *******************************************************************************/
135 void mdelay(unsigned long msecs)
136 {
137
138 }
139
140 /***************************************************************************//**
141 * @brief msleep_interruptible
142 *******************************************************************************/
143 unsigned long msleep_interruptible(unsigned int msecs)
144 {
145
146 return 0;
147 }
148
149 /***************************************************************************//**
150 * @brief axiadc_init
151 *******************************************************************************/
152 void axiadc_init(struct ad9361_rf_phy *phy)
153 {
154
155 }
156
157 /***************************************************************************//**
158 * @brief axiadc_post_setup
159 *******************************************************************************/
160 int axiadc_post_setup(struct ad9361_rf_phy *phy)
161 {
162 return 0;
163 }
164
165 /***************************************************************************//**
166 * @brief axiadc_read
167 *******************************************************************************/
168 unsigned int axiadc_read(struct axiadc_state *st, unsigned long reg)
169 {
170 return 0;
171 }
172
173 /***************************************************************************//**
174 * @brief axiadc_write
175 *******************************************************************************/
176 void axiadc_write(struct axiadc_state *st, unsigned reg, unsigned val)
177 {
178
179 }
180
181 /***************************************************************************//**
182 * @brief axiadc_set_pnsel
183 *******************************************************************************/
184 int axiadc_set_pnsel(struct axiadc_state *st, int channel, enum adc_pn_sel sel)
185 {
186 return 0;
187 }
188
189 /***************************************************************************//**
190 * @brief axiadc_idelay_set
191 *******************************************************************************/
192 void axiadc_idelay_set(struct axiadc_state *st,
193 unsigned lane, unsigned val)
194 {
195
196 }