Expand description
Raw bindings for a small C ABI shim over M5Unified.
This crate intentionally does not bind M5Unified’s C++ classes directly.
Instead, native/m5u_shim.cpp exposes stable extern "C" functions that
Rust can call from the higher-level m5unified crate. On non-ESP-IDF host
targets these functions are stubbed so the safe wrapper and translated
samples can be checked in CI without hardware.
Firmware projects targeting ESP-IDF must provide the native shim component
from this crate’s native/ directory in their ESP-IDF component graph. The
host stubs are compile-time conveniences only and do not simulate M5Stack
hardware behavior.
Structs§
- m5u_
config_ t - m5u_
imu_ data_ t - m5u_
led_ color_ t - m5u_
mic_ config_ t - m5u_
power_ ext_ port_ bus_ t - m5u_
rtc_ datetime_ t - m5u_
sd_ spi_ config_ t - m5u_
speaker_ config_ t - m5u_
touch_ detail_ t
Functions§
- m5u_
battery_ ⚠level - m5u_
battery_ ⚠voltage_ mv - m5u_
begin ⚠ - m5u_
begin_ ⚠with_ config - m5u_
btn_ ⚠a_ is_ pressed - m5u_
btn_ ⚠a_ was_ pressed - m5u_
btn_ ⚠a_ was_ released - m5u_
btn_ ⚠b_ is_ pressed - m5u_
btn_ ⚠b_ was_ pressed - m5u_
btn_ ⚠b_ was_ released - m5u_
btn_ ⚠c_ is_ pressed - m5u_
btn_ ⚠c_ was_ pressed - m5u_
btn_ ⚠c_ was_ released - m5u_
button_ ⚠get_ click_ count - m5u_
button_ ⚠get_ debounce_ thresh - m5u_
button_ ⚠get_ hold_ thresh - m5u_
button_ ⚠get_ state - m5u_
button_ ⚠get_ update_ msec - m5u_
button_ ⚠is_ holding - m5u_
button_ ⚠is_ pressed - m5u_
button_ ⚠is_ released - m5u_
button_ ⚠last_ change - m5u_
button_ ⚠pressed_ for - m5u_
button_ ⚠released_ for - m5u_
button_ ⚠set_ debounce_ thresh - m5u_
button_ ⚠set_ hold_ thresh - m5u_
button_ ⚠set_ raw_ state - m5u_
button_ ⚠set_ state - m5u_
button_ ⚠was_ change_ pressed - m5u_
button_ ⚠was_ clicked - m5u_
button_ ⚠was_ decide_ click_ count - m5u_
button_ ⚠was_ double_ clicked - m5u_
button_ ⚠was_ hold - m5u_
button_ ⚠was_ pressed - m5u_
button_ ⚠was_ release_ for - m5u_
button_ ⚠was_ released - m5u_
button_ ⚠was_ released_ after_ hold - m5u_
button_ ⚠was_ single_ clicked - m5u_
delay_ ⚠ms - m5u_
display_ ⚠clear_ clip_ rect - m5u_
display_ ⚠color888 - m5u_
display_ ⚠count - m5u_
display_ ⚠display - m5u_
display_ ⚠display_ busy - m5u_
display_ ⚠draw_ circle - m5u_
display_ ⚠draw_ circle_ at - m5u_
display_ ⚠draw_ line - m5u_
display_ ⚠draw_ line_ at - m5u_
display_ ⚠draw_ pixel_ at - m5u_
display_ ⚠draw_ rect - m5u_
display_ ⚠draw_ rect_ at - m5u_
display_ ⚠draw_ string - m5u_
display_ ⚠draw_ string_ at - m5u_
display_ ⚠end_ write - m5u_
display_ ⚠end_ write_ at - m5u_
display_ ⚠fill_ circle - m5u_
display_ ⚠fill_ circle_ at - m5u_
display_ ⚠fill_ rect - m5u_
display_ ⚠fill_ rect_ at - m5u_
display_ ⚠fill_ screen - m5u_
display_ ⚠fill_ screen_ at - m5u_
display_ ⚠font_ height - m5u_
display_ ⚠get_ base_ color - m5u_
display_ ⚠get_ cursor_ y - m5u_
display_ ⚠get_ rotation - m5u_
display_ ⚠get_ rotation_ at - m5u_
display_ ⚠height - m5u_
display_ ⚠height_ at - m5u_
display_ ⚠index_ for_ kind - m5u_
display_ ⚠index_ for_ kinds - m5u_
display_ ⚠print - m5u_
display_ ⚠print_ at - m5u_
display_ ⚠println - m5u_
display_ ⚠println_ at - m5u_
display_ ⚠set_ brightness - m5u_
display_ ⚠set_ clip_ rect - m5u_
display_ ⚠set_ color - m5u_
display_ ⚠set_ color_ at - m5u_
display_ ⚠set_ cursor - m5u_
display_ ⚠set_ cursor_ at - m5u_
display_ ⚠set_ epd_ fastest - m5u_
display_ ⚠set_ epd_ mode - m5u_
display_ ⚠set_ font - m5u_
display_ ⚠set_ rotation - m5u_
display_ ⚠set_ rotation_ at - m5u_
display_ ⚠set_ text_ color - m5u_
display_ ⚠set_ text_ color_ at - m5u_
display_ ⚠set_ text_ datum - m5u_
display_ ⚠set_ text_ scroll - m5u_
display_ ⚠set_ text_ size - m5u_
display_ ⚠set_ text_ size_ at - m5u_
display_ ⚠set_ text_ wrap - m5u_
display_ ⚠start_ write - m5u_
display_ ⚠start_ write_ at - m5u_
display_ ⚠wait_ display - m5u_
display_ ⚠width - m5u_
display_ ⚠width_ at - m5u_
display_ ⚠write_ fast_ vline - m5u_
display_ ⚠write_ pixel - m5u_
display_ ⚠write_ pixel_ at - m5u_
get_ ⚠board - m5u_
get_ ⚠pin - m5u_
get_ ⚠touch_ button_ height - m5u_
get_ ⚠update_ msec - m5u_
i2c_ ⚠begin - m5u_
i2c_ ⚠begin_ with_ port - m5u_
i2c_ ⚠bit_ off - m5u_
i2c_ ⚠bit_ on - m5u_
i2c_ ⚠get_ port - m5u_
i2c_ ⚠get_ scl - m5u_
i2c_ ⚠get_ sda - m5u_
i2c_ ⚠is_ enabled - m5u_
i2c_ ⚠read - m5u_
i2c_ ⚠read_ register - m5u_
i2c_ ⚠read_ register8 - m5u_
i2c_ ⚠release - m5u_
i2c_ ⚠restart - m5u_
i2c_ ⚠scan - m5u_
i2c_ ⚠scan_ address - m5u_
i2c_ ⚠set_ port - m5u_
i2c_ ⚠start - m5u_
i2c_ ⚠stop - m5u_
i2c_ ⚠write - m5u_
i2c_ ⚠write_ byte - m5u_
i2c_ ⚠write_ register - m5u_
i2c_ ⚠write_ register8 - m5u_
imu_ ⚠begin - m5u_
imu_ ⚠begin_ for_ board - m5u_
imu_ ⚠clear_ offset_ data - m5u_
imu_ ⚠get_ accel - m5u_
imu_ ⚠get_ data - m5u_
imu_ ⚠get_ gyro - m5u_
imu_ ⚠get_ mag - m5u_
imu_ ⚠get_ offset_ data - m5u_
imu_ ⚠get_ offset_ data_ i32 - m5u_
imu_ ⚠get_ raw_ data - m5u_
imu_ ⚠get_ temp_ c - m5u_
imu_ ⚠get_ type - m5u_
imu_ ⚠is_ enabled - m5u_
imu_ ⚠load_ offset_ from_ nvs - m5u_
imu_ ⚠save_ offset_ to_ nvs - m5u_
imu_ ⚠set_ axis_ order - m5u_
imu_ ⚠set_ axis_ order_ left_ handed - m5u_
imu_ ⚠set_ axis_ order_ right_ handed - m5u_
imu_ ⚠set_ calibration - m5u_
imu_ ⚠set_ calibration_ strength - m5u_
imu_ ⚠set_ clock - m5u_
imu_ ⚠set_ int_ pin_ active_ logic - m5u_
imu_ ⚠set_ offset_ data - m5u_
imu_ ⚠sleep - m5u_
imu_ ⚠update - m5u_
imu_ ⚠update_ mask - m5u_
led_ ⚠begin - m5u_
led_ ⚠count - m5u_
led_ ⚠display - m5u_
led_ ⚠get_ type - m5u_
led_ ⚠is_ enabled - m5u_
led_ ⚠set_ all_ color_ rgb - m5u_
led_ ⚠set_ auto_ display - m5u_
led_ ⚠set_ brightness - m5u_
led_ ⚠set_ color_ rgb - m5u_
led_ ⚠set_ colors_ rgb - m5u_
log_ ⚠dump - m5u_
log_ ⚠get_ enable_ color - m5u_
log_ ⚠get_ level - m5u_
log_ ⚠level - m5u_
log_ ⚠path_ to_ file_ name - m5u_
log_ ⚠print - m5u_
log_ ⚠println - m5u_
log_ ⚠println_ empty - m5u_
log_ ⚠set_ callback - m5u_
log_ ⚠set_ enable_ color - m5u_
log_ ⚠set_ level - m5u_
log_ ⚠set_ suffix - m5u_
mic_ ⚠begin - m5u_
mic_ ⚠end - m5u_
mic_ ⚠get_ config - m5u_
mic_ ⚠get_ noise_ filter_ level - m5u_
mic_ ⚠is_ enabled - m5u_
mic_ ⚠is_ recording - m5u_
mic_ ⚠is_ running - m5u_
mic_ ⚠record_ i16 - m5u_
mic_ ⚠record_ i16_ at - m5u_
mic_ ⚠record_ i16_ ex - m5u_
mic_ ⚠record_ u8 - m5u_
mic_ ⚠record_ u8_ ex - m5u_
mic_ ⚠recording_ state - m5u_
mic_ ⚠set_ config - m5u_
mic_ ⚠set_ noise_ filter_ level - m5u_
mic_ ⚠set_ sample_ rate - m5u_
micros ⚠ - m5u_
millis ⚠ - m5u_
power_ ⚠axp2101_ clear_ irq_ statuses - m5u_
power_ ⚠axp2101_ disable_ irq - m5u_
power_ ⚠axp2101_ enable_ irq - m5u_
power_ ⚠axp2101_ get_ irq_ statuses - m5u_
power_ ⚠axp2101_ is_ bat_ charger_ over_ temperature_ irq - m5u_
power_ ⚠axp2101_ is_ bat_ charger_ under_ temperature_ irq - m5u_
power_ ⚠axp2101_ is_ vbus_ insert_ irq - m5u_
power_ ⚠axp2101_ is_ vbus_ remove_ irq - m5u_
power_ ⚠begin - m5u_
power_ ⚠deep_ sleep_ us - m5u_
power_ ⚠get_ battery_ current_ ma - m5u_
power_ ⚠get_ charge_ state - m5u_
power_ ⚠get_ ext_ current_ ma - m5u_
power_ ⚠get_ ext_ output - m5u_
power_ ⚠get_ ext_ voltage_ mv - m5u_
power_ ⚠get_ key_ state - m5u_
power_ ⚠get_ type - m5u_
power_ ⚠get_ usb_ output - m5u_
power_ ⚠get_ vbus_ voltage_ mv - m5u_
power_ ⚠is_ charging - m5u_
power_ ⚠light_ sleep_ us - m5u_
power_ ⚠power_ off - m5u_
power_ ⚠set_ battery_ charge - m5u_
power_ ⚠set_ charge_ current - m5u_
power_ ⚠set_ charge_ voltage - m5u_
power_ ⚠set_ ext_ output - m5u_
power_ ⚠set_ ext_ port_ bus_ config - m5u_
power_ ⚠set_ led - m5u_
power_ ⚠set_ usb_ output - m5u_
power_ ⚠set_ vibration - m5u_
power_ ⚠timer_ sleep_ date_ time - m5u_
power_ ⚠timer_ sleep_ seconds - m5u_
power_ ⚠timer_ sleep_ time - m5u_
rtc_ ⚠clear_ irq - m5u_
rtc_ ⚠disable_ irq - m5u_
rtc_ ⚠get_ date_ detail - m5u_
rtc_ ⚠get_ datetime - m5u_
rtc_ ⚠get_ datetime_ detail - m5u_
rtc_ ⚠get_ irq_ status - m5u_
rtc_ ⚠get_ time_ detail - m5u_
rtc_ ⚠get_ volt_ low - m5u_
rtc_ ⚠is_ enabled - m5u_
rtc_ ⚠set_ alarm_ irq_ after_ seconds - m5u_
rtc_ ⚠set_ alarm_ irq_ datetime - m5u_
rtc_ ⚠set_ alarm_ irq_ time - m5u_
rtc_ ⚠set_ date_ detail - m5u_
rtc_ ⚠set_ datetime - m5u_
rtc_ ⚠set_ datetime_ detail - m5u_
rtc_ ⚠set_ system_ time_ from_ rtc - m5u_
rtc_ ⚠set_ time_ detail - m5u_
rtc_ ⚠set_ timer_ irq - m5u_
sd_ ⚠begin - m5u_
sd_ ⚠begin_ spi - m5u_
sd_ ⚠end - m5u_
sd_ ⚠is_ mounted - m5u_
set_ ⚠log_ display_ index - m5u_
set_ ⚠log_ display_ type - m5u_
set_ ⚠log_ display_ types - m5u_
set_ ⚠primary_ display_ index - m5u_
set_ ⚠primary_ display_ type - m5u_
set_ ⚠primary_ display_ types - m5u_
set_ ⚠touch_ button_ height - m5u_
set_ ⚠touch_ button_ height_ by_ ratio - m5u_
speaker_ ⚠begin - m5u_
speaker_ ⚠channel_ playing_ state - m5u_
speaker_ ⚠end - m5u_
speaker_ ⚠get_ channel_ volume - m5u_
speaker_ ⚠get_ config - m5u_
speaker_ ⚠get_ volume - m5u_
speaker_ ⚠is_ enabled - m5u_
speaker_ ⚠is_ playing - m5u_
speaker_ ⚠is_ running - m5u_
speaker_ ⚠play_ i8_ ex - m5u_
speaker_ ⚠play_ i16 - m5u_
speaker_ ⚠play_ i16_ ex - m5u_
speaker_ ⚠play_ u8 - m5u_
speaker_ ⚠play_ u8_ ex - m5u_
speaker_ ⚠play_ wav - m5u_
speaker_ ⚠play_ wav_ ex - m5u_
speaker_ ⚠playing_ channels - m5u_
speaker_ ⚠set_ all_ channel_ volume - m5u_
speaker_ ⚠set_ channel_ volume - m5u_
speaker_ ⚠set_ config - m5u_
speaker_ ⚠set_ volume - m5u_
speaker_ ⚠stop - m5u_
speaker_ ⚠tone - m5u_
speaker_ ⚠tone_ ex - m5u_
speaker_ ⚠tone_ full - m5u_
speaker_ ⚠tone_ options - m5u_
touch_ ⚠count - m5u_
touch_ ⚠get - m5u_
touch_ ⚠get_ detail - m5u_
touch_ ⚠get_ raw - m5u_
touch_ ⚠is_ enabled - m5u_
touch_ ⚠set_ flick_ thresh - m5u_
touch_ ⚠set_ hold_ thresh - m5u_
update ⚠