AlcapDAQ
1
|
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
Functions | |
void | A3818_EnableBPIAccess (int32_t handle) |
void | A3818_EnableSPIAccess (int32_t handle) |
int | bpi_flash_read (int32_t dev, uint32_t offset, uint32_t *bpi_data) |
int | bpi_flash_write (int32_t dev, uint32_t offset, uint32_t bpi_data) |
int | readFlash (int32_t dev, uint32_t *data, int address, int length) |
unsigned int | verifyFlash (uint32_t handle, uint32_t *buffer, uint32_t bufferLength, uint32_t startWordAddress) |
int | eraseFirmware (uint32_t handle, uint32_t baseAddress, uint32_t fwcopy) |
void | writeFlash (uint32_t handle, uint32_t *buffer, uint32_t bufferLength, uint32_t startWordAddress) |
#define FALSE (0) |
Definition at line 42 of file p30.h.
Referenced by caenV767_read1(), close_buffers(), con_init(), con_kbhit(), data_format_check(), dl403_init(), dl40x_bor(), dt5720_init(), eb_begin_of_run(), eb_mfragment_add(), epics_ca(), epics_ca_connection_handler(), epics_ca_event_handler(), epics_ca_get(), epics_ca_get_demand(), epics_ca_init(), epics_ca_set(), epics_ca_set_all(), frontend_early_init(), frontend_init(), ge_ln2_read(), interrupt_configure(), is_caen_error(), load_fragment(), load_huffman(), logger_root(), main(), manual_trigger(), register_equipment(), replog(), rpc_master_poll_dead(), rpc_master_pre_bor(), rpc_slave_bor(), rpc_slave_poll_live(), scheduler(), sis3600_read1(), source_scan(), tr_pause(), tr_prepause(), tr_prestart(), tr_prestop(), tr_start(), tr_stop(), v1724_init(), and waitUntilReady().
#define mIsStatusReady | ( | A) | ( ( A & P30_STAT_STATUS_READY ) == P30_STAT_STATUS_READY ) |
Definition at line 96 of file p30.h.
Referenced by waitUntilReady().
#define P30_BLOCK_ERASE_CONFIRM 0x00D0 |
Definition at line 53 of file p30.h.
Referenced by eraseBlock().
#define P30_BLOCK_ERASE_SETUP 0x0020 |
Definition at line 52 of file p30.h.
Referenced by eraseBlock().
#define P30_BLOCK_LOCK_SETUP 0x0060 |
Definition at line 50 of file p30.h.
Referenced by eraseBlock().
#define P30_BLOCK_UNLOCK 0x00D0 |
Definition at line 51 of file p30.h.
Referenced by eraseBlock().
#define P30_BUFFERED_PROGRAM 0x00E8 |
Definition at line 48 of file p30.h.
Referenced by writeFlashPage().
#define P30_BUFFERED_PROGRAM_CONFIRM 0x00D0 |
Definition at line 49 of file p30.h.
Referenced by writeFlashPage().
#define P30_CLEAR_STATUS 0x0050 |
Definition at line 56 of file p30.h.
Referenced by eraseBlock().
#define P30_READ_ARRAY 0x00FF |
Definition at line 46 of file p30.h.
Referenced by eraseBlock(), eraseFirmware(), readFlash(), and writeFlashPage().
#define P30_READ_STATUS 0x0070 |
Definition at line 55 of file p30.h.
Referenced by readFlashStatus().
#define TRUE (-1) |
Definition at line 43 of file p30.h.
Referenced by caen_load(), caenV767_poll1(), comp_load(), con_kbhit(), data_format_check(), dl403_init(), epics_ca(), epics_ca_connection_handler(), epics_ca_event_handler(), epics_ca_get(), epics_ca_get_demand(), epics_ca_init(), epics_ca_set(), fadc_load(), frontend_loop(), ge_ln2_read(), handFlush(), hits_load(), interrupt_configure(), interrupt_routine(), is_caen_error(), logger_root(), main(), n2fadc_ndet_load(), n2fadc_tpc_load(), nfadc_load(), odb_get_bool(), odb_get_boolarray(), odb_get_dword(), odb_get_int(), odb_get_word(), register_equipment(), replog(), rpc_master_bor(), rpc_master_poll_dead(), rpc_ready_for_cycle(), rpc_slave_bor(), scan_fragment(), scheduler(), sis3600_poll1(), source_scan(), stck_load(), tdc400_load(), tr_pause(), tr_prepause(), tr_prestop(), tr_resume(), tr_start(), tr_stop(), and waitUntilReady().
void A3818_EnableBPIAccess | ( | int32_t | handle) |
Definition at line 67 of file p30.c.
References A3818_DMISCCS, A3818_DMISCCS_SPI_BPI_FLASH_SEL, CAENVME_ReadRegister(), and CAENVME_WriteRegister().
Referenced by A3818UpgradeFromFile(), and A3818UpgradeFromMem().
void A3818_EnableSPIAccess | ( | int32_t | handle) |
Definition at line 76 of file p30.c.
References A3818_DMISCCS, A3818_DMISCCS_SPI_BPI_FLASH_SEL, CAENVME_ReadRegister(), and CAENVME_WriteRegister().
Referenced by A3818UpgradeFromFile(), and A3818UpgradeFromMem().
int bpi_flash_read | ( | int32_t | dev, |
uint32_t | offset, | ||
uint32_t * | bpi_data | ||
) |
Definition at line 11 of file p30.c.
References A3818_BPI_FLASH_AD, A3818_BPI_FLASH_CMD, A3818_BPI_FLASH_DT, CAENVME_ReadRegister(), and CAENVME_WriteRegister().
Referenced by readFlash(), and readFlashStatus().
int bpi_flash_write | ( | int32_t | dev, |
uint32_t | offset, | ||
uint32_t | bpi_data | ||
) |
Definition at line 38 of file p30.c.
References A3818_BPI_FLASH_AD, A3818_BPI_FLASH_CMD, A3818_BPI_FLASH_DT, and CAENVME_WriteRegister().
Referenced by eraseBlock(), eraseFirmware(), readFlash(), readFlashStatus(), and writeFlashPage().
int eraseFirmware | ( | uint32_t | handle, |
uint32_t | baseAddress, | ||
uint32_t | fwcopy | ||
) |
Definition at line 286 of file p30.c.
References bpi_flash_write(), eraseBlock(), i, P30_READ_ARRAY, and printf().
Referenced by A3818UpgradeFromFile(), and A3818UpgradeFromMem().
int readFlash | ( | int32_t | dev, |
uint32_t * | data, | ||
int | address, | ||
int | length | ||
) |
Definition at line 226 of file p30.c.
References bpi_flash_read(), bpi_flash_write(), i, length, and P30_READ_ARRAY.
Referenced by verifyFlash().
unsigned int verifyFlash | ( | uint32_t | handle, |
uint32_t * | buffer, | ||
uint32_t | bufferLength, | ||
uint32_t | startWordAddress | ||
) |
Definition at line 241 of file p30.c.
References i, printf(), and readFlash().
Referenced by A3818UpgradeFromFile(), and A3818UpgradeFromMem().
void writeFlash | ( | uint32_t | handle, |
uint32_t * | buffer, | ||
uint32_t | bufferLength, | ||
uint32_t | startWordAddress | ||
) |
Definition at line 323 of file p30.c.
References printf(), and writeFlashPage().
Referenced by A3818UpgradeFromFile(), and A3818UpgradeFromMem().