This repo contains bindings for libinkview, which is used by pocketbook devices.
We load libinkview dynamically rather than linking it so that users of this
crate don't have to setup the pocketbook SDK. Instead you just need to
cross-compile to armv7-unknown-linux-gnueabi.2.23
(cargo zigbuild
works well
for this) and your binary will run on a pocketbook E-Reader.
Also in this repo is inkview-slint
which provides a slint Backend
that works
with inkview. And a demo application inkview-slint-demo
.
inkview-eg
is a embedded-graphics-core driver for inkview-rs.
Zig must be installed.
To run recipes from the justfile, install the just command runner.
Available recipes can be listed with:
just --list
Then execute the following to install the armv7-unknown-linux-gnueabi
rustc target and cargo-zigbuild
:
just prerequisites
To build a binary crate located in this repo, run:
just pb_sdk_version=<sdk-version> build-app <name>
To build an example:
just pb_sdk_version=<sdk-version> build-example <crate> <name>
To transfer a built binary to the device over USB, run the following,
assuming the device is connected and appears in path /run/media/$USER/<pb-device>
:
The path argument is the relative path from target/armv7-unknown-linux-gnueabi/<cargo-profile>
,
so for example: examples/hello_world
just pb_device=<your-device> transfer-app-usb <path-to-binary> <target-name>
Clone the SDK from here: https://github.com/pocketbook/SDK_6.3.0 and place it next to the inkview-rs
folder.
There are currently bindings for the following SDK versions:
v5.19
: accessed by switching to the5.19
branchv6.5
: accessed by switching to the6.5
branchv6.8
: accessed by downloading the archive from the releases of the repository
Execute the following from the inkview-rs
directory to regenerate the bindings.
just pb_sdk_version=<sdk-version> generate-bindings