-
Notifications
You must be signed in to change notification settings - Fork 78
ESP32 examples: adaptation to post-1.0.0-rc0 API changes #469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
"trouble-host/defmt", | ||
"bt-hci/defmt", | ||
#"embedded-io/defmt-03", | ||
#"embedded-hal/defmt-03" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were meant to be fully removed in a previous PR. Using this opportunity to clean up.
pub mod ble_bas_central_sec; | ||
pub mod ble_bas_peripheral; | ||
#[cfg(feature = "security")] | ||
pub mod ble_bas_peripheral_sec; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also these are #unrelated
. Noticed that the _sec
modules were not conditional, but they really should be. Consider this also a cleanup?
esp-radio = { version = "0.15.0", features = [ "unstable", "ble" ] } | ||
esp-preempt = { version = "0.0.1", features = ["log-04"] } | ||
esp-radio = { version = "0.15.0", features = ["ble", "log-04", "unstable"] } | ||
esp-rtos = { version = "0.0.1", features = ["embassy", "log-04"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Background: esp-hal-embassy
will be gone; esp-preempt
was the interim name for the replacement, which eventually will be esp-rtos
. The purpose (of esp-hal
) is to consolidate async under one module. .
trouble-example-apps = { version = "0.1.0", path = "../apps", features = ["log"] } | ||
trouble-host = { path = "../../host", features = ["default-packet-pool-mtu-255"] } | ||
static_cell = "2" | ||
#static_cell = "2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fully removed, but see discussion on radio, later.
esp-bootloader-esp-idf = {git = "https://github.com/lulf/esp-hal.git", branch = "bt-hci-fix"} | ||
esp-hal-embassy = {git = "https://github.com/lulf/esp-hal.git", branch = "bt-hci-fix"} | ||
esp-alloc = {git = "https://github.com/lulf/esp-hal.git", branch = "bt-hci-fix"} | ||
esp-println = {git = "https://github.com/lulf/esp-hal.git", branch = "bt-hci-fix"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in lulf's bt-hci-fix
are present in esp-hal
main
, so I think it's safe to replace them with pointer to the esp-hal
main, itself.
esp-hal = { git = "https://github.com/esp-rs/esp-hal.git" } | ||
esp-println = { git = "https://github.com/esp-rs/esp-hal.git" } | ||
esp-radio = { git = "https://github.com/esp-rs/esp-hal.git" } | ||
esp-rtos = { git = "https://github.com/esp-rs/esp-hal.git" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to test the PR, until 1.0.0-rc1 is released.
static RADIO: StaticCell<Controller<'static>> = StaticCell::new(); | ||
let radio = RADIO.init(esp_radio::init().unwrap()); | ||
//static RADIO: StaticCell<Controller<'static>> = StaticCell::new(); | ||
//let radio = RADIO.init(esp_radio::init().unwrap()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[cfg(feature = "esp32")] | ||
{ | ||
esp_hal_embassy::init(timg0.timer1); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those blocks are no longer needed, due to the API change (esp_rtos
).
use esp_radio::Controller; | ||
use static_cell::StaticCell; | ||
//use esp_radio::Controller; | ||
//use static_cell::StaticCell; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From here on, it's the same story for each of the samples.
thanks for doing this! |
1.0.0-rc1 was released yesterday |
The upcoming embassy changes in
esp-hal
are already documented, and can be prepared for.This PR updates the
examples/esp32
to be prepared for the next 1.0.0-rc version. I advocate that this wouldn't be merged, until rc1 or similar, is released. But we can already fine tune the examples.