Copyright (c) 2019 Microchip Technology Inc.
and its subsidiaries.
#include "bsp/include/nm_bsp.h"
#include "driver/source/nmbus.h"
Data Structures | |
struct | EFUSEProdStruct |
Macros | |
#define | EFUSE_ERR_CANT_LOAD_DATA -2 |
#define | EFUSE_ERR_INVALID_BANK_OR_DATA -1 |
#define | EFUSE_SUCCESS 0 |
#define | NUM_EFUSE_BANKS (6) |
#define | WIFI_EFUSE_0_CONTROL (0x1014) |
#define | WIFI_EFUSE_2_CONTROL (0x1320) |
Functions | |
void | dump_efuse_struct (EFUSEProdStruct *efuse_struct) |
sint8 | is_efuse_bank_loaded (uint8 bankIdx) |
int | load_efuse_to_regs (uint8 bankIdx) |
sint8 | overwrite_efuse_struct (EFUSEProdStruct *efuse_struct, int bankIdx) |
sint8 | read_efuse_struct (EFUSEProdStruct *efuse_struct, uint8 skip_bank_check) |
Variables | |
EFUSEProdStruct | g_efuse_struct |
#define EFUSE_ERR_CANT_LOAD_DATA -2 |
Referenced by load_efuse_to_regs(), and read_efuse_struct().
#define EFUSE_ERR_INVALID_BANK_OR_DATA -1 |
Referenced by read_efuse_struct().
#define EFUSE_SUCCESS 0 |
Referenced by load_efuse_to_regs(), read_efuse_struct(), and read_from_efuse().
#define NUM_EFUSE_BANKS (6) |
Referenced by read_efuse_struct().
#define WIFI_EFUSE_0_CONTROL (0x1014) |
Referenced by is_efuse_bank_loaded(), and load_efuse_to_regs().
#define WIFI_EFUSE_2_CONTROL (0x1320) |
Referenced by is_efuse_bank_loaded(), and load_efuse_to_regs().
void dump_efuse_struct | ( | EFUSEProdStruct * | efuse_struct | ) |
References EFUSEProdStruct::bank_idx, EFUSEProdStruct::bank_invalid, EFUSEProdStruct::bank_used, EFUSEProdStruct::FreqOffset, EFUSEProdStruct::FreqOffset_used, M2M_INFO, EFUSEProdStruct::MAC_addr, EFUSEProdStruct::MAC_addr_used, EFUSEProdStruct::PATxGainCorr, EFUSEProdStruct::PATxGainCorr_used, and EFUSEProdStruct::ver.
Referenced by read_efuse_struct().
References nm_read_reg(), WIFI_EFUSE_0_CONTROL, and WIFI_EFUSE_2_CONTROL.
int load_efuse_to_regs | ( | uint8 | bankIdx | ) |
References EFUSE_ERR_CANT_LOAD_DATA, EFUSE_SUCCESS, nm_bsp_sleep(), nm_read_reg(), nm_write_reg(), WIFI_EFUSE_0_CONTROL, and WIFI_EFUSE_2_CONTROL.
Referenced by overwrite_efuse_struct(), and read_efuse_struct().
sint8 overwrite_efuse_struct | ( | EFUSEProdStruct * | efuse_struct, |
int | bankIdx | ||
) |
References EFUSEProdStruct::bank_invalid, EFUSEProdStruct::bank_used, EFUSEProdStruct::FreqOffset, EFUSEProdStruct::FreqOffset_used, load_efuse_to_regs(), m2mmemset, EFUSEProdStruct::MAC_addr, EFUSEProdStruct::MAC_addr_used, EFUSEProdStruct::PATxGainCorr, EFUSEProdStruct::PATxGainCorr_used, ret, EFUSEProdStruct::ver, and write_to_efuse().
sint8 read_efuse_struct | ( | EFUSEProdStruct * | efuse_struct, |
uint8 | skip_bank_check | ||
) |
References EFUSEProdStruct::bank_idx, EFUSEProdStruct::bank_invalid, EFUSEProdStruct::bank_used, dump_efuse_struct(), EFUSE_ERR_CANT_LOAD_DATA, EFUSE_ERR_INVALID_BANK_OR_DATA, EFUSE_SUCCESS, EFUSEProdStruct::FreqOffset, EFUSEProdStruct::FreqOffset_used, load_efuse_to_regs(), M2M_DBG, M2M_ERR, M2M_INFO, m2mmemset, EFUSEProdStruct::MAC_addr, EFUSEProdStruct::MAC_addr_used, NUM_EFUSE_BANKS, EFUSEProdStruct::PATxGainCorr, EFUSEProdStruct::PATxGainCorr_used, read_from_efuse(), and EFUSEProdStruct::ver.
EFUSEProdStruct g_efuse_struct |