3 ms·
No... But the drivers _are_ expected to implement a standardised interface. So whilst you're beholden to the OS on how to access it, it isn't an insanely obtuse
by shakna 7y ago
No... But the drivers _are_ expected to implement a standardised interface. So whilst you're beholden to the OS on how to access it, it isn't an insanely obtuse Android-style interface.
For example, if the driver implements iio/accel, like it should for a Linux device, then you can either use the C-interface (including via FFI), or just treat it like a file and read/write from it however you feel like in your chosen language.
You don't _have_ to use C, and C-style semantics, to get at the accelerometer. You can use any language that can either read/write files, or has an interface to FFI.
- monocasa 7y agoWhat's the standard driver interface for accessing accelerometers on Linux then?
- pantalaimon 7y agohttps://wiki.st.com/stm32mpu/wiki/IIO_overview https://wiki.st.com/stm32mpu/wiki/IIO_overview https://wiki.analog.com/software/linux/docs/iio/iio https://wiki.analog.com/software/linux/docs/iio/iio
- deleted 7y ago[deleted]
- monocasa 7y ago...and Linux input ...and one off interfaces based on driver.
- afiori 7y agoThe point of view of a mobile platform is that the more you expose of the hardware the more your future hardware is restricted.