Handling of signature rows.
Functions for handling signature rows. The following is supported:
Data Structures | |
struct | nvm_device_id |
Structure containing the device ID. More... | |
struct | nvm_device_serial |
Structure containing the device serial. More... | |
Macros | |
#define | nvm_get_production_signature_row_offset(regname) offsetof(NVM_PROD_SIGNATURES_t, regname) |
Get offset of calibration bytes in the production signature row. More... | |
Functions | |
static void | nvm_read_device_id (struct nvm_device_id *storage) |
Read the device id. More... | |
static uint8_t | nvm_read_device_rev (void) |
Read the device revision. More... | |
void | nvm_read_device_serial (struct nvm_device_serial *storage) |
Read the device serial. More... | |
static uint8_t | nvm_read_production_signature_row (uint8_t address) |
Read one byte from the production signature row. More... | |
static uint8_t | nvm_read_user_signature_row (uint16_t address) |
Read one byte from the user signature row. More... | |
#define nvm_get_production_signature_row_offset | ( | regname | ) | offsetof(NVM_PROD_SIGNATURES_t, regname) |
Get offset of calibration bytes in the production signature row.
regname | Name of register within the production signature row |
Offset | of register into the production signature row |
Referenced by nvm_read_device_serial(), and sysclk_init().
|
inlinestatic |
Read the device id.
This function returns the device ID stored in the device.
storage | Pointer to the structure where to store the device id |
References nvm_device_id::devid0, nvm_device_id::devid1, and nvm_device_id::devid2.
Referenced by main(), and run_device_id_test().
|
inlinestatic |
Read the device revision.
This function returns the device revision stored in the device.
unsigned | 8 bit value with the current device revision. |
void nvm_read_device_serial | ( | struct nvm_device_serial * | storage | ) |
Read the device serial.
This function returns the device serial stored in the device.
storage | Pointer to the structure where to store the device serial |
References nvm_device_serial::coordx0, nvm_device_serial::coordx1, nvm_device_serial::coordy0, nvm_device_serial::coordy1, nvm_device_serial::lotnum0, nvm_device_serial::lotnum1, nvm_device_serial::lotnum2, nvm_device_serial::lotnum3, nvm_device_serial::lotnum4, nvm_device_serial::lotnum5, nvm_get_production_signature_row_offset, nvm_read_production_signature_row(), and nvm_device_serial::wafnum.
Referenced by main(), and run_device_serial_test().
|
inlinestatic |
Read one byte from the production signature row.
This function reads one byte from the production signature row of the device at the given address.
address | Byte offset into the signature row |
References nvm_read_byte().
Referenced by adc_get_calibration_data(), dac_get_calibration_data(), nvm_read_device_serial(), and sysclk_init().
|
inlinestatic |
Read one byte from the user signature row.
This function reads one byte from the user signature row of the device at the given address.
address | Byte offset into the signature row |
References nvm_read_byte().
Referenced by is_user_sig_equal_to_buffer(), nvm_user_sig_read_buffer(), and nvm_user_sig_write_buffer().