Kestrel Interface
Loading...
Searching...
No Matches
kest_fpga_io.c File Reference
#include "kest_int.h"
#include <driver/spi_master.h>

Go to the source code of this file.

Macros

#define PRINTLINES_ALLOWED   0
#define PIN_NUM_MISO   14
#define PIN_NUM_MOSI   6
#define PIN_NUM_CLK   5
#define PIN_NUM_CS   4

Functions

int kest_fpga_spi_init ()
int kest_fpga_txrx (uint8_t *tx, uint8_t *rx, size_t len)
int kest_fpga_send_byte (uint8_t byte)
uint8_t kest_fpga_read_byte ()
kest_fpga_transfer_batch kest_new_fpga_transfer_batch ()
void kest_free_fpga_transfer_batch (kest_fpga_transfer_batch batch)
int kest_fpga_batch_append (kest_fpga_transfer_batch *seq, uint8_t x)
int kest_fpga_batch_append_16 (kest_fpga_transfer_batch *seq, uint16_t x)
int kest_fpga_batch_append_24 (kest_fpga_transfer_batch *seq, uint32_t x)
int kest_fpga_batch_append_32 (kest_fpga_transfer_batch *seq, uint32_t x)
int kest_fpga_batch_concat (kest_fpga_transfer_batch *seq, kest_fpga_transfer_batch *seq2)
int kest_fpga_transfer_batch_send (kest_fpga_transfer_batch batch)
void kest_fpga_set_input_gain (float gain_db)
void kest_fpga_set_output_gain (float gain_db)
void kest_fpga_commit_reg_updates ()
char * kest_fpga_command_to_string (int command)

Variables

spi_device_handle_t spi_handle

Macro Definition Documentation

◆ PIN_NUM_CLK

#define PIN_NUM_CLK   5

Definition at line 14 of file kest_fpga_io.c.

Referenced by kest_fpga_spi_init().

◆ PIN_NUM_CS

#define PIN_NUM_CS   4

Definition at line 15 of file kest_fpga_io.c.

Referenced by kest_fpga_spi_init().

◆ PIN_NUM_MISO

#define PIN_NUM_MISO   14

Definition at line 12 of file kest_fpga_io.c.

Referenced by kest_fpga_spi_init().

◆ PIN_NUM_MOSI

#define PIN_NUM_MOSI   6

Definition at line 13 of file kest_fpga_io.c.

Referenced by kest_fpga_spi_init().

◆ PRINTLINES_ALLOWED

#define PRINTLINES_ALLOWED   0

Definition at line 4 of file kest_fpga_io.c.

Function Documentation

◆ kest_fpga_batch_append()

int kest_fpga_batch_append ( kest_fpga_transfer_batch * seq,
uint8_t x )

Definition at line 126 of file kest_fpga_io.c.

Referenced by kest_fpga_batch_append_16(), kest_fpga_batch_append_24(), kest_fpga_batch_append_32(), kest_fpga_batch_append_block_instr(), kest_fpga_batch_append_block_number(), kest_fpga_batch_append_block_register_updates(), kest_fpga_batch_append_block_regs(), kest_fpga_batch_append_resource(), and kest_pipeline_create_fpga_transfer_batch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_fpga_batch_append_16()

int kest_fpga_batch_append_16 ( kest_fpga_transfer_batch * seq,
uint16_t x )

Definition at line 148 of file kest_fpga_io.c.

Referenced by kest_fpga_batch_append_block_number(), kest_fpga_batch_append_block_register_updates(), kest_fpga_batch_append_block_regs(), and kest_fpga_batch_append_resource().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_fpga_batch_append_24()

int kest_fpga_batch_append_24 ( kest_fpga_transfer_batch * seq,
uint32_t x )

Definition at line 164 of file kest_fpga_io.c.

Referenced by kest_fpga_batch_append_resource().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_fpga_batch_append_32()

int kest_fpga_batch_append_32 ( kest_fpga_transfer_batch * seq,
uint32_t x )

Definition at line 181 of file kest_fpga_io.c.

Referenced by kest_fpga_batch_append_block_instr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_fpga_batch_concat()

int kest_fpga_batch_concat ( kest_fpga_transfer_batch * seq,
kest_fpga_transfer_batch * seq2 )

Definition at line 200 of file kest_fpga_io.c.

Here is the call graph for this function:

◆ kest_fpga_command_to_string()

char * kest_fpga_command_to_string ( int command)

Definition at line 271 of file kest_fpga_io.c.

Referenced by kest_fpga_comms_task().

Here is the caller graph for this function:

◆ kest_fpga_commit_reg_updates()

void kest_fpga_commit_reg_updates ( )

Definition at line 266 of file kest_fpga_io.c.

Here is the call graph for this function:

◆ kest_fpga_read_byte()

uint8_t kest_fpga_read_byte ( )

Definition at line 101 of file kest_fpga_io.c.

Referenced by kest_fpga_comms_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_fpga_send_byte()

int kest_fpga_send_byte ( uint8_t byte)

Definition at line 96 of file kest_fpga_io.c.

Referenced by kest_fpga_commit_reg_updates(), kest_fpga_comms_task(), kest_fpga_set_input_gain(), and kest_fpga_set_output_gain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_fpga_set_input_gain()

void kest_fpga_set_input_gain ( float gain_db)

Definition at line 245 of file kest_fpga_io.c.

Referenced by kest_fpga_comms_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_fpga_set_output_gain()

void kest_fpga_set_output_gain ( float gain_db)

Definition at line 255 of file kest_fpga_io.c.

Referenced by kest_fpga_comms_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_fpga_spi_init()

int kest_fpga_spi_init ( )

Definition at line 20 of file kest_fpga_io.c.

Referenced by kest_fpga_comms_task().

Here is the caller graph for this function:

◆ kest_fpga_transfer_batch_send()

int kest_fpga_transfer_batch_send ( kest_fpga_transfer_batch batch)

Definition at line 240 of file kest_fpga_io.c.

Referenced by kest_fpga_comms_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_fpga_txrx()

int kest_fpga_txrx ( uint8_t * tx,
uint8_t * rx,
size_t len )

Definition at line 53 of file kest_fpga_io.c.

Referenced by kest_fpga_read_byte(), kest_fpga_send_byte(), and kest_fpga_transfer_batch_send().

Here is the caller graph for this function:

◆ kest_free_fpga_transfer_batch()

void kest_free_fpga_transfer_batch ( kest_fpga_transfer_batch batch)

Definition at line 121 of file kest_fpga_io.c.

Referenced by kest_fpga_comms_task(), and kest_pipeline_create_fpga_transfer_batch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_new_fpga_transfer_batch()

kest_fpga_transfer_batch kest_new_fpga_transfer_batch ( )

Definition at line 109 of file kest_fpga_io.c.

Referenced by kest_effect_update_fpga_registers(), and kest_pipeline_create_fpga_transfer_batch().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ spi_handle

spi_device_handle_t spi_handle

Definition at line 17 of file kest_fpga_io.c.

Referenced by kest_fpga_spi_init(), and kest_fpga_txrx().