AlcapDAQ
1
|
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdint.h>
#include <CAENVMElib.h>
Go to the source code of this file.
Data Structures | |
struct | CROM_MAP |
struct | FlashAccess |
Macros | |
#define | Wait_ms(t) usleep((t)*1000) |
#define | CAENCOM_INVALID_FILE_HANDLE -1 |
#define | MAIN_MEM_PAGE_READ_CMD 0xD2 |
#define | MAIN_MEM_PAGE_PROG_TH_BUF1_CMD 0x82 |
#define | STATUS_READ_CMD 0xD7 |
#define | ROM_FLASH_PAGE 0 |
#define | LICENSE_FLASH_PAGE 2 |
#define | KEY_SIZE 64 |
#define | LICENSE_DATA_SIZE 8 |
#define | MAX_MULTIACCESS_BUFSIZE 2048 |
Typedefs | |
typedef enum AT45_OPCODES | AT45_OPCODES |
typedef struct CROM_MAP | CROM_MAP |
typedef struct FlashAccess | cvFlashAccess |
typedef enum cvupgrade_ErrorCode | cvupgrade_ErrorCode |
Enumerations | |
enum | AT45_OPCODES { AT45_PAGE_SIZE = 264, AT45_IDREG_LENGTH = 128, AT45_MAIN_MEM_PAGE_READ_OPCODE = 0x00D2, AT45_MAIN_MEM_PAGE_PROG_TH_BUF1_OPCODE = 0x0082, AT45_READ_SECURITY_REGISTER_OPCODE = 0x0077, AT45_STATUS_READ_CMD_OPCODE = 0x00D7, AT45_PAGE_SIZE = 264, AT45_IDREG_LENGTH = 128, AT45_MAIN_MEM_PAGE_READ_OPCODE = 0x00D2, AT45_MAIN_MEM_PAGE_PROG_TH_BUF1_OPCODE = 0x0082, AT45_READ_SECURITY_REGISTER_OPCODE = 0x0077, AT45_STATUS_READ_CMD_OPCODE = 0x00D7 } |
enum | cvupgrade_ErrorCode { CvUpgrade_Success = 0, CvUpgrade_GenericError = -1, CvUpgrade_CAENCommError = -2, CvUpgrade_UnsupportedRegSize = -3, CvUpgrade_FileAccessError = -4, CvUpgrade_Success = 0, CvUpgrade_GenericError = -1, CvUpgrade_CAENCommError = -2, CvUpgrade_UnsupportedRegSize = -3, CvUpgrade_FileAccessError = -4 } |
Functions | |
int | ReadFlashPage (cvFlashAccess *Flash, uint8_t *data, int pagenum) |
int | WriteFlashPage (cvFlashAccess *Flash, uint8_t *data, int pagenum) |
int | ReadFlashSecurityReg (cvFlashAccess *Flash, uint8_t *data) |
#define CAENCOM_INVALID_FILE_HANDLE -1 |
Definition at line 26 of file flash.h.
Referenced by cvUpgrade(), GetFWRel(), KeyInfo(), License(), main(), and WriteKey().
#define LICENSE_DATA_SIZE 8 |
Definition at line 35 of file flash.h.
Referenced by License(), and WriteKey().
#define LICENSE_FLASH_PAGE 2 |
Definition at line 33 of file flash.h.
Referenced by EraseLicense(), ReadLicense(), and WriteKey().
#define MAIN_MEM_PAGE_PROG_TH_BUF1_CMD 0x82 |
Definition at line 29 of file flash.h.
Referenced by main(), WriteFlashPage16(), and WriteFlashPage32().
#define MAIN_MEM_PAGE_READ_CMD 0xD2 |
Definition at line 28 of file flash.h.
Referenced by ReadFlashPage16(), and ReadFlashPage32().
#define MAX_MULTIACCESS_BUFSIZE 2048 |
Definition at line 36 of file flash.h.
Referenced by ReadFlashPage16(), ReadFlashPage32(), WriteFlashPage16(), and WriteFlashPage32().
#define ROM_FLASH_PAGE 0 |
Definition at line 32 of file flash.h.
Referenced by ReadConfigurationROM().
#define STATUS_READ_CMD 0xD7 |
Definition at line 30 of file flash.h.
Referenced by GetFlashStatus16(), and GetFlashStatus32().
#define Wait_ms | ( | t) | usleep((t)*1000) |
Definition at line 23 of file flash.h.
Referenced by cvUpgrade(), and WriteKey().
typedef enum AT45_OPCODES AT45_OPCODES |
typedef struct FlashAccess cvFlashAccess |
typedef enum cvupgrade_ErrorCode cvupgrade_ErrorCode |
enum AT45_OPCODES |
Definition at line 39 of file flash.h.
enum cvupgrade_ErrorCode |
int ReadFlashPage | ( | cvFlashAccess * | Flash, |
uint8_t * | data, | ||
int | pagenum | ||
) |
Definition at line 202 of file flash.c.
Referenced by cvUpgrade(), main(), ReadConfigurationROM(), and ReadLicense().
int ReadFlashSecurityReg | ( | cvFlashAccess * | Flash, |
uint8_t * | data | ||
) |
int WriteFlashPage | ( | cvFlashAccess * | Flash, |
uint8_t * | data, | ||
int | pagenum | ||
) |
Definition at line 186 of file flash.c.
Referenced by cvUpgrade(), EraseLicense(), main(), and WriteKey().