adc6 2.0.0.0
adc6.h
Go to the documentation of this file.
1/*
2 * MikroSDK - MikroE Software Development Kit
3 * Copyright© 2020 MikroElektronika d.o.o.
4 *
5 * Permission is hereby granted, free of charge, to any person
6 * obtaining a copy of this software and associated documentation
7 * files (the "Software"), to deal in the Software without restriction,
8 * including without limitation the rights to use, copy, modify, merge,
9 * publish, distribute, sublicense, and/or sell copies of the Software,
10 * and to permit persons to whom the Software is furnished to do so,
11 * subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be
14 * included in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22 * OR OTHER DEALINGS IN THE SOFTWARE.
23 */
32// ----------------------------------------------------------------------------
33
34#ifndef ADC6_H
35#define ADC6_H
36
41#ifdef PREINIT_SUPPORTED
42#include "preinit.h"
43#endif
44
45#ifdef MikroCCoreVersion
46 #if MikroCCoreVersion >= 1
47 #include "delays.h"
48 #endif
49#endif
50
51#include "drv_digital_out.h"
52#include "drv_digital_in.h"
53#include "drv_spi_master.h"
54
55// -------------------------------------------------------------- PUBLIC MACROS
67#define ADC6_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
69 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
70 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
71 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
72 cfg.syn = MIKROBUS( mikrobus, MIKROBUS_RST )
79#define ADC6_OK 0
80#define ADC6_ERROR -1
87#define ADC6_COMMUNICATION_AND_STATUS_REG 0x00
88#define ADC6_CONTROL_REG 0x01
89#define ADC6_DATA_REG 0x02
90#define ADC6_IO_CONTROL_1_REG 0x03
91#define ADC6_IO_CONTROL_2_REG 0x04
92#define ADC6_ID_REG 0x05
93#define ADC6_ERROR_STATUS_REG 0x06
94#define ADC6_ERROR_ENABLE_REG 0x07
95#define ADC6_MASTER_CLOCK_COUNTER_REG 0x08
96#define ADC6_CHANNEL_0_REG 0x09
97#define ADC6_CHANNEL_1_REG 0x0A
98#define ADC6_CHANNEL_2_REG 0x0B
99#define ADC6_CHANNEL_3_REG 0x0C
100#define ADC6_CHANNEL_4_REG 0x0D
101#define ADC6_CHANNEL_5_REG 0x0E
102#define ADC6_CHANNEL_6_REG 0x0F
103#define ADC6_CHANNEL_7_REG 0x10
104#define ADC6_CHANNEL_8_REG 0x11
105#define ADC6_CHANNEL_9_REG 0x12
106#define ADC6_CHANNEL_10_REG 0x13
107#define ADC6_CHANNEL_11_REG 0x14
108#define ADC6_CHANNEL_12_REG 0x15
109#define ADC6_CHANNEL_13_REG 0x16
110#define ADC6_CHANNEL_14_REG 0x17
111#define ADC6_CHANNEL_15_REG 0x18
112#define ADC6_CONFIG_0_REG 0x19
113#define ADC6_CONFIG_1_REG 0x1A
114#define ADC6_CONFIG_2_REG 0x1B
115#define ADC6_CONFIG_3_REG 0x1C
116#define ADC6_CONFIG_4_REG 0x1D
117#define ADC6_CONFIG_5_REG 0x1E
118#define ADC6_CONFIG_6_REG 0x1F
119#define ADC6_CONFIG_7_REG 0x20
120#define ADC6_FILTER_0_REG 0x21
121#define ADC6_FILTER_1_REG 0x22
122#define ADC6_FILTER_2_REG 0x23
123#define ADC6_FILTER_3_REG 0x24
124#define ADC6_FILTER_4_REG 0x25
125#define ADC6_FILTER_5_REG 0x26
126#define ADC6_FILTER_6_REG 0x27
127#define ADC6_FILTER_7_REG 0x28
128#define ADC6_OFFSET_0_REG 0x29
129#define ADC6_OFFSET_1_REG 0x2A
130#define ADC6_OFFSET_2_REG 0x2B
131#define ADC6_OFFSET_3_REG 0x2C
132#define ADC6_OFFSET_4_REG 0x2D
133#define ADC6_OFFSET_5_REG 0x2E
134#define ADC6_OFFSET_6_REG 0x2F
135#define ADC6_OFFSET_7_REG 0x30
136#define ADC6_GAIN_0_REG 0x31
137#define ADC6_GAIN_1_REG 0x32
138#define ADC6_GAIN_2_REG 0x33
139#define ADC6_GAIN_3_REG 0x34
140#define ADC6_GAIN_4_REG 0x35
141#define ADC6_GAIN_5_REG 0x36
142#define ADC6_GAIN_6_REG 0x37
143#define ADC6_GAIN_7_REG 0x38
150#define ADC6_COMMUN_WRITE_COMMAND 0x00
151#define ADC6_COMMUN_READ_COMMAND 0x40
152#define ADC6_COMMUN_WRITE_DISABLE 0x80
159#define ADC6_CONTROL_RDY_DELAY_10NS_LOW_POWER_MODE_RDY_PIN_ENABLE 0x0000
160#define ADC6_CONTROL_RDY_DELAY_100NS 0x1000
161#define ADC6_CONTROL_CONTINUOUS_CONVERSION_MODE 0x0800
162#define ADC6_CONTROL_DATA_STATUS_ENABLE 0x0400
163#define ADC6_CONTROL_DOUT_PIN_ENABLE 0x0200
164#define ADC6_CONTROL_INTERNAL_REFERENCE_VOLTAGE_ENABLE 0x0100
165#define ADC6_CONTROL_MID_POWER_MODE 0x0040
166#define ADC6_CONTROL_FULL_POWER_MODE 0x0080
167#define ADC6_CONTROL_SINGLE_CONVERSION_MODE 0x0004
168#define ADC6_CONTROL_STANDBY_MODE 0x0008
169#define ADC6_CONTROL_SINGLE_POWER_DOWN_MODE 0x000C
170#define ADC6_CONTROL_IDLE_MODE 0x0010
171#define ADC6_CONTROL_MODE_MASK 0x003C
172#define ADC6_CONTROL_INTERNAL_ZERO_SCALE_OFFSET_CALIBRATION 0x0014
173#define ADC6_CONTROL_INTERNAL_FULL_SCALE_GAIN_CALIBRATION 0x0018
174#define ADC6_CONTROL_SYSTEM_ZERO_SCALE_OFFSET_CALIBRATION 0x001C
175#define ADC6_CONTROL_SYSTEM_FULL_SCALE_GAIN_CALIBRATION 0x0020
182#define ADC6_IO_CON1_DIGITAL_OUTPUT_PINS_DISABLE_CURRENT_DISABLE 0x00000000
183#define ADC6_IO_CON1_SET_DIGITAL_OUTPUT_PIN_P4 0x00800000
184#define ADC6_IO_CON1_SET_DIGITAL_OUTPUT_PIN_P3 0x00400000
185#define ADC6_IO_CON1_SET_DIGITAL_OUTPUT_PIN_P2 0x00200000
186#define ADC6_IO_CON1_SET_DIGITAL_OUTPUT_PIN_P1 0x00100000
187#define ADC6_IO_CON1_ENABLE_DIGITAL_OUTPUT_PIN_P4 0x00080000
188#define ADC6_IO_CON1_ENABLE_DIGITAL_OUTPUT_PIN_P3 0x00040000
189#define ADC6_IO_CON1_ENABLE_DIGITAL_OUTPUT_PIN_P2 0x00020000
190#define ADC6_IO_CON1_ENABLE_DIGITAL_OUTPUT_PIN_P1 0x00010000
191#define ADC6_IO_CON1_ENABLE_BRIGDE_POWER_DOWN 0x00008000
192#define ADC6_IO_CON1_IOUT1_CURRENT_50_MIKRO_A 0x00000800
193#define ADC6_IO_CON1_IOUT1_CURRENT_100_MIKRO_A 0x00001000
194#define ADC6_IO_CON1_IOUT1_CURRENT_250_MIKRO_A 0x00001800
195#define ADC6_IO_CON1_IOUT1_CURRENT_500_MIKRO_A 0x00002000
196#define ADC6_IO_CON1_IOUT1_CURRENT_750_MIKRO_A 0x00002800
197#define ADC6_IO_CON1_IOUT1_CURRENT_1000_MIKRO_A 0x00003000
198#define ADC6_IO_CON1_IOUT0_CURRENT_50_MIKRO_A 0x00000100
199#define ADC6_IO_CON1_IOUT0_CURRENT_100_MIKRO_A 0x00000200
200#define ADC6_IO_CON1_IOUT0_CURRENT_250_MIKRO_A 0x00000300
201#define ADC6_IO_CON1_IOUT0_CURRENT_500_MIKRO_A 0x00000400
202#define ADC6_IO_CON1_IOUT0_CURRENT_750_MIKRO_A 0x00000500
203#define ADC6_IO_CON1_IOUT0_CURRENT_1000_MIKRO_A 0x00000600
204#define ADC6_IO_CON1_IOUT1_ON_AIN0_PIN 0x00000000
205#define ADC6_IO_CON1_IOUT1_ON_AIN1_PIN 0x00000010
206#define ADC6_IO_CON1_IOUT1_ON_AIN2_PIN 0x00000020
207#define ADC6_IO_CON1_IOUT1_ON_AIN3_PIN 0x00000030
208#define ADC6_IO_CON1_IOUT1_ON_AIN4_PIN 0x00000040
209#define ADC6_IO_CON1_IOUT1_ON_AIN5_PIN 0x00000050
210#define ADC6_IO_CON1_IOUT1_ON_AIN6_PIN 0x00000060
211#define ADC6_IO_CON1_IOUT1_ON_AIN7_PIN 0x00000070
212#define ADC6_IO_CON1_IOUT1_ON_AIN8_PIN 0x00000080
213#define ADC6_IO_CON1_IOUT1_ON_AIN9_PIN 0x00000090
214#define ADC6_IO_CON1_IOUT1_ON_AIN10_PIN 0x000000A0
215#define ADC6_IO_CON1_IOUT1_ON_AIN11_PIN 0x000000B0
216#define ADC6_IO_CON1_IOUT1_ON_AIN12_PIN 0x000000C0
217#define ADC6_IO_CON1_IOUT1_ON_AIN13_PIN 0x000000D0
218#define ADC6_IO_CON1_IOUT1_ON_AIN14_PIN 0x000000E0
219#define ADC6_IO_CON1_IOUT1_ON_AIN15_PIN 0x000000F0
220#define ADC6_IO_CON1_IOUT0_ON_AIN0_PIN 0x00000000
221#define ADC6_IO_CON1_IOUT0_ON_AIN1_PIN 0x00000001
222#define ADC6_IO_CON1_IOUT0_ON_AIN2_PIN 0x00000002
223#define ADC6_IO_CON1_IOUT0_ON_AIN3_PIN 0x00000003
224#define ADC6_IO_CON1_IOUT0_ON_AIN4_PIN 0x00000004
225#define ADC6_IO_CON1_IOUT0_ON_AIN5_PIN 0x00000005
226#define ADC6_IO_CON1_IOUT0_ON_AIN6_PIN 0x00000006
227#define ADC6_IO_CON1_IOUT0_ON_AIN7_PIN 0x00000007
228#define ADC6_IO_CON1_IOUT0_ON_AIN8_PIN 0x00000008
229#define ADC6_IO_CON1_IOUT0_ON_AIN9_PIN 0x00000009
230#define ADC6_IO_CON1_IOUT0_ON_AIN10_PIN 0x0000000A
231#define ADC6_IO_CON1_IOUT0_ON_AIN11_PIN 0x0000000B
232#define ADC6_IO_CON1_IOUT0_ON_AIN12_PIN 0x0000000C
233#define ADC6_IO_CON1_IOUT0_ON_AIN13_PIN 0x0000000D
234#define ADC6_IO_CON1_IOUT0_ON_AIN14_PIN 0x0000000E
235#define ADC6_IO_CON1_IOUT0_ON_AIN15_PIN 0x0000000F
242#define ADC6_IO_CON2_VBIAS_DISABLE 0x0000
243#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN0_CHANNEL 0x0001
244#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN1_CHANNEL 0x0002
245#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN2_CHANNEL 0x0004
246#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN3_CHANNEL 0x0008
247#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN4_CHANNEL 0x0010
248#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN5_CHANNEL 0x0020
249#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN6_CHANNEL 0x0040
250#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN7_CHANNEL 0x0080
251#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN8_CHANNEL 0x0100
252#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN9_CHANNEL 0x0200
253#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN10_CHANNEL 0x0400
254#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN11_CHANNEL 0x0800
255#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN12_CHANNEL 0x1000
256#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN13_CHANNEL 0x2000
257#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN14_CHANNEL 0x4000
258#define ADC6_IO_CON2_VBIAS_ENABLE_ON_AIN15_CHANNEL 0x8000
265#define ADC6_DISABLE_ALL_ERROR_FLAG 0x00000000
266#define ADC6_ENABLE_MASTER_CLOCK_COUNTER 0x00400000
267#define ADC6_ENABLE_LDO_CAPACITOR_TEST_CHECK 0x00200000
268#define ADC6_ENABLE_ANALOG_LDO_CALIBRATION_CHECK 0x00080000
269#define ADC6_ENABLE_DIGITAL_LDO_CALIBRATION_CHECK 0x00100000
270#define ADC6_DISABLE_LDO_CHECK 0x00180000
271#define ADC6_ENABLE_CALIBRATION_FAIL_CHECK 0x00040000
272#define ADC6_ENABLE_CONVERSION_FAIL_CHECK 0x00020000
273#define ADC6_ENABLE_SATURATION_CHECK 0x00010000
274#define ADC6_ENABLE_OVERVOLTAGE_MONITOR_ON_AINP_CHANNELS 0x00008000
275#define ADC6_ENABLE_UNDERVOLTAGE_MONITOR_ON_AINP_CHANNELS 0x00004000
276#define ADC6_ENABLE_OVERVOLTAGE_MONITOR_ON_AINM_CHANNELS 0x00002000
277#define ADC6_ENABLE_UNDERVOLTAGE_MONITOR_ON_AINM_CHANNELS 0x00001000
278#define ADC6_ENABLE_EXT_REFERENCE_DETECT_ERROR 0x00000800
279#define ADC6_ENABLE_DIG_LDO_TEST_MECHANISM_CHECK 0x00000400
280#define ADC6_ENABLE_DIG_LDO_VOLTAGE_MONITORING 0x00000200
281#define ADC6_ENABLE_AN_LDO_TEST_MECHANISM_CHECK 0x00000100
282#define ADC6_ENABLE_AN_LDO_VOLTAGE_MONITORING 0x00000080
283#define ADC6_ENABLE_SPI_IGNORE_ERROR 0x00000040
284#define ADC6_ENABLE_SPI_SCLK_COUNTER_ERROR_CHECK 0x00000020
285#define ADC6_ENABLE_SPI_READ_ERROR_CHECK 0x00000010
286#define ADC6_ENABLE_SPI_WRITE_ERROR_CHECK 0x00000008
287#define ADC6_ENABLE_SPI_CRC_CHECK 0x00000004
288#define ADC6_ENABLE_SPI_CRC_CALCULATION_PERFORMING_ON_MEMORY 0x00000002
295#define ADC6_DISABLE_CHANNEL 0x0000
296#define ADC6_ENABLE_CHANNEL 0x8000
297#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN0 0x0000
298#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN1 0x0020
299#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN2 0x0040
300#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN3 0x0060
301#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN4 0x0080
302#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN5 0x00A0
303#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN6 0x00C0
304#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN7 0x00E0
305#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN8 0x0100
306#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN9 0x0120
307#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN10 0x0140
308#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN11 0x0160
309#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN12 0x0180
310#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN13 0x01A0
311#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN14 0x01C0
312#define ADC6_CHANNEL_POSITIVE_ANALOG_INPUT_AIN15 0x01E0
313#define ADC6_POSITIVE_CHANNEL_TEMPERATURE_SENSOR 0x0200
314#define ADC6_POSITIVE_CHANNEL_AVSS 0x0220
315#define ADC6_POSITIVE_CHANNEL_INTERNAL_REFERENCE 0x0240
316#define ADC6_POSITIVE_CHANNEL_DGND 0x0260
317#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN0 0x0000
318#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN1 0x0001
319#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN2 0x0002
320#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN3 0x0003
321#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN4 0x0004
322#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN5 0x0005
323#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN6 0x0006
324#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN7 0x0007
325#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN8 0x0008
326#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN9 0x0009
327#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN10 0x000A
328#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN11 0x000B
329#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN12 0x000C
330#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN13 0x000D
331#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN14 0x000E
332#define ADC6_CHANNEL_NEGATIVE_ANALOG_INPUT_AIN15 0x000F
333#define ADC6_NEGATIVE_CHANNEL_TEMPERATURE_SENSOR 0x0010
334#define ADC6_NEGATIVE_CHANNEL_AVSS 0x0011
335#define ADC6_NEGATIVE_CHANNEL_INTERNAL_REFERENCE 0x0012
336#define ADC6_NEGATIVE_CHANNEL_DGND 0x0013
343#define ADC6_CONFIG_UNIPOLAR_OP_BUFFER_DISABLE_BURNOUT_CURRENT_OFF 0x0000
344#define ADC6_CONFIG_ENABLE_BIPOLAR_OP 0x0800
345#define ADC6_CONFIG_ENABLE_BURNOUT_CURRENT_ON_500_NANO_A 0x0200
346#define ADC6_CONFIG_ENABLE_BURNOUT_CURRENT_ON_2_MIKRO_A 0x0400
347#define ADC6_CONFIG_ENABLE_BURNOUT_CURRENT_ON_4_MIKRO_A 0x0600
348#define ADC6_CONFIG_ENABLE_BUFFER_ON_REFIN_POSITIVE 0x0100
349#define ADC6_CONFIG_ENABLE_BUFFER_ON_REFIN_NEGATIVE 0x0080
350#define ADC6_CONFIG_ENABLE_BUFFER_ON_AINP 0x0040
351#define ADC6_CONFIG_ENABLE_BUFFER_ON_AINM 0x0020
352#define ADC6_CONFIG_SELECT_REFIN1 0x0000
353#define ADC6_CONFIG_SELECT_REFIN2 0x0008
354#define ADC6_CONFIG_SELECT_INTERNAL_REFERENCE 0x0010
355#define ADC6_CONFIG_SELECT_AVDD_FOR_REFERENCE 0x0018
356#define ADC6_CONFIG_SET_GAIN_1 0x0000
357#define ADC6_CONFIG_SET_GAIN_2 0x0001
358#define ADC6_CONFIG_SET_GAIN_4 0x0002
359#define ADC6_CONFIG_SET_GAIN_8 0x0003
360#define ADC6_CONFIG_SET_GAIN_16 0x0004
361#define ADC6_CONFIG_SET_GAIN_32 0x0005
362#define ADC6_CONFIG_SET_GAIN_64 0x0006
363#define ADC6_CONFIG_SET_GAIN_128 0x0007
366 // End group macro
367// --------------------------------------------------------------- PUBLIC TYPES
376typedef struct
377{
378 digital_out_t cs;
379
380 // Output pins
381
382 digital_out_t syn;
383
384 // Modules
385
386 spi_master_t spi;
387 pin_name_t chip_select;
388
389} adc6_t;
390
394typedef struct
395{
396 // Communication gpio pins
397
398 pin_name_t miso;
399 pin_name_t mosi;
400 pin_name_t sck;
401 pin_name_t cs;
402
403 // Additional gpio pins
404
405 pin_name_t syn;
406
407 // static variable
408
409 uint32_t spi_speed;
410 spi_master_mode_t spi_mode;
411 spi_master_chip_select_polarity_t cs_polarity;
412
413} adc6_cfg_t;
414
415 // End types group
416// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
417
422#ifdef __cplusplus
423extern "C"{
424#endif
425
435
444err_t adc6_init ( adc6_t *ctx, adc6_cfg_t *cfg );
445
454
464
475uint32_t adc6_get_adc_data ( adc6_t* ctx );
476
487uint32_t adc6_read_reg ( adc6_t* ctx, uint8_t register_address );
488
498void adc6_write_reg ( adc6_t* ctx, uint8_t register_address, uint32_t transfer_data );
499
500
501#ifdef __cplusplus
502}
503#endif
504#endif // _ADC6_H_
505
506 // End public_function group
508
509// ------------------------------------------------------------------------- END
void adc6_default_cfg(adc6_t *ctx)
Click Default Configuration function.
void adc6_cfg_setup(adc6_cfg_t *cfg)
Config Object Initialization function.
uint32_t adc6_get_adc_data(adc6_t *ctx)
Get data function.
err_t adc6_init(adc6_t *ctx, adc6_cfg_t *cfg)
Initialization function.
void adc6_write_reg(adc6_t *ctx, uint8_t register_address, uint32_t transfer_data)
Generic write function.
uint32_t adc6_read_reg(adc6_t *ctx, uint8_t register_address)
Generic read function.
void adc6_reset_device(adc6_t *ctx)
Reset device.
Click configuration structure definition.
Definition adc6.h:395
spi_master_chip_select_polarity_t cs_polarity
Definition adc6.h:411
pin_name_t sck
Definition adc6.h:400
spi_master_mode_t spi_mode
Definition adc6.h:410
pin_name_t mosi
Definition adc6.h:399
uint32_t spi_speed
Definition adc6.h:409
pin_name_t miso
Definition adc6.h:398
pin_name_t syn
Definition adc6.h:405
pin_name_t cs
Definition adc6.h:401
Click ctx object definition.
Definition adc6.h:377
digital_out_t cs
Definition adc6.h:378
spi_master_t spi
Definition adc6.h:386
digital_out_t syn
Definition adc6.h:382
pin_name_t chip_select
Definition adc6.h:387