Skip to content

Commit

Permalink
Merge branch 'v0.1' into 'v0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryptjar committed Apr 2, 2022
2 parents aa33902 + 5065cb3 commit 1ebc117
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
#![no_std]
//
// We need inline assembly for the `lpm` instruction.
#![feature(llvm_asm)]
//
// For string support, we need to convert from slice to array in const context.
#![feature(const_raw_ptr_deref)]
// However, it seems in more recent Rust version there is no more `llvm_asm`.
// And docs.rs uses the latest Rust version.
#![cfg_attr(not(doc), feature(llvm_asm))]

//!
//! Progmem utilities for the AVR architectures.
Expand Down
4 changes: 2 additions & 2 deletions src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use cfg_if::cfg_if;
///
pub unsafe fn read_byte(p_addr: *const u8) -> u8 {
cfg_if! {
if #[cfg(target_arch = "avr")] {
if #[cfg(all(target_arch = "avr", not(doc)))] {
// Only addresses below the 64 KiB limit are supported!
// Apparently this is of no concern for architectures with true
// 16-bit pointers.
Expand Down Expand Up @@ -187,7 +187,7 @@ unsafe fn read_asm_loop_raw<T>(p_addr: *const T, out: *mut T, len: u8) {


cfg_if! {
if #[cfg(target_arch = "avr")] {
if #[cfg(all(target_arch = "avr", not(doc)))] {
// Only addresses below the 64 KiB limit are supported
// Apparently this is of no concern for architectures with true
// 16-bit pointers.
Expand Down

0 comments on commit 1ebc117

Please sign in to comment.