Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
docs: 📝 Doccument embassy I2C example
  • Loading branch information
SergioGasquez committed May 12, 2023
commit 1378cb6d8226ff65df53bf1744b449df282d51a8
12 changes: 12 additions & 0 deletions esp32-hal/examples/embassy_i2c.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//! Embassy I2C
//!
//! Folowing pins are used:
//! SDA GPIO32
//! SCL GPIO33
//!
//! Depending on your target and the board you are using you have to change the
//! pins.
//!
//! This is an example of running the embassy executor with IC2. It uses an
//! LIS3DH to get accelerometer data.

#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
Expand Down
17 changes: 14 additions & 3 deletions esp32-hal/examples/embassy_spi.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
//! embassy hello world
//! Embassy SPI
//!
//! This is an example of running the embassy executor with multiple tasks
//! concurrently.
//! Folowing pins are used:
//! SCLK GPIO19
//! MISO GPIO25
//! MOSI GPIO23
//! CS GPIO22
//!
//! Depending on your target and the board you are using you have to change the
//! pins.
//!
//! Connect MISO and MOSI pins to see the outgoing data is read as incoming
//! data.
//!
//! This is an example of running the embassy executor with SPI.

#![no_std]
#![no_main]
Expand Down
12 changes: 12 additions & 0 deletions esp32c2-hal/examples/embassy_i2c.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//! Embassy I2C
//!
//! Folowing pins are used:
//! SDA GPIO1
//! SCL GPIO2
//!
//! Depending on your target and the board you are using you have to change the
//! pins.
//!
//! This is an example of running the embassy executor with IC2. It uses an
//! LIS3DH to get accelerometer data.

#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
Expand Down
12 changes: 12 additions & 0 deletions esp32c3-hal/examples/embassy_i2c.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//! Embassy I2C
//!
//! Folowing pins are used:
//! SDA GPIO1
//! SCL GPIO2
//!
//! Depending on your target and the board you are using you have to change the
//! pins.
//!
//! This is an example of running the embassy executor with IC2. It uses an
//! LIS3DH to get accelerometer data.

#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
Expand Down
12 changes: 12 additions & 0 deletions esp32c6-hal/examples/embassy_i2c.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//! Embassy I2C
//!
//! Folowing pins are used:
//! SDA GPIO1
//! SCL GPIO2
//!
//! Depending on your target and the board you are using you have to change the
//! pins.
//!
//! This is an example of running the embassy executor with IC2. It uses an
//! LIS3DH to get accelerometer data.

#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
Expand Down
12 changes: 12 additions & 0 deletions esp32s2-hal/examples/embassy_i2c.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//! Embassy I2C
//!
//! Folowing pins are used:
//! SDA GPIO1
//! SCL GPIO2
//!
//! Depending on your target and the board you are using you have to change the
//! pins.
//!
//! This is an example of running the embassy executor with IC2. It uses an
//! LIS3DH to get accelerometer data.

#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
Expand Down
12 changes: 12 additions & 0 deletions esp32s3-hal/examples/embassy_i2c.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//! Embassy I2C
//!
//! Folowing pins are used:
//! SDA GPIO1
//! SCL GPIO2
//!
//! Depending on your target and the board you are using you have to change the
//! pins.
//!
//! This is an example of running the embassy executor with IC2. It uses an
//! LIS3DH to get accelerometer data.

#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
Expand Down