| CAEN FERS Library v1.1.4 SDK for FERS systems

Functions
Pedestal
API
Collaboration diagram for Pedestal:

## Functions
int | FERS_WritePedestals (int handle, uint16_t *PedLG, uint16_t *PedHG, uint16_t *dco)
| Write Pedestal calibration. More...
int | FERS_ReadPedestalsFromFlash (int handle, char *date, uint16_t *PedLG, uint16_t *PedHG, uint16_t *dco)
| Read pedestal calibration and DC offset More...
int | FERS_PedestalBackupPage (int handle, int EnBckPage)
| Switch to pedestal backup page. More...
int | FERS_SetCommonPedestal (int handle, uint16_t Pedestal)
| Set a common pedestal (applied to all channels after pedestal calibration) More...
int | FERS_EnablePedestalCalibration (int handle, int enable)
| Enable / Disabled pedestal calibration. More...

## Detailed Description

## Function Documentation

## ◆ FERS_WritePedestals()

int FERS_WritePedestals | ( | int | handle,
|  | uint16_t * | PedLG,
|  | uint16_t * | PedHG,
|  | uint16_t * | dco
| ) |  |

Write Pedestal calibration.

Warning
  The flash memory contains vital parameters for the board. Overwriting certain pages can damage the hardware!!! Do not use this function without contacting CAEN first

Parameters

  [in] | handle | device handle
  [in] | PedLG | Low Gain pedestal array[64]
  [in] | PedHG | High Gain pedestal array[64]
  [in] | dco | DCoffset (use NULL to keep old values)

Returns
  0 in case of success, or a negative error code specified in FERSLIB_ErrorCodes

## ◆ FERS_ReadPedestalsFromFlash()

int FERS_ReadPedestalsFromFlash | ( | int | handle,
|  | char * | date,
|  | uint16_t * | PedLG,
|  | uint16_t * | PedHG,
|  | uint16_t * | dco
| ) |  |

Read pedestal calibration and DC offset

Warning
  The flash memory contains vital parameters for the board. Overwriting certain pages can damage the hardware!!! Do not use this function without contacting CAEN first

Parameters

  [in] | handle | device handle
  [out] | date | date of calibration saved (DD/MM/YYYY)
  [out] | PedLG | Log Gain pedestal array[64]
  [out] | PedHG | High Gain pedestal array[64]
  [out] | dco | DCoffset (DAC). 4 values. Use NULL pointer if not requested

Returns
  0 in case of success, or a negative error code specified in FERSLIB_ErrorCodes

## ◆ FERS_PedestalBackupPage()

int FERS_PedestalBackupPage | ( | int | handle,
|  | int | EnBckPage
| ) |  |

Switch to pedestal backup page.

Parameters

  [in] | handle | device handle
  [in] | EnBckPage | EnBckPage: 0=normal page, 1=packup page

Returns
  0 in case of success, or a negative error code specified in FERSLIB_ErrorCodes

## ◆ FERS_SetCommonPedestal()

int FERS_SetCommonPedestal | ( | int | handle,
|  | uint16_t | Pedestal
| ) |  |

Set a common pedestal (applied to all channels after pedestal calibration)

Warning
  This function enables pedestal calibration

Parameters

  [in] | handle | device handle
  [in] | Pedestal | common pedestal

Returns
  0

## ◆ FERS_EnablePedestalCalibration()

int FERS_EnablePedestalCalibration | ( | int | handle,
|  | int | enable
| ) |  |

Enable / Disabled pedestal calibration.

Parameters

  [in] | handle | Device handle
  [in] | enable | disabled, enabled

Returns
  0