EDT PDV SDK Documentation 6.2.0
libedt_timing.h File Reference

(git 6199da043c, 2024-08-12)

#include <edt_portability.h>
#include <stdint.h>

Data Structures

struct  _ts_raw_t
 

Macros

#define TIMECODE_SRXL2_BASE_REGISTER   0x5c
 
#define TIMECODE_VL_F1_BASE_REGISTER   0xb1
 
#define TIMECODE_VL_F4_BASE_REGISTER   0xb1
 
#define TIMECODE_S5_BASE_REGISTER   0x6d
 
#define TIMECODE_A5_BASE_REGISTER   0x6d
 
#define PDV_IRIG_SPI_BASE   0xb1
 

Typedefs

typedef struct _ts_raw_t ts_raw_t
 

Functions

EdtDev edt_spi_open (const char *edt_interface, int unit, uint32_t spi_reg_base)
 Opens the EDT SPI master. More...
 
int edt_spi_close (EdtDev edt_p)
 Closes the SPI master EDT device handle. More...
 
int edt_spi_set_base_address (EdtDev edt_p, uint32_t spi_reg_base)
 Set the base address of the SPI interface used with EDT (IRIG) timing functions. More...
 
int edt_set_timecode_enable (EdtDev edt_p, uint8_t enable)
 Enable or disable timecode production from the MSP430. More...
 
void edt_set_msp430_clock (EdtDev edt_p, int clock_sel, int clock_hz)
 Select an internal or external clock source for the MSP430 and state the clock rate. More...
 
void edt_set_timecode_raw (EdtDev edt_p, int enable)
 Enable or disable raw timecode format from the MSP430. More...
 
void edt_set_timecode_seconds_offset (EdtDev edt_p, uint32_t seconds)
 Set a seconds offset for timecode production. More...
 
void edt_enable_timecode_programmable_year (EdtDev edt_p, uint16_t year)
 Enable the msp430 IRIG-B firmware programmable year mode and set the year. More...
 
void edt_disable_timecode_programmable_year (EdtDev edt_p)
 Disable the msp430 IRIG-B firmware programmable year mode. More...
 
uint8_t edt_spi_get_stat (EdtDev edt_p)
 Returns the value of the EDT SPI status register. More...
 
void edt_spi_display_time (EdtDev edt_p, int loops)
 Prints the timecode in ascii once per second for N loops. More...
 
int edt_get_timecode_version (EdtDev edt_p)
 Get the msp430 IRIG-B firmware version. More...
 
int edt_spi_invoke_flash_loader (EdtDev edt_p)
 Puts the EDT SPI msp430 into flash-loader mode. More...
 
uint8_t edt_spi_get_byte (EdtDev edt_p)
 Polls the EDT SPI master for a single byte. More...
 
uint8_t edt_spi_put_byte (EdtDev edt_p, uint8_t ch)
 Sends one byte to the EDT SPI master. More...
 
void edt_spi_flush_fifo (EdtDev edt_p)
 Flushes the EDT SPI input and output fifos, discarding all data. More...
 
char * edt_spi_putstr (EdtDev edt_p, char *const str)
 Send a single line of ascii string to the msp430 over SPI. More...
 
void edt_spi_send_packet (EdtDev edt_p, uint8_t *cmdbuf)
 After a packet-start byte is received, call this routine to input the packet and check the CRC. More...
 

Detailed Description

Interface for retrieving IRIG timecode information from EDT boards.

Macro Definition Documentation

◆ TIMECODE_SRXL2_BASE_REGISTER

#define TIMECODE_SRXL2_BASE_REGISTER   0x5c

Timing register offset for SRXL-2

◆ TIMECODE_VL_F1_BASE_REGISTER

#define TIMECODE_VL_F1_BASE_REGISTER   0xb1

Timing register offset for Visionlink F1

◆ TIMECODE_VL_F4_BASE_REGISTER

#define TIMECODE_VL_F4_BASE_REGISTER   0xb1

Timing register offset for Visionlink F4

◆ TIMECODE_S5_BASE_REGISTER

#define TIMECODE_S5_BASE_REGISTER   0x6d

Timing register offset for S5

◆ TIMECODE_A5_BASE_REGISTER

#define TIMECODE_A5_BASE_REGISTER   0x6d

Timing register offset for A5/TacWrap

◆ PDV_IRIG_SPI_BASE

#define PDV_IRIG_SPI_BASE   0xb1

(compatibility) Timing register offset for VL F1/F4

Typedef Documentation

◆ ts_raw_t

typedef struct _ts_raw_t ts_raw_t

Raw timecode format

Function Documentation

◆ edt_spi_set_base_address()

int edt_spi_set_base_address ( EdtDev  edt_p,
uint32_t  spi_reg_base 
)

Set the base address of the SPI interface used with EDT (IRIG) timing functions.

Parameters
edt_pEDT device handle to update.
spi_reg_baseSets unit spi register base address.
Returns
0 if successful