OpenBIC
OpenSource Bridge-IC
lattice.h File Reference
#include "stdint.h"
Include dependency graph for lattice.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lattice_img_config
 
struct  lattice_update_config
 
struct  lattice_dev_config
 

Typedefs

typedef enum lattice_dev_type lattice_dev_type_t
 
typedef struct lattice_update_config lattice_update_config_t
 
typedef bool(* cpld_i2C_update_func) (lattice_update_config_t *config)
 
typedef bool(* cpld_jtag_update_func) (lattice_update_config_t *config)
 

Enumerations

enum  lattice_dev_type {
  LATTICE_LCMX02_2000HC , LATTICE_LCMX02_4000HC , LATTICE_LCMX02_7000HC , LATTICE_LCMX03_2100C ,
  LATTICE_LCMX03_4300C , LATTICE_LCMX03_9400C , LATTICE_LFMNX_50 , LATTICE_UNKNOWN
}
 
enum  sector_type {
  CFG0 = 0 , CFG1 , UFM0 , UFM1 ,
  UFM2
}
 
enum  { CPLD_TAR_I2C = 0x01 , CPLD_TAR_JTAG = 0x02 }
 

Functions

bool lattice_fwupdate (lattice_update_config_t *config)
 
bool cpld_i2c_get_id (uint8_t bus, uint8_t addr, uint32_t *dev_id)
 
bool cpld_i2c_get_usercode (uint8_t bus, uint8_t addr, uint32_t *usercode)
 
lattice_dev_type_t find_type_by_str (char *str)
 

Typedef Documentation

◆ cpld_i2C_update_func

typedef bool(* cpld_i2C_update_func) (lattice_update_config_t *config)

◆ cpld_jtag_update_func

typedef bool(* cpld_jtag_update_func) (lattice_update_config_t *config)

◆ lattice_dev_type_t

◆ lattice_update_config_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CPLD_TAR_I2C 
CPLD_TAR_JTAG 

◆ lattice_dev_type

Enumerator
LATTICE_LCMX02_2000HC 
LATTICE_LCMX02_4000HC 
LATTICE_LCMX02_7000HC 
LATTICE_LCMX03_2100C 
LATTICE_LCMX03_4300C 
LATTICE_LCMX03_9400C 
LATTICE_LFMNX_50 
LATTICE_UNKNOWN 

◆ sector_type

Enumerator
CFG0 
CFG1 
UFM0 
UFM1 
UFM2 

Function Documentation

◆ cpld_i2c_get_id()

bool cpld_i2c_get_id ( uint8_t  bus,
uint8_t  addr,
uint32_t *  dev_id 
)
Here is the call graph for this function:

◆ cpld_i2c_get_usercode()

bool cpld_i2c_get_usercode ( uint8_t  bus,
uint8_t  addr,
uint32_t *  usercode 
)
Here is the call graph for this function:

◆ find_type_by_str()

lattice_dev_type_t find_type_by_str ( char *  str)

◆ lattice_fwupdate()

bool lattice_fwupdate ( lattice_update_config_t config)