NEORV32 - Software Framework Documentation
Loading...
Searching...
No Matches
Functions
neorv32_slink.c File Reference

Stream Link Interface HW driver source file. More...

#include "neorv32.h"
#include "neorv32_slink.h"

Functions

int neorv32_slink_available (void)
 
void neorv32_slink_setup (uint32_t rx_irq, uint32_t tx_irq)
 
void neorv32_slink_rx_clear (void)
 
void neorv32_slink_tx_clear (void)
 
int neorv32_slink_get_rx_fifo_depth (void)
 
int neorv32_slink_get_tx_fifo_depth (void)
 
uint32_t neorv32_slink_get (void)
 
uint32_t neorv32_slink_check_last (void)
 
void neorv32_slink_put (uint32_t tx_data)
 
void neorv32_slink_put_last (uint32_t tx_data)
 
int neorv32_slink_rx_status (void)
 
int neorv32_slink_tx_status (void)
 

Detailed Description

Stream Link Interface HW driver source file.

Function Documentation

◆ neorv32_slink_available()

int neorv32_slink_available ( void )

Check if stream link interface was synthesized.

Returns
0 if SLINK was not synthesized, 1 if SLINK is available.

◆ neorv32_slink_check_last()

uint32_t neorv32_slink_check_last ( void )
inline

Check if last RX word has "end-of-stream" delimiter.

Note
This needs has to be called AFTER reading the actual data word using neorv32_slink_get(void).
Returns
0 if not end of stream, !=0 if end of stream.

◆ neorv32_slink_get()

uint32_t neorv32_slink_get ( void )
inline

Read data from RX link (non-blocking)

Returns
Data received from link.

◆ neorv32_slink_get_rx_fifo_depth()

int neorv32_slink_get_rx_fifo_depth ( void )

Get FIFO depth of RX link.

Returns
FIFO depth of RX link (1..32768).

◆ neorv32_slink_get_tx_fifo_depth()

int neorv32_slink_get_tx_fifo_depth ( void )

Get FIFO depth of TX link.

Returns
FIFO depth of TX link (1..32768).

◆ neorv32_slink_put()

void neorv32_slink_put ( uint32_t tx_data)
inline

Write data to TX link (non-blocking)

Parameters
[in]tx_dataData to send to link.

◆ neorv32_slink_put_last()

void neorv32_slink_put_last ( uint32_t tx_data)
inline

Write data to TX link (non-blocking) and set "last" (end-of-stream) delimiter.

Parameters
[in]tx_dataData to send to link.

◆ neorv32_slink_rx_clear()

void neorv32_slink_rx_clear ( void )

Clear RX FIFO.

◆ neorv32_slink_rx_status()

int neorv32_slink_rx_status ( void )

Get RX link FIFO status.

Returns
FIFO status NEORV32_SLINK_STATUS_enum.

◆ neorv32_slink_setup()

void neorv32_slink_setup ( uint32_t rx_irq,
uint32_t tx_irq )

Reset, enable and configure SLINK.

Parameters
[in]rx_irqConfigure RX interrupt conditions (NEORV32_SLINK_CTRL_enum).
[in]tx_irqConfigure TX interrupt conditions (NEORV32_SLINK_CTRL_enum).

◆ neorv32_slink_tx_clear()

void neorv32_slink_tx_clear ( void )

Clear TX FIFO.

◆ neorv32_slink_tx_status()

int neorv32_slink_tx_status ( void )

Get TX link FIFO status.

Returns
FIFO status NEORV32_SLINK_STATUS_enum.