From e0e8781ede4c501509c4e20e899d325083766be9 Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Wed, 12 Jul 2023 15:22:02 +0200 Subject: [PATCH 1/6] Update nrfxlib --- .github/workflows/ci.yml | 1 - Cargo.toml | 2 +- src/at.rs | 16 +++++++++++----- src/at_notifications.rs | 4 +++- src/dns.rs | 2 +- src/ffi.rs | 20 ++++++++++---------- src/gnss.rs | 2 +- src/lib.rs | 12 ++---------- src/socket.rs | 10 +++++----- 9 files changed, 34 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfe0419..27bb589 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,5 @@ jobs: components: clippy, rustfmt, llvm-tools-preview targets: thumbv8m.main-none-eabihf - - run: cargo install cargo-binutils - run: cargo fmt -- --check - run: cargo clippy --target thumbv8m.main-none-eabihf diff --git a/Cargo.toml b/Cargo.toml index 343672d..0374da0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ keywords = ["nRF9160", "LTE", "GPS", "NB-IoT", "embedded"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nrfxlib-sys = "2.1.0" +nrfxlib-sys = { git = "https://github.com/diondokter/nrfxlib-sys.git", branch = "develop" } futures = { version = "0.3.24", default-features = false, features = ["async-await"] } num_enum = { version = "0.6.1", default-features = false } defmt = { version = "0.3.2", optional = true } diff --git a/src/at.rs b/src/at.rs index 0778c3c..9bccb6d 100644 --- a/src/at.rs +++ b/src/at.rs @@ -31,7 +31,9 @@ static AT_DATA_WAKER: AtomicWaker = AtomicWaker::new(); /// The callback that will be called by nrfxlib when the at command has a response. /// The `resp` is a null-terminated string. -unsafe extern "C" fn at_callback(resp: *const u8) { +unsafe extern "C" fn at_callback(resp: *const core::ffi::c_char) { + let resp = resp as *const u8; + #[cfg(feature = "defmt")] defmt::trace!( "AT <- {}", @@ -102,7 +104,7 @@ pub fn send_at_blocking(command: &str) -> Result(command: &str) -> Result Future for SendATFuture<'c, CAP> { let result = unsafe { nrfxlib_sys::nrf_modem_at_cmd_async( Some(at_callback), - b"%.*s\0".as_ptr(), + b"%.*s\0".as_ptr() as *const core::ffi::c_char, self.command.len(), self.command.as_ptr(), ) diff --git a/src/at_notifications.rs b/src/at_notifications.rs index 8dba77d..3e9d7a5 100644 --- a/src/at_notifications.rs +++ b/src/at_notifications.rs @@ -9,7 +9,9 @@ use critical_section::Mutex; static WAKER_NODE_LIST: Mutex>> = Mutex::new(RefCell::new(WakerNodeList::new())); -pub(crate) unsafe extern "C" fn at_notification_handler(notif: *const u8) { +pub(crate) unsafe extern "C" fn at_notification_handler(notif: *const core::ffi::c_char) { + let notif = notif as *const u8; + #[cfg(feature = "defmt")] defmt::trace!( "AT notification <- {}", diff --git a/src/dns.rs b/src/dns.rs index 68b7e33..61c00e5 100644 --- a/src/dns.rs +++ b/src/dns.rs @@ -69,7 +69,7 @@ pub async fn get_host_by_name_with_cancellation( hostname.push('\0'); let err = nrfxlib_sys::nrf_getaddrinfo( - hostname.as_ptr(), + hostname.as_ptr() as *const core::ffi::c_char, core::ptr::null(), &hints as *const _, &mut result as *mut *mut _, diff --git a/src/ffi.rs b/src/ffi.rs index b474b3b..d34f1cb 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -407,10 +407,10 @@ pub unsafe fn nrf_ipc_irq_handler() { /// - 0 on success, a negative errno otherwise. #[no_mangle] pub unsafe extern "C" fn nrf_modem_os_sem_init( - sem: *mut *mut nrfxlib_sys::ctypes::c_void, - initial_count: nrfxlib_sys::ctypes::c_uint, - limit: nrfxlib_sys::ctypes::c_uint, -) -> nrfxlib_sys::ctypes::c_int { + sem: *mut *mut core::ffi::c_void, + initial_count: core::ffi::c_uint, + limit: core::ffi::c_uint, +) -> core::ffi::c_int { if sem.is_null() || initial_count > limit { return -(nrfxlib_sys::NRF_EINVAL as i32); } @@ -442,7 +442,7 @@ pub unsafe extern "C" fn nrf_modem_os_sem_init( /// **Parameters** /// - sem – The semaphore. #[no_mangle] -pub extern "C" fn nrf_modem_os_sem_give(sem: *mut nrfxlib_sys::ctypes::c_void) { +pub extern "C" fn nrf_modem_os_sem_give(sem: *mut core::ffi::c_void) { unsafe { if sem.is_null() { return; @@ -471,9 +471,9 @@ pub extern "C" fn nrf_modem_os_sem_give(sem: *mut nrfxlib_sys::ctypes::c_void) { /// - -NRF_EAGAIN – If the semaphore could not be taken. #[no_mangle] pub extern "C" fn nrf_modem_os_sem_take( - sem: *mut nrfxlib_sys::ctypes::c_void, - mut timeout: nrfxlib_sys::ctypes::c_int, -) -> nrfxlib_sys::ctypes::c_int { + sem: *mut core::ffi::c_void, + mut timeout: core::ffi::c_int, +) -> core::ffi::c_int { unsafe { if sem.is_null() { return -(nrfxlib_sys::NRF_EAGAIN as i32); @@ -521,8 +521,8 @@ pub extern "C" fn nrf_modem_os_sem_take( /// - Current semaphore count. #[no_mangle] pub extern "C" fn nrf_modem_os_sem_count_get( - sem: *mut nrfxlib_sys::ctypes::c_void, -) -> nrfxlib_sys::ctypes::c_uint { + sem: *mut core::ffi::c_void, +) -> core::ffi::c_uint { unsafe { if sem.is_null() { return 0; diff --git a/src/gnss.rs b/src/gnss.rs index e20df8b..83a9d35 100644 --- a/src/gnss.rs +++ b/src/gnss.rs @@ -416,7 +416,7 @@ impl GnssData { ) .into_result()?; - let data = data.assume_init().nmea_str; + let data = core::mem::transmute(data.assume_init().nmea_str); // Make data be u8 let mut string_data = ArrayString::from_byte_string(&data)?; string_data.truncate( string_data diff --git a/src/lib.rs b/src/lib.rs index b506230..bcc1d47 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -125,7 +125,7 @@ pub async fn init(mode: SystemMode) -> Result<(), Error> { } // OK, let's start the library - unsafe { nrfxlib_sys::nrf_modem_init(¶ms, nrfxlib_sys::nrf_modem_mode_NORMAL_MODE) } + unsafe { nrfxlib_sys::nrf_modem_init(¶ms) } .into_result()?; // Initialize AT notifications @@ -166,19 +166,11 @@ unsafe extern "C" fn modem_fault_handler(_info: *mut nrfxlib_sys::nrf_modem_faul ); } -/// You must call this when an EGU1 interrupt occurs. -pub fn application_irq_handler() { - unsafe { - nrfxlib_sys::nrf_modem_application_irq_handler(); - nrfxlib_sys::nrf_modem_os_event_notify(); - } -} - /// IPC code now lives outside `lib_modem`, so call our IPC handler function. pub fn ipc_irq_handler() { unsafe { crate::ffi::nrf_ipc_irq_handler(); - nrfxlib_sys::nrf_modem_os_event_notify(); + nrfxlib_sys::nrf_modem_os_event_notify(0); crate::socket::wake_sockets(); } } diff --git a/src/socket.rs b/src/socket.rs index 479cbdf..8f01a3c 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -593,12 +593,12 @@ impl<'a> SocketOption<'a> { } } - pub(crate) fn get_value(&self) -> *const nrfxlib_sys::ctypes::c_void { + pub(crate) fn get_value(&self) -> *const core::ffi::c_void { match self { - SocketOption::TlsHostName(s) => s.as_ptr() as *const nrfxlib_sys::ctypes::c_void, - SocketOption::TlsPeerVerify(x) => x as *const _ as *const nrfxlib_sys::ctypes::c_void, - SocketOption::TlsSessionCache(x) => x as *const _ as *const nrfxlib_sys::ctypes::c_void, - SocketOption::TlsTagList(x) => x.as_ptr() as *const nrfxlib_sys::ctypes::c_void, + SocketOption::TlsHostName(s) => s.as_ptr() as *const core::ffi::c_void, + SocketOption::TlsPeerVerify(x) => x as *const _ as *const core::ffi::c_void, + SocketOption::TlsSessionCache(x) => x as *const _ as *const core::ffi::c_void, + SocketOption::TlsTagList(x) => x.as_ptr() as *const core::ffi::c_void, } } From 4aed6b282e419c069082c83eaf17d8ba5617dc08 Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Fri, 21 Jul 2023 13:02:47 +0200 Subject: [PATCH 2/6] Remove unnecessary FFI --- README.md | 10 ---------- src/ffi.rs | 58 +++++++++++------------------------------------------- src/lib.rs | 14 +++++++------ 3 files changed, 19 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index 7edcb8a..c546d58 100644 --- a/README.md +++ b/README.md @@ -43,14 +43,6 @@ Make sure you are in that context by using e.g. the SPM. The `EGU1` and `IPC` interrupts must be routed to the modem software. ```rust,ignore -// Interrupt Handler for LTE related hardware. Defer straight to the library. -#[interrupt] -#[allow(non_snake_case)] -fn EGU1() { - nrf_modem::application_irq_handler(); - cortex_m::asm::sev(); -} - // Interrupt Handler for LTE related hardware. Defer straight to the library. #[interrupt] #[allow(non_snake_case)] @@ -63,9 +55,7 @@ let mut cp = unwrap!(cortex_m::Peripherals::take()); // Enable the modem interrupts unsafe { - NVIC::unmask(pac::Interrupt::EGU1); NVIC::unmask(pac::Interrupt::IPC); - cp.NVIC.set_priority(pac::Interrupt::EGU1, 4 << 5); cp.NVIC.set_priority(pac::Interrupt::IPC, 0 << 5); } ``` diff --git a/src/ffi.rs b/src/ffi.rs index d34f1cb..2ac3bb4 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -75,33 +75,15 @@ static IPC_CONTEXT: core::sync::atomic::AtomicUsize = core::sync::atomic::Atomic /// Remembers the IPC handler function we were given static IPC_HANDLER: core::sync::atomic::AtomicUsize = core::sync::atomic::AtomicUsize::new(0); -/// Function required by BSD library. We need to set the EGU1 interrupt. -#[no_mangle] -pub extern "C" fn nrf_modem_os_application_irq_set() { - cortex_m::peripheral::NVIC::pend(nrf9160_pac::Interrupt::EGU1); -} - -/// Function required by BSD library. We need to clear the EGU1 interrupt. -#[no_mangle] -pub extern "C" fn nrf_modem_os_application_irq_clear() { - cortex_m::peripheral::NVIC::unpend(nrf9160_pac::Interrupt::EGU1); -} - -/// Function required by BSD library. We need to set the EGU2 interrupt. -#[no_mangle] -pub extern "C" fn nrf_modem_os_trace_irq_set() { - cortex_m::peripheral::NVIC::pend(nrf9160_pac::Interrupt::EGU2); -} - -/// Function required by BSD library. We need to clear the EGU2 interrupt. +/// Function required by BSD library. We have no init to do. #[no_mangle] -pub extern "C" fn nrf_modem_os_trace_irq_clear() { - cortex_m::peripheral::NVIC::unpend(nrf9160_pac::Interrupt::EGU2); +pub extern "C" fn nrf_modem_os_init() { + // Nothing } -/// Function required by BSD library. We have no init to do. +/// Function required by BSD library. We have no shutdown to do. #[no_mangle] -pub extern "C" fn nrf_modem_os_init() { +pub extern "C" fn nrf_modem_os_shutdown() { // Nothing } @@ -177,19 +159,6 @@ pub extern "C" fn nrf_modem_os_event_notify() { NOTIFY_ACTIVE.store(true, Ordering::SeqCst); } -/// Function required by BSD library -#[no_mangle] -pub extern "C" fn nrf_modem_os_trace_put(_data: *const u8, _len: u32) -> i32 { - // Do nothing - 0 -} - -/// Function required by BSD library -#[no_mangle] -pub extern "C" fn nrf_modem_irrecoverable_error_handler(err: u32) -> ! { - panic!("bsd_irrecoverable_error_handler({})", err); -} - /// The Modem library needs to dynamically allocate memory (a heap) for proper /// functioning. This memory is used to store the internal data structures that /// are used to manage the communication between the application core and the @@ -229,16 +198,6 @@ pub unsafe extern "C" fn nrf_modem_os_shm_tx_free(ptr: *mut u8) { generic_free(ptr, &crate::TX_ALLOCATOR); } -#[no_mangle] -pub extern "C" fn nrf_modem_os_trace_alloc(_bytes: usize) -> *mut u8 { - unimplemented!() -} - -#[no_mangle] -pub extern "C" fn nrf_modem_os_trace_free(_mem: *mut u8) { - unimplemented!() -} - /// @brief Function for loading configuration directly into IPC peripheral. /// /// @param p_config Pointer to the structure with the initial configuration. @@ -260,7 +219,6 @@ pub unsafe extern "C" fn nrfx_ipc_config_load(p_config: *const NrfxIpcConfig) { .write(|w| w.bits(config.receive_events_enabled)); } -/// /// @brief Function for initializing the IPC driver. /// /// @param irq_priority Interrupt priority. @@ -386,11 +344,17 @@ pub unsafe fn nrf_ipc_irq_handler() { (*nrf9160_pac::IPC_NS::ptr()).events_receive[event_idx as usize].write(|w| w.bits(0)); } + #[cfg(feature = "defmt")] + defmt::trace!("IPC start"); + // Execute interrupt handler to provide information about events to app let handler_addr = IPC_HANDLER.load(core::sync::atomic::Ordering::SeqCst); let handler = core::mem::transmute::(handler_addr); let context = IPC_CONTEXT.load(core::sync::atomic::Ordering::SeqCst); (handler)(events_map, context as *mut u8); + + #[cfg(feature = "defmt")] + defmt::trace!("IPC done"); } /// Initialize a semaphore. diff --git a/src/lib.rs b/src/lib.rs index bcc1d47..286c048 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -93,22 +93,25 @@ pub async fn init(mode: SystemMode) -> Result<(), Error> { // At start of shared memory (see memory.x) base: 0x2001_0000, // This is the amount specified in the NCS 1.5.1 release. - size: 0x0000_04e8, + size: nrfxlib_sys::NRF_MODEM_SHMEM_CTRL_SIZE, }, tx: nrfxlib_sys::nrf_modem_shmem_cfg__bindgen_ty_2 { // Follows on from control buffer - base: 0x2001_04e8, + base: 0x2001_0000 + nrfxlib_sys::NRF_MODEM_SHMEM_CTRL_SIZE, // This is the amount specified in the NCS 1.5.1 release. size: 0x0000_2000, }, rx: nrfxlib_sys::nrf_modem_shmem_cfg__bindgen_ty_3 { // Follows on from TX buffer - base: 0x2001_24e8, + base: 0x2001_0000 + nrfxlib_sys::NRF_MODEM_SHMEM_CTRL_SIZE + 0x2000, // This is the amount specified in the NCS 1.5.1 release. size: 0x0000_2000, }, // No trace info - trace: nrfxlib_sys::nrf_modem_shmem_cfg__bindgen_ty_4 { base: 0, size: 0 }, + trace: nrfxlib_sys::nrf_modem_shmem_cfg__bindgen_ty_4 { + base: 0x2001_0000, + size: 0, + }, }, ipc_irq_prio: 0, fault_handler: Some(modem_fault_handler), @@ -125,8 +128,7 @@ pub async fn init(mode: SystemMode) -> Result<(), Error> { } // OK, let's start the library - unsafe { nrfxlib_sys::nrf_modem_init(¶ms) } - .into_result()?; + unsafe { nrfxlib_sys::nrf_modem_init(¶ms) }.into_result()?; // Initialize AT notifications at_notifications::initialize()?; From 4b7a74097915a8ba4b029a4d3f910f783e696c82 Mon Sep 17 00:00:00 2001 From: Tamme Dittrich Date: Tue, 5 Sep 2023 15:19:23 +0200 Subject: [PATCH 3/6] Adapt IPC handling to updated nrfxlib The changes needed do not seem to be documented in the changelog by NRF. Luckily nrfx had basically the changes that were needed to fix the IPC. So links to the relevant code parts were added for if fixes in the future become necessary. --- Cargo.toml | 13 ++++++++++--- src/ffi.rs | 37 +++++++++++++++++++++++++++---------- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d33420a..d13c52c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,12 +13,16 @@ keywords = ["nRF9160", "LTE", "GPS", "NB-IoT", "embedded"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nrfxlib-sys = { git = "https://github.com/diondokter/nrfxlib-sys.git", branch = "develop" } -futures = { version = "0.3.24", default-features = false, features = ["async-await"] } +nrfxlib-sys = "2.4.2" +futures = { version = "0.3.24", default-features = false, features = [ + "async-await", +] } num_enum = { version = "0.6.1", default-features = false } defmt = { version = "0.3.2", optional = true } cortex-m = "0.7" -linked_list_allocator = { version="0.10.1", default-features=false, features=["use_spin"] } +linked_list_allocator = { version = "0.10.1", default-features = false, features = [ + "use_spin", +] } nrf9160-pac = "0.12.2" arrayvec = { version = "0.7", default-features = false } at-commands = "0.5.2" @@ -26,6 +30,9 @@ no-std-net = "0.6.0" critical-section = "1.1" embassy-sync = "0.2.0" +[patch.crates-io] +nrfxlib-sys = { path = "../nrfxlib-sys" } + [features] default = [] defmt = ["dep:defmt", "at-commands/defmt"] diff --git a/src/ffi.rs b/src/ffi.rs index 21c06ee..5f60441 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -31,7 +31,8 @@ pub struct NrfxIpcConfig { } /// IPC callback function type -type NrfxIpcHandler = extern "C" fn(event_mask: u32, ptr: *mut u8); +// based on https://github.com/NordicSemiconductor/nrfx/blob/98d6f433313a3d8dcf08dce25e744617b45aa913/drivers/include/nrfx_ipc.h#L56 +type NrfxIpcHandler = extern "C" fn(event_idx: u8, ptr: *mut u8); /// IPC error type #[repr(u32)] @@ -332,26 +333,42 @@ unsafe fn generic_free(ptr: *mut u8, heap: &crate::WrappedHeap) { /// Call this when we have an IPC IRQ. Not `extern C` as its not called by the /// library, only our interrupt handler code. +// This function seems to be based on this verion in C: +// https://github.com/NordicSemiconductor/nrfx/blob/98d6f433313a3d8dcf08dce25e744617b45aa913/drivers/src/nrfx_ipc.c#L146-L163 pub unsafe fn nrf_ipc_irq_handler() { // Get the information about events that fired this interrupt let events_map = (*nrf9160_pac::IPC_NS::ptr()).intpend.read().bits(); + #[cfg(feature = "defmt")] + defmt::trace!("IPC start"); + + // Fetch interrupt handler and context to use during event resolution + let handler_addr = IPC_HANDLER.load(core::sync::atomic::Ordering::SeqCst); + let handler = if handler_addr != 0 { + let handler = core::mem::transmute::(handler_addr); + Some(handler) + } else { + #[cfg(feature = "defmt")] + defmt::warn!("No IPC handler registered"); + None + }; + let context = IPC_CONTEXT.load(core::sync::atomic::Ordering::SeqCst); + // Clear these events let mut bitmask = events_map; while bitmask != 0 { let event_idx = bitmask.trailing_zeros(); bitmask &= !(1 << event_idx); (*nrf9160_pac::IPC_NS::ptr()).events_receive[event_idx as usize].write(|w| w.bits(0)); - } - - #[cfg(feature = "defmt")] - defmt::trace!("IPC start"); - // Execute interrupt handler to provide information about events to app - let handler_addr = IPC_HANDLER.load(core::sync::atomic::Ordering::SeqCst); - let handler = core::mem::transmute::(handler_addr); - let context = IPC_CONTEXT.load(core::sync::atomic::Ordering::SeqCst); - (handler)(events_map, context as *mut u8); + // Execute interrupt handler to provide information about events to app + if let Some(handler) = handler { + let event_idx = event_idx + .try_into() + .expect("A u32 has less then 255 trailing zeroes"); + (handler)(event_idx, context as *mut u8); + } + } #[cfg(feature = "defmt")] defmt::trace!("IPC done"); From 0c7d36c71838433db050af292a9f58544e2bffd9 Mon Sep 17 00:00:00 2001 From: Tamme Dittrich Date: Wed, 6 Sep 2023 09:45:19 +0200 Subject: [PATCH 4/6] emove no longer needed logging --- src/ffi.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/ffi.rs b/src/ffi.rs index 5f60441..60a4a68 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -339,9 +339,6 @@ pub unsafe fn nrf_ipc_irq_handler() { // Get the information about events that fired this interrupt let events_map = (*nrf9160_pac::IPC_NS::ptr()).intpend.read().bits(); - #[cfg(feature = "defmt")] - defmt::trace!("IPC start"); - // Fetch interrupt handler and context to use during event resolution let handler_addr = IPC_HANDLER.load(core::sync::atomic::Ordering::SeqCst); let handler = if handler_addr != 0 { @@ -369,9 +366,6 @@ pub unsafe fn nrf_ipc_irq_handler() { (handler)(event_idx, context as *mut u8); } } - - #[cfg(feature = "defmt")] - defmt::trace!("IPC done"); } /// Initialize a semaphore. From 62865457009d2fbe6fb8f06a2db0e6139f2e30a5 Mon Sep 17 00:00:00 2001 From: Tamme Dittrich Date: Wed, 6 Sep 2023 09:45:47 +0200 Subject: [PATCH 5/6] Allow CI to pass --- Cargo.toml | 2 +- src/ffi.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d13c52c..8ab4323 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ critical-section = "1.1" embassy-sync = "0.2.0" [patch.crates-io] -nrfxlib-sys = { path = "../nrfxlib-sys" } +nrfxlib-sys = { git = "https://github.com/diondokter/nrfxlib-sys.git", branch = "develop" } [features] default = [] diff --git a/src/ffi.rs b/src/ffi.rs index 60a4a68..2bdb07f 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -495,9 +495,7 @@ pub extern "C" fn nrf_modem_os_sem_take( /// **Returns** /// - Current semaphore count. #[no_mangle] -pub extern "C" fn nrf_modem_os_sem_count_get( - sem: *mut core::ffi::c_void, -) -> core::ffi::c_uint { +pub extern "C" fn nrf_modem_os_sem_count_get(sem: *mut core::ffi::c_void) -> core::ffi::c_uint { unsafe { if sem.is_null() { return 0; From 0004d0d42456cd77d43bae9fa28e0920bdc7d54d Mon Sep 17 00:00:00 2001 From: Tamme Dittrich Date: Thu, 7 Sep 2023 09:40:47 +0200 Subject: [PATCH 6/6] Cleanup Cargo.toml and add Changelog entry This should make this crate ready for a new release. --- CHANGELOG.md | 4 ++++ Cargo.toml | 13 +++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 816f175..831a9f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.4.0 (2023-09-07) + +- Update nrfxlib-sys to 2.4.2, removing the need for the `EGU1` interrupt + ## 0.3.3 (07-08-23) - Fixed issue where a split socket polled on two different tasks would not properly wake up one of the two tasks if both were waiting on the same socket. (#14) diff --git a/Cargo.toml b/Cargo.toml index 8ab4323..3417dea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nrf-modem" -version = "0.3.3" +version = "0.4.0" edition = "2021" rust-version = "1.64" license = "MIT OR Apache-2.0" @@ -14,15 +14,11 @@ keywords = ["nRF9160", "LTE", "GPS", "NB-IoT", "embedded"] [dependencies] nrfxlib-sys = "2.4.2" -futures = { version = "0.3.24", default-features = false, features = [ - "async-await", -] } +futures = { version = "0.3.24", default-features = false, features = ["async-await"] } num_enum = { version = "0.6.1", default-features = false } defmt = { version = "0.3.2", optional = true } cortex-m = "0.7" -linked_list_allocator = { version = "0.10.1", default-features = false, features = [ - "use_spin", -] } +linked_list_allocator = { version="0.10.1", default-features=false, features=["use_spin"] } nrf9160-pac = "0.12.2" arrayvec = { version = "0.7", default-features = false } at-commands = "0.5.2" @@ -30,9 +26,6 @@ no-std-net = "0.6.0" critical-section = "1.1" embassy-sync = "0.2.0" -[patch.crates-io] -nrfxlib-sys = { git = "https://github.com/diondokter/nrfxlib-sys.git", branch = "develop" } - [features] default = [] defmt = ["dep:defmt", "at-commands/defmt"]