Merge pull request #1716 from sgjava/master

Remove exit on error
This commit is contained in:
olikraus 2021-12-03 20:01:31 +01:00 committed by GitHub
commit 5c7d5da050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -5,7 +5,8 @@
* Overall performance should be better.
* Run as non-root user.
* Thread safe and multiple display capable.
* For Java check out [Java U8g2](https://github.com/sgjava/java-u8g2) which uses arm-linux port.
* For Java check out [Java UIO U8g2](https://github.com/sgjava/javauio/tree/main/u8g2)
which uses arm-linux port.
## Non-root access
If you want to access devices without root do the following (you can try udev

View File

@ -158,7 +158,6 @@ void init_pin(u8x8_t *u8x8, uint8_t pin) {
fprintf(stderr, "gpio_open(): pin %d, %s\n", u8x8->pins[pin],
gpio_errmsg(user_data -> pins[pin]));
gpio_free(user_data->pins[pin]);
exit(error);
}
}
}
@ -173,7 +172,6 @@ void init_pin(u8x8_t *u8x8, uint8_t pin) {
fprintf(stderr, "gpio_open_sysfs(): pin %d, %s\n", u8x8->pins[pin],
gpio_errmsg(user_data->pins[pin]));
gpio_free(user_data->pins[pin]);
exit(error);
}
}
}
@ -205,7 +203,6 @@ void init_i2c(u8x8_t *u8x8) {
i2c_errmsg(i2c_handles[user_data->bus]));
i2c_free(i2c_handles[user_data->bus]);
i2c_handles[user_data->bus] = NULL;
exit(error);
}
}
}
@ -247,7 +244,6 @@ void init_spi(u8x8_t *u8x8) {
spi_errmsg(spi_handles[user_data->bus]));
spi_free(spi_handles[user_data->bus]);
spi_handles[user_data->bus] = NULL;
exit(error);
}
}
}