Inter-Integrated Circuit (I2C) - Espressif ESP32-S2 Programming Manual

Table of Contents

Advertisement

Chapter 2. API Reference
ESP_ERR_HW_CRYPTO_DS_INVALID_PADDING
padding check failed, but result is produced anyway and can be read
ESP_DS_IV_LEN
ESP_DS_C_LEN
Type Definitions
typedef struct esp_ds_context esp_ds_context_t
typedef struct
esp_digital_signature_data
Encrypted private key data. Recommended to store in flash in this format.
Note This struct has to match to one from the ROM code! This documentation is mostly taken from there.
Enumerations
enum esp_digital_signature_length_t
Values:
ESP_DS_RSA_1024 = (1024 / 32) - 1
ESP_DS_RSA_2048 = (2048 / 32) - 1
ESP_DS_RSA_3072 = (3072 / 32) - 1
ESP_DS_RSA_4096 = (4096 / 32) - 1

2.2.8 Inter-Integrated Circuit (I2C)

Overview
I2C is a serial, synchronous, half-duplex communication protocol that allows co-existence of multiple masters and
slaves on the same bus. The I2C bus consists of two lines: serial data line (SDA) and serial clock (SCL). Both lines
require pull-up resistors.
With such advantages as simplicity and low manufacturing cost, I2C is mostly used for communication of low-speed
peripheral devices over short distances (within one foot).
ESP32-S2 has two I2C controllers (also referred to as ports) which are responsible for handling communications on
the I2C bus. Each I2C controller can operate as master or slave. As an example, one controller can act as a master
and the other as a slave at the same time.
Driver Features
I2C driver governs communications of devices over the I2C bus. The driver supports the following features:
• Reading and writing bytes in Master mode
• Slave mode
• Reading and writing to registers which are in turn read/written by the master
Driver Usage
The following sections describe typical steps of configuring and operating the I2C driver:
1.
Configuration
- set the initialization parameters (master or slave mode, GPIO pins for SDA and SCL, clock
speed, etc.)
2.
Install
Driver- activate the driver on one of the two I2C controllers as a master or slave
3. Depending on whether you configure the driver for a master or slave, choose the appropriate item
a)
Communication as Master
b)
Communication as Slave
4.
Interrupt Handling
- configure and service I2C interrupts
Espressif Systems
esp_ds_data_t
- handle communications (master)
- respond to messages from the master (slave)
280
Submit Document Feedback
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF