|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
Go to the source code of this file.
Functions | |
| static esp_err_t | sao_read_eeprom (uint8_t mem_addr, uint8_t *data, size_t len) |
| Reads bytes from SAO EEPROM at a given memory address. | |
| static bool | sao_parse_descriptor (sao_descriptor_t *desc) |
| Parses the SAO binary descriptor from EEPROM content. | |
| bool | sao_init (void) |
| bool | sao_scan (void) |
| bool | sao_read_descriptor (sao_descriptor_t *desc) |
| bool | sao_is_detected (void) |
| const char * | sao_get_name (void) |
| const char * | sao_get_driver_name (void) |
| void | sao_get_info_string (char *buf, size_t len) |
Variables | |
| static const char * | TAG = "SAO" |
| SAO (Standardized Add-On) binary descriptor parser implementing badge.team SAO format. | |
| static sao_descriptor_t | g_sao_descriptor |
| static bool | g_sao_detected = false |
| static bool | g_sao_initialized = false |
| static cdc::hal::II2cBus * | g_sao_bus = nullptr |
| static cdc::hal::I2cDeviceHandle | g_sao_dev = nullptr |
| const char * sao_get_driver_name | ( | void | ) |
Definition at line 194 of file sao.cpp.
References g_sao_descriptor, and g_sao_detected.
| void sao_get_info_string | ( | char * | buf, |
| size_t | len ) |
Definition at line 199 of file sao.cpp.
References g_sao_descriptor, and g_sao_detected.
Referenced by cdc::mod_sao::getInfoView().
| const char * sao_get_name | ( | void | ) |
Definition at line 189 of file sao.cpp.
References g_sao_descriptor, and g_sao_detected.
| bool sao_init | ( | void | ) |
Definition at line 124 of file sao.cpp.
References g_sao_bus, g_sao_descriptor, g_sao_detected, g_sao_dev, g_sao_initialized, cdc::hal::getI2cBus1(), cdc::core::INITIALIZED, LOG_E, LOG_I, SAO_EEPROM_ADDR, TAG, and cdc::core::UNINITIALIZED.
Referenced by sao_scan(), and cdc::mod_sao::SaoModule::start().
| bool sao_is_detected | ( | void | ) |
Definition at line 185 of file sao.cpp.
References g_sao_detected.
|
static |
Parses the SAO binary descriptor from EEPROM content.
| desc | Output descriptor structure. |
Definition at line 35 of file sao.cpp.
References LOG_D, SAO_MAX_DRIVER_DATA_LEN, SAO_MAX_DRIVER_NAME_LEN, SAO_MAX_EXTRA_DRIVERS, SAO_MAX_NAME_LEN, sao_read_eeprom(), and TAG.
Referenced by sao_scan().
| bool sao_read_descriptor | ( | sao_descriptor_t * | desc | ) |
Definition at line 175 of file sao.cpp.
References g_sao_descriptor, and g_sao_detected.
|
static |
Reads bytes from SAO EEPROM at a given memory address.
| mem_addr | Start address in EEPROM. |
| data | Output buffer receiving the bytes. |
| len | Number of bytes to read. |
Definition at line 25 of file sao.cpp.
References g_sao_bus, and g_sao_dev.
Referenced by sao_parse_descriptor().
| bool sao_scan | ( | void | ) |
Definition at line 155 of file sao.cpp.
References g_sao_descriptor, g_sao_detected, g_sao_initialized, LOG_D, LOG_I, sao_init(), sao_parse_descriptor(), and TAG.
Referenced by cdc::mod_sao::SaoModule::onUnlock().
|
static |
Definition at line 15 of file sao.cpp.
Referenced by sao_init(), and sao_read_eeprom().
|
static |
Definition at line 12 of file sao.cpp.
Referenced by sao_get_driver_name(), sao_get_info_string(), sao_get_name(), sao_init(), sao_read_descriptor(), and sao_scan().
|
static |
Definition at line 13 of file sao.cpp.
Referenced by sao_get_driver_name(), sao_get_info_string(), sao_get_name(), sao_init(), sao_is_detected(), sao_read_descriptor(), and sao_scan().
|
static |
Definition at line 16 of file sao.cpp.
Referenced by sao_init(), and sao_read_eeprom().
|
static |
Definition at line 14 of file sao.cpp.
Referenced by sao_init(), and sao_scan().