GNU Radio 3.3.0 C++ API
hal_io.h File Reference
#include "memory_map.h"
Include dependency graph for hal_io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define GPIO_TX_BANK   0
#define GPIO_RX_BANK   1

Functions

void hal_io_init (void)
void hal_finish ()
void hal_gpio_set_ddr (int bank, int value, int mask)
 Set the data direction for GPIO pins.
void hal_gpio_set_sel (int bank, int bitno, char code)
 Select the source of the signal for an output pin.
void hal_gpio_set_sels (int bank, char *codes)
 Select the source of the signal for the output pins.
void hal_gpio_write (int bank, int value, int mask)
 write value to gpio pins specified by mask.
int hal_gpio_read (int bank)
 read GPIO bits
void hal_set_leds (int value, int mask)
void hal_set_led_src (int value, int mask)
void hal_toggle_leds (int mask)
static void hal_set_timeout (int delta_ticks)
static int hal_disable_ints (void)
 Disable interrupts and return previous interrupt enable state. [Microblaze specific].
static int hal_enable_ints (void)
 Enable interrupts and return previous interrupt enable state. [Microblaze specific].
static void hal_restore_ints (int prev_state)
 Set interrupt enable state to prev_state. [Microblaze specific].

Define Documentation

#define GPIO_RX_BANK   1
#define GPIO_TX_BANK   0

Function Documentation

static int hal_disable_ints ( void  ) [inline, static]

Disable interrupts and return previous interrupt enable state. [Microblaze specific].

static int hal_enable_ints ( void  ) [inline, static]

Enable interrupts and return previous interrupt enable state. [Microblaze specific].

void hal_finish ( )
int hal_gpio_read ( int  bank)

read GPIO bits

void hal_gpio_set_ddr ( int  bank,
int  value,
int  mask 
)

Set the data direction for GPIO pins.

If the bit is set, it's an output from the FPGA.

Parameters:
valueis a 16-bit bitmask of values
maskis a 16-bit bitmask of which bits to effect.
void hal_gpio_set_sel ( int  bank,
int  bitno,
char  code 
)

Select the source of the signal for an output pin.

Parameters:
codeis is one of 's', 'a', '0', '1' where 's' selects software output, 'a' selects ATR output, '0' selects debug 0, '1' selects debug 1.
void hal_gpio_set_sels ( int  bank,
char *  codes 
)

Select the source of the signal for the output pins.

Parameters:
codesis is a string of 16 characters composed of '.', 's', 'a', '0', or '1' where '.' means "don't change", 's' selects software output, 'a' selects ATR output, '0' selects debug 0, '1' selects debug 1.
void hal_gpio_write ( int  bank,
int  value,
int  mask 
)

write value to gpio pins specified by mask.

void hal_io_init ( void  )
static void hal_restore_ints ( int  prev_state) [inline, static]

Set interrupt enable state to prev_state. [Microblaze specific].

void hal_set_led_src ( int  value,
int  mask 
)
void hal_set_leds ( int  value,
int  mask 
)
static void hal_set_timeout ( int  delta_ticks) [inline, static]

References timer_regs.

void hal_toggle_leds ( int  mask)