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

Go to the source code of this file.

Classes

struct  _altera_max10_attr
 

Macros

#define CPLD_UPDATE_SIZE   0x80
 
#define ON_CHIP_FLASH_IP_CSR_STATUS_REG   0x00200020
 
#define ON_CHIP_FLASH_IP_DATA_REG   0x00000000
 
#define DUAL_BOOT_IP_BASE   0x00200000
 
#define M04_CFM1_START_ADDR   0x00027000
 
#define M04_CFM1_END_ADDR   0x00049FFF
 
#define BUSY_IDLE   0x00
 
#define BUSY_ERASE   0x01
 
#define BUSY_WRITE   0x02
 
#define BUSY_READ   0x03
 
#define READ_SUCCESS   0x04
 
#define WRITE_SUCCESS   0x08
 
#define ERASE_SUCCESS   0x10
 
#define STATUS_BIT_MASK   0x1F
 

Typedefs

typedef struct _altera_max10_attr altera_max10_attr
 

Functions

int change_word_to_byte (uint8_t *output, int intput)
 
int get_register_via_i2c (int reg, int *val)
 
int set_register_via_i2c (int reg, int val)
 
int max10_reg_read (int address)
 
int max10_reg_write (int address, int data)
 
int max10_status_read (void)
 
int max10_write_flash_data (int address, int data)
 
int cpld_altera_max10_fw_update (uint32_t offset, uint16_t msg_len, uint8_t *msg)
 
int pal_load_altera_max10_attr ()
 

Macro Definition Documentation

◆ BUSY_ERASE

#define BUSY_ERASE   0x01

◆ BUSY_IDLE

#define BUSY_IDLE   0x00

◆ BUSY_READ

#define BUSY_READ   0x03

◆ BUSY_WRITE

#define BUSY_WRITE   0x02

◆ CPLD_UPDATE_SIZE

#define CPLD_UPDATE_SIZE   0x80

◆ DUAL_BOOT_IP_BASE

#define DUAL_BOOT_IP_BASE   0x00200000

◆ ERASE_SUCCESS

#define ERASE_SUCCESS   0x10

◆ M04_CFM1_END_ADDR

#define M04_CFM1_END_ADDR   0x00049FFF

◆ M04_CFM1_START_ADDR

#define M04_CFM1_START_ADDR   0x00027000

◆ ON_CHIP_FLASH_IP_CSR_STATUS_REG

#define ON_CHIP_FLASH_IP_CSR_STATUS_REG   0x00200020

◆ ON_CHIP_FLASH_IP_DATA_REG

#define ON_CHIP_FLASH_IP_DATA_REG   0x00000000

◆ READ_SUCCESS

#define READ_SUCCESS   0x04

◆ STATUS_BIT_MASK

#define STATUS_BIT_MASK   0x1F

◆ WRITE_SUCCESS

#define WRITE_SUCCESS   0x08

Typedef Documentation

◆ altera_max10_attr

Function Documentation

◆ change_word_to_byte()

int change_word_to_byte ( uint8_t *  output,
int  intput 
)

◆ cpld_altera_max10_fw_update()

int cpld_altera_max10_fw_update ( uint32_t  offset,
uint16_t  msg_len,
uint8_t *  msg 
)
Here is the call graph for this function:

◆ get_register_via_i2c()

int get_register_via_i2c ( int  reg,
int *  val 
)
Here is the call graph for this function:

◆ max10_reg_read()

int max10_reg_read ( int  address)
Here is the call graph for this function:

◆ max10_reg_write()

int max10_reg_write ( int  address,
int  data 
)
Here is the call graph for this function:

◆ max10_status_read()

int max10_status_read ( void  )
Here is the call graph for this function:

◆ max10_write_flash_data()

int max10_write_flash_data ( int  address,
int  data 
)
Here is the call graph for this function:

◆ pal_load_altera_max10_attr()

int pal_load_altera_max10_attr ( )

◆ set_register_via_i2c()

int set_register_via_i2c ( int  reg,
int  val 
)
Here is the call graph for this function: