tock / libtock-rs

Rust userland library for Tock
Apache License 2.0
160 stars 105 forks source link

apis: update breaking driver existence check changes #517

Closed Samir-Rashid closed 7 months ago

Samir-Rashid commented 9 months ago

Bring libtock-rs into consistency with the changes in this PR.

Only apis/gpio/src/lib.rs needed to be changed. The rest is a grepped driver_check -> exists.

Samir-Rashid commented 9 months ago

Added ppannuto's suggested change and resquashed.

diff

```rs diff --git a/apis/gpio/src/lib.rs b/apis/gpio/src/lib.rs index 8328358..bc2d500 100644 --- a/apis/gpio/src/lib.rs +++ b/apis/gpio/src/lib.rs @@ -57,7 +57,8 @@ pub struct Gpio(S); impl Gpio { /// Returns Ok() if the driver was present.This does not necessarily mean - /// that the driver is working. + /// that the driver is working, as it may still fail to allocate grant + /// memory. pub fn exists() -> Result<(), ErrorCode> { S::command(DRIVER_NUM, EXISTS, 0, 0).to_result() } ```

ppannuto commented 8 months ago

It looks like some of those CI errors are real — unit tests that need to be updated to match the new expectations.

Samir-Rashid commented 7 months ago

I rebased to master. The tests are passing, so I think this PR should be merged.