#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <stdio.h>
#include "iio.h"
#include "24xx32a.h"
#include "no_os_eeprom.h"
#include "no_os_error.h"
Go to the source code of this file.
|
int32_t | get_iio_context_attributes (struct iio_ctx_attr **ctx_attr, uint32_t *attrs_cnt, struct no_os_eeprom_desc *eeprom_desc, const char *hw_mezzanine, const char *hw_carrier, bool *hw_mezzanine_is_valid) |
| Read IIO context attributes.
|
|
int32_t | get_iio_context_attributes_ex (struct iio_ctx_attr **ctx_attr, uint32_t *attrs_cnt, struct no_os_eeprom_desc *eeprom_desc, const char *hw_mezzanine, const char *hw_carrier, bool *hw_mezzanine_is_valid, const char *fw_version) |
| Read IIO context attributes extended version (with fw_version attribute)
|
|
int32_t | remove_iio_context_attributes (struct iio_ctx_attr *ctx_attr) |
| Free the resources allocated by get_iio_context_attributes()
|
|
int32_t | eeprom_init (struct no_os_eeprom_desc **eeprom_desc, struct no_os_eeprom_init_param *eeprom_init_params) |
| Initialize the EEPROM.
|
|
int32_t | eeprom_close (struct no_os_eeprom_desc *eeprom_desc) |
| Close the EEPROM.
|
|
uint8_t | get_eeprom_detected_dev_addr (void) |
| Get the EEPROM device address detected by firmware.
|
|
bool | is_eeprom_valid_dev_addr_detected (void) |
| Return the flag indicating if valid EEPROM address is detected.
|
|
int32_t | sdram_init (void) |
| Initialize the SDP-K1 SDRAM.
|
|
◆ EEPROM_DEV_ADDR_END
#define EEPROM_DEV_ADDR_END 0x57 |
◆ EEPROM_DEV_ADDR_START
#define EEPROM_DEV_ADDR_START 0x50 |
◆ MAX_REGISTER_ADDRESS
#define MAX_REGISTER_ADDRESS 0xFFF |
◆ STR
◆ XSTR
◆ eeprom_close()
int32_t eeprom_close |
( |
struct no_os_eeprom_desc * |
eeprom_desc | ) |
|
Close the EEPROM.
- Parameters
-
eeprom_desc[in] | - EEPROM descriptor |
- Returns
- 0 in case of success, negative error code otherwise
◆ eeprom_init()
int32_t eeprom_init |
( |
struct no_os_eeprom_desc ** |
eeprom_desc, |
|
|
struct no_os_eeprom_init_param * |
eeprom_init_params |
|
) |
| |
Initialize the EEPROM.
- Parameters
-
eeprom_desc[in] | - EEPROM descriptor |
extra[in] | - EEPROM extra init param structure pointer (interface type such as i2c) |
- Returns
- 0 in case of success, negative error code otherwise
◆ get_eeprom_detected_dev_addr()
uint8_t get_eeprom_detected_dev_addr |
( |
void |
| ) |
|
Get the EEPROM device address detected by firmware.
- Returns
- EEPROM device address
◆ get_iio_context_attributes()
int32_t get_iio_context_attributes |
( |
struct iio_ctx_attr ** |
ctx_attr, |
|
|
uint32_t * |
attrs_cnt, |
|
|
struct no_os_eeprom_desc * |
eeprom_desc, |
|
|
const char * |
hw_mezzanine, |
|
|
const char * |
hw_carrier, |
|
|
bool * |
hw_mezzanine_is_valid |
|
) |
| |
Read IIO context attributes.
- Parameters
-
ctx_attr[in,out] | - Pointer to IIO context attributes init param |
attrs_cnt[in,out] | - IIO contxt attributes count |
eeprom_desc[in] | - EEPROM descriptor |
hw_mezzanine[in,out] | - HW Mezzanine ID string |
hw_carrier[in,out] | - HW Carrier ID string |
hw_mezzanine_is_valid[in,out] | - HW Mezzanine valid status |
- Returns
- 0 in case of success, negative error code otherwise
◆ get_iio_context_attributes_ex()
int32_t get_iio_context_attributes_ex |
( |
struct iio_ctx_attr ** |
ctx_attr, |
|
|
uint32_t * |
attrs_cnt, |
|
|
struct no_os_eeprom_desc * |
eeprom_desc, |
|
|
const char * |
hw_mezzanine, |
|
|
const char * |
hw_carrier, |
|
|
bool * |
hw_mezzanine_is_valid, |
|
|
const char * |
fw_version |
|
) |
| |
Read IIO context attributes extended version (with fw_version attribute)
- Parameters
-
ctx_attr[in,out] | - Pointer to IIO context attributes init param |
attrs_cnt[in,out] | - IIO context attributes count |
eeprom_desc[in] | - EEPROM descriptor |
hw_mezzanine[in,out] | - HW Mezzanine ID string |
hw_carrier[in,out] | - HW Carrier ID string |
hw_mezzanine_is_valid[in,out] | - HW Mezzanine valid status |
fw_version[in,out] | - Firmware version string |
- Returns
- 0 in case of success, negative error code otherwise
◆ is_eeprom_valid_dev_addr_detected()
bool is_eeprom_valid_dev_addr_detected |
( |
void |
| ) |
|
Return the flag indicating if valid EEPROM address is detected.
- Returns
- EEPROM valid address detect flag (true/false)
◆ remove_iio_context_attributes()
int32_t remove_iio_context_attributes |
( |
struct iio_ctx_attr * |
ctx_attr | ) |
|
Free the resources allocated by get_iio_context_attributes()
- Parameters
-
ctx_attr[in] | - Pointer to IIO context attributes init param |
- Returns
- 0 in case of success, negative error code otherwise
◆ sdram_init()
int32_t sdram_init |
( |
void |
| ) |
|
Initialize the SDP-K1 SDRAM.
- Returns
- 0 in case of success, negative error code otherwise