|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include "cdc_hal/libtropic_port_esp32.h"#include "cdc_hal/ISpiBus.h"#include "cdc_hal/hw_config.h"#include "libtropic_port.h"#include "driver/gpio.h"#include "driver/spi_master.h"#include "esp_err.h"#include "esp_random.h"#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include "cdc_log.h"#include <cstdarg>#include <cstdio>Go to the source code of this file.
Functions | |
| lt_ret_t | lt_port_init (lt_l2_state_t *s2) |
| lt_ret_t | lt_port_deinit (lt_l2_state_t *s2) |
| lt_ret_t | lt_port_spi_csn_low (lt_l2_state_t *s2) |
| lt_ret_t | lt_port_spi_csn_high (lt_l2_state_t *s2) |
| lt_ret_t | lt_port_spi_transfer (lt_l2_state_t *s2, uint8_t offset, uint16_t tx_len, uint32_t timeout_ms) |
| lt_ret_t | lt_port_delay (lt_l2_state_t *s2, uint32_t ms) |
| lt_ret_t | lt_port_random_bytes (lt_l2_state_t *s2, void *buff, size_t count) |
| int | lt_port_log (const char *format,...) |
Variables | |
| static const char * | TAG = "TR01-SPI" |
| lt_ret_t lt_port_deinit | ( | lt_l2_state_t * | s2 | ) |
Definition at line 60 of file libtropic_port_esp32.cpp.
| lt_ret_t lt_port_delay | ( | lt_l2_state_t * | s2, |
| uint32_t | ms ) |
Definition at line 118 of file libtropic_port_esp32.cpp.
| lt_ret_t lt_port_init | ( | lt_l2_state_t * | s2 | ) |
Definition at line 22 of file libtropic_port_esp32.cpp.
References cdc::hal::getSharedSpiHost(), cdc::hal::initSharedSpiBus(), LOG_I, and TAG.
| int lt_port_log | ( | const char * | format, |
| ... ) |
Definition at line 144 of file libtropic_port_esp32.cpp.
| lt_ret_t lt_port_random_bytes | ( | lt_l2_state_t * | s2, |
| void * | buff, | ||
| size_t | count ) |
Definition at line 132 of file libtropic_port_esp32.cpp.
| lt_ret_t lt_port_spi_csn_high | ( | lt_l2_state_t * | s2 | ) |
Definition at line 83 of file libtropic_port_esp32.cpp.
| lt_ret_t lt_port_spi_csn_low | ( | lt_l2_state_t * | s2 | ) |
Definition at line 74 of file libtropic_port_esp32.cpp.
| lt_ret_t lt_port_spi_transfer | ( | lt_l2_state_t * | s2, |
| uint8_t | offset, | ||
| uint16_t | tx_len, | ||
| uint32_t | timeout_ms ) |
Definition at line 92 of file libtropic_port_esp32.cpp.
|
static |
ESP-IDF SPI port for libtropic (TROPIC01) Uses shared SPI bus with manual chip-select control
Definition at line 20 of file libtropic_port_esp32.cpp.