📄 blvardef.h
字号:
/**************************************************
*
* blvardef.c
*
* CVS ID: $Id: blvardef.h,v 1.10 2007/07/04 14:23:13 marcucci Exp $
* Author: Maurizio Marcucci [MM] - STM
* Date: $Date: 2007/07/04 14:23:13 $
* Revision: $Revision: 1.10 $
*
* Description:
*
*
***************************************************
*
* COPYRIGHT (C) ST Microelectronics 2005
* All Rights Reserved
*
***************************************************
*
* STM CVS Log:
*
* $Log: blvardef.h,v $ * Revision 1.10 2007/07/04 14:23:13 marcucci * Continuous Data Transfer Added *
* Revision 1.9 2007/07/02 08:41:57 marcucci
* I2C Bootloader
*
* Revision 1.8 2007/02/15 13:10:43 marcucci
* Bootloader Optimization
*
* Revision 1.7 2006/09/18 09:55:20 belardi
* Corrected CVS keyword usage
*
* Revision 1.6 2006/09/18 09:22:15 belardi
* Added Log CVS keyword into file header
*
*
***************************************************/
#ifndef __BLVARDEF_H
#define __BLVARDEF_H
#define BL_DEFAULT_MAX_I2C_RX_FRAME_SIZE 256
#define BL_DEFAULT_MAX_I2C_TX_FRAME_SIZE 16
#define SIZE 2
typedef struct
{
UInt tx_msg_done :1;
UInt af :1;
UInt msg_rcvd :1;
UInt i2c_rx_ready :1;
UInt i2c_tx_ready :1;
UInt i2c_new_cmd :1;
UInt :21;
}BL_I2C_FLAGS_STRUCT;
typedef struct
{
UInt patch_code_activated :1;
UInt sf_type :1;
UInt continous_xfer :1;
UInt :29;
} BL_DWN_CTRL_FLAGS;
typedef struct
{
uint8 b0;
uint8 b1;
uint8 b2;
uint8 b3;
} BL_DWORD_STRUCT;
typedef union
{
BL_DWORD_STRUCT field;
uint32 all;
} BL_DWORD_UNION;
typedef union
{
uint8 byte[4];
uint32 all;
} BL_DWORD_VECT_UNION;
typedef struct
{
uint32 bspi_rx_bytes;
uint8 bspi_rx_buffer[300];
volatile uint32 bspi_rx_buffer_idx;
uint32 sf_id;
uint32 sf_sr;
uint8 bspi_tx_buffer[256];
uint32 sf_test_err;
uint32 bspi_ovfl_cntr;
uint32 bspi_berr_cntr;
}BL_BSPI_STRUCT;
typedef struct
{
UInt bad_starting_address: 1;
UInt ram_verify:1;
UInt inv_op_code:1;
UInt inv_checksum:1;
UInt inv_param:1;
UInt bad_len:1;
UInt : 26;
}BL_ERROR_STRUCT;
typedef union
{
BL_ERROR_STRUCT field;
uint32 all;
}BL_ERROR_UNION;
typedef struct
{
volatile uint32 RS232_Status;
uint8 RS232_TxBuffer[0x100];
uint8 RS232_RxBuffer[0x100];
uint32 error_reason;
volatile uint32 deb_ram_addr;
volatile uint32 conf_pin_status;
volatile uint32 patch_area_size;
volatile uint32 sf_data_4_sdram_size;
volatile uint32 sf_overlay_area_start_addr;
volatile uint32 sf_dwn_info;
volatile uint32 RS232_TxIndex;
volatile uint32 RS232_RxIndex;
BL_BSPI_STRUCT bspi;
//uint32 bspi_rx_bytes;
//uint8 bspi_rx_buffer[300];
//volatile uint32 bspi_rx_buffer_idx;
//uint32 sf_id;
//uint32 sf_sr;
//uint8 bspi_tx_buffer[256];
//uint32 sf_test_err;
//uint32 bspi_ovfl_cntr;
//uint32 bspi_berr_cntr;
uint32 FlashDownLoadStatus;
BL_ERROR_UNION error;
uint32 error_code;
BL_DWORD_UNION ram_addr;
BL_DWORD_UNION code_word;
//uint32 dwn_mode;
uint32 code_checksum;
uint32 sdram_code_checksum;
uint32 max_addr;
uint32 max_sdram_addr;
uint32 code_size;
uint32 sdram_code_size;
//uint32 *dwn_info_ptr;
uint32 idx;
uint32 start_address;
BL_DWORD_UNION sf_code_checksum;
BL_DWORD_UNION sf_code_size;
BL_DWORD_UNION sf_max_addr;
BL_DWORD_UNION sf_sdram_code_size;
BL_DWORD_UNION sf_sdram_max_addr;
BL_DWORD_UNION sf_sdram_code_checksum;
volatile BL_DWN_CTRL_FLAGS dwn_ctrl_flags;
BL_I2C_FLAGS_STRUCT i2c_flags;
uint8 i2c_irq_rx_buffer[BL_DEFAULT_MAX_I2C_RX_FRAME_SIZE];
uint8 i2c_irq_tx_buffer[BL_DEFAULT_MAX_I2C_TX_FRAME_SIZE];
uint16 i2c_irq_rx_buffer_idx;
uint16 i2c_irq_tx_buffer_idx;
BL_DWORD_VECT_UNION code_data;
uint32 code_data_byte_idx;
uint32 * ram_ptr;
uint32 * code_checksum_ptr;
uint32 * code_size_ptr;
uint32 * max_addr_ptr;
uint32 debug;
uint8 dummy;
} BL_STRUCT;
#endif /* __BLVARDEF_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -