no-OS
Loading...
Searching...
No Matches
linux_axi_io.c File Reference

Implementation of AXI IO through UIO/devmem. More...

#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include "no_os_error.h"
#include "no_os_axi_io.h"
Include dependency graph for linux_axi_io.c:

Functions

int32_t no_os_axi_io_read (uint32_t base, uint32_t offset, uint32_t *data)
 AXI IO through UIO/devmem read function.
 
int32_t no_os_axi_io_write (uint32_t base, uint32_t offset, uint32_t data)
 AXI IO through UIO specific write function.
 

Detailed Description

Implementation of AXI IO through UIO/devmem.

Author
Dragos Bogdan (drago.nosp@m.s.bo.nosp@m.gdan@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2020(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Function Documentation

◆ no_os_axi_io_read()

int32_t no_os_axi_io_read ( uint32_t base,
uint32_t offset,
uint32_t * data )

AXI IO through UIO/devmem read function.

AXI IO Altera specific read function.

Parameters
base- UIO index (/dev/uioX)/base address.
offset- Address offset.
data- Location where read data will be stored.
Returns
0 in case of success, -1 otherwise.

◆ no_os_axi_io_write()

int32_t no_os_axi_io_write ( uint32_t base,
uint32_t offset,
uint32_t data )

AXI IO through UIO specific write function.

AXI IO Altera specific write function.

Parameters
base- UIO index (/dev/uioX).
offset- Address offset.
data- Data to be written.
Returns
0 in case of success, -1 otherwise.