3 ms·
And dont forget they like you to use the preferred language for the environment.
by phkahler 7y ago
And dont forget they like you to use the preferred language for the environment.
- g_p 7y agoYeah I never understood why everything should be so tightly bound to a single language... We mastered the idea of different software on a desktop PC using different languages a long time ago. Yet on mobile, given the fragmented and non-standardised ARM ecosystem and runtime environment, we have to put up with the complex abstractions given to us by the operating system... I can't access the accelerometer without using the blessed Google API for it, because I can't know where on earth the user's phone manufacturer saw fit to put it, nor even what chip they used... At least on x86 PC we got most of this stuff nailed down long ago, and we can boot an operating system without the permission of our motherboard maker and CPU designer.
- monocasa 7y agoIt's not like accelerometers are standardized hardware on PC platforms either.
- shakna 7y agoNo... 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.