no-OS
|
Implementation of ADC Demo Driver. More...
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "adc_demo.h"
#include "no_os_error.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
Functions | |
int32_t | adc_demo_init (struct adc_demo_desc **desc, struct adc_demo_init_param *param) |
init function for the adc demo driver More... | |
int32_t | adc_demo_remove (struct adc_demo_desc *desc) |
free allocated resources More... | |
int32_t | update_adc_channels (void *dev, uint32_t mask) |
active adc channels More... | |
int32_t | close_adc_channels (void *dev) |
close all channels More... | |
int32_t | adc_demo_reg_read (struct adc_demo_desc *desc, uint8_t reg_index, uint8_t *readval) |
read function for the adc demo driver More... | |
int32_t | adc_demo_reg_write (struct adc_demo_desc *desc, uint8_t reg_index, uint8_t writeval) |
write function for the adc demo driver More... | |
Variables | |
const uint16_t | sine_lut [128] |
Implementation of ADC Demo Driver.
Copyright 2021(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
int32_t adc_demo_init | ( | struct adc_demo_desc ** | desc, |
struct adc_demo_init_param * | param | ||
) |
init function for the adc demo driver
desc | - descriptor for the adc |
param | - initialization param for adc |
int32_t adc_demo_reg_read | ( | struct adc_demo_desc * | desc, |
uint8_t | reg_index, | ||
uint8_t * | readval | ||
) |
read function for the adc demo driver
desc | - descriptor for the adc |
reg_index | - the address at which we want to read |
readval- | the value read from register |
int32_t adc_demo_reg_write | ( | struct adc_demo_desc * | desc, |
uint8_t | reg_index, | ||
uint8_t | writeval | ||
) |
write function for the adc demo driver
desc | - descriptor for the adc |
reg_index | - the address at which we want to write |
writeval | - the value to be written |
int32_t adc_demo_remove | ( | struct adc_demo_desc * | desc | ) |
free allocated resources
desc | - descriptor for the adc |
int32_t close_adc_channels | ( | void * | dev | ) |
close all channels
dev | - physical instance of an adc device |
int32_t update_adc_channels | ( | void * | dev, |
uint32_t | mask | ||
) |
active adc channels
dev | - descriptor for the adc |
mask | - active channels mask |
const uint16_t sine_lut[128] |