Skip to content

Commit

Permalink
Merge pull request openwsn-berkeley#207 from geonnave/less-warns-some…
Browse files Browse the repository at this point in the history
…-docs

Less warnings, more docs
  • Loading branch information
geonnave authored Feb 2, 2024
2 parents 626af3d + b10f872 commit cbdc7e4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/lakers-c-riot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ BOARD ?= nrf52840dk
INCLUDES += -I$(CURDIR)/../../target/include
ARCHIVES += $(CURDIR)/../../target/thumbv7em-none-eabihf/release/liblakers_c.a

ifeq ($(EDHOC_CRYPTO), CRYPTO_PSA)
CFLAGS += -D$(EDHOC_CRYPTO)
ifeq ($(EDHOC_CRYPTO), psa)
CFLAGS += -DCRYPTO_PSA
else
CFLAGS += -DCRYPTO_CRYPTOCELL310
endif
Expand Down
6 changes: 5 additions & 1 deletion examples/lakers-c-riot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ Compile and run:
make flash term
```

Add `EDHOC_CRYPTO=psa` if you want the `crypto-psa-baremetal` configuration.

# Requirements

- See the README in the `lakers-c` crate.
- `lakers-c` library and headers:
- either download them from the [releases page on GitHub](https://github.com/openwsn-berkeley/lakers/releases)
- or build yourself following the README in the `lakers-c` crate
- [RIOT](https://github.com/RIOT-OS/RIOT)'s source code must be available in a local folder, which can be set via the `RIOTBASE` variable.
6 changes: 3 additions & 3 deletions lakers-c/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ cargo build --target="$rust_target" --no-default-features --features="$feature_
# cargo build --target=thumbv7em-none-eabihf --no-default-features --features="crypto-cryptocell310, ead-authz" --release

# generate the headers
cbindgen --config ../shared/cbindgen.toml --crate lakers-shared --output ../target/include/lakers_shared.h -v
cbindgen --config ../ead/lakers-ead-authz/cbindgen.toml --crate lakers-ead-authz --output ../target/include/lakers_ead_authz.h -v
cbindgen --config ./cbindgen.toml --crate lakers-c --output ../target/include/lakers.h -v
cbindgen --config ../shared/cbindgen.toml --crate lakers-shared --output ../target/include/lakers_shared.h
cbindgen --config ../ead/lakers-ead-authz/cbindgen.toml --crate lakers-ead-authz --output ../target/include/lakers_ead_authz.h
cbindgen --config ./cbindgen.toml --crate lakers-c --output ../target/include/lakers.h

# # zip to a single file
cd ../target
Expand Down
2 changes: 0 additions & 2 deletions lakers-c/src/initiator.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use core::slice;

use lakers::*;
use lakers_crypto::{default_crypto, CryptoTrait};

Expand Down
2 changes: 1 addition & 1 deletion lakers-c/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl EADItemC {
}
}

pub unsafe fn copy_into_c(mut ead: EADItem, ead_c: *mut EADItemC) {
pub unsafe fn copy_into_c(ead: EADItem, ead_c: *mut EADItemC) {
(*ead_c).label = ead.label;
(*ead_c).is_critical = ead.is_critical;
if let Some(value) = ead.value {
Expand Down

0 comments on commit cbdc7e4

Please sign in to comment.