Skip to content

Commit

Permalink
🗑️ add deprecate note on 4.3 specific cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
Vollbrecht committed Sep 21, 2023
1 parent 7cf30a7 commit 91dd96c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ impl<'d> I2cSlaveDriver<'d> {
};

#[cfg(esp_idf_version = "4.3")]
#[deprecated(
note = "Using ESP-IDF 4.3 is untested, please upgrade to 4.4 or newer. Support will be removed in the next major release."
)]
let sys_config = i2c_config_t {
mode: i2c_mode_t_I2C_MODE_SLAVE,
sda_io_num: pins.sda.pin(),
Expand Down
3 changes: 3 additions & 0 deletions src/interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ fn enter(_cs: &IsrCriticalSection) {
#[link_section = ".iram1.interrupt_enter"]
fn enter(cs: &IsrCriticalSection) {
#[cfg(esp_idf_version = "4.3")]
#[deprecated(
note = "Using ESP-IDF 4.3 is untested, please upgrade to 4.4 or newer. Support will be removed in the next major release."
)]
unsafe {
vPortEnterCritical(cs.0.get());
}
Expand Down
3 changes: 3 additions & 0 deletions src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@ impl<'d> SpiDriver<'d> {

#[allow(clippy::needless_update)]
#[cfg(esp_idf_version = "4.3")]
#[deprecated(
note = "Using ESP-IDF 4.3 is untested, please upgrade to 4.4 or newer. Support will be removed in the next major release."
)]
let bus_config = spi_bus_config_t {
flags: SPICOMMON_BUSFLAG_MASTER,
sclk_io_num: sclk.pin(),
Expand Down
9 changes: 9 additions & 0 deletions src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ pub fn wait_notification(timeout: TickType_t) -> Option<u32> {
let mut notification = 0_u32;

#[cfg(esp_idf_version = "4.3")]
#[deprecated(
note = "Using ESP-IDF 4.3 is untested, please upgrade to 4.4 or newer. Support will be removed in the next major release."
)]
let notified = unsafe { xTaskNotifyWait(0, u32::MAX, &mut notification, timeout) } != 0;

#[cfg(not(esp_idf_version = "4.3"))]
Expand Down Expand Up @@ -145,6 +148,9 @@ pub unsafe fn notify(task: TaskHandle_t, notification: u32) -> (bool, bool) {
let mut higher_prio_task_woken: BaseType_t = Default::default();

#[cfg(esp_idf_version = "4.3")]
#[deprecated(
note = "Using ESP-IDF 4.3 is untested, please upgrade to 4.4 or newer. Support will be removed in the next major release."
)]
let notified = xTaskGenericNotifyFromISR(
task,
notification,
Expand All @@ -166,6 +172,9 @@ pub unsafe fn notify(task: TaskHandle_t, notification: u32) -> (bool, bool) {
(notified, higher_prio_task_woken)
} else {
#[cfg(esp_idf_version = "4.3")]
#[deprecated(
note = "Using ESP-IDF 4.3 is untested, please upgrade to 4.4 or newer. Support will be removed in the next major release."
)]
let notified =
xTaskGenericNotify(task, notification, eNotifyAction_eSetBits, ptr::null_mut());

Expand Down

0 comments on commit 91dd96c

Please sign in to comment.