Hi Umit,

Variables of the opersyshw_device_t type are actually used in com_android_server_OpersysService.cpp, as you can see above. There isn't, however, a global "opersyshw_dev" in that file to hold the value being played with. Instead, the pointer returned by hw_get_module() is passed up to the Java layer and reused when passed later to read() and write().

Sure, you can use this sample with its driver on an actual device, it'll work just fine. The actual module though ought to be in device/manufacturer/product instead of sdk/emulator.

--
Karim Yaghmour
CEO - Opersys inc. / www.opersys.com
http://twitter.com/karimyaghmour


On 12-07-10 11:29 AM, Ümit Uzun wrote:
Hi Karim,

I think there is forgotton "opersyshw_device_t* opersyshw_dev;" variable on com_android_server_OperSysService.cpp unless I don't understand the meaning of that?

Do you think we can use this sample on actual device? I think we should implement opersyshw.h on libhardware like emulator based implemantation or not?

Thanks in advance.

10 Temmuz 2012 Salı 04:54:27 UTC+3 tarihinde Karim Yaghmour yazdı:


    Given the recent questions/discussions regarding how the HAL works
    and/or how to extend it, I've written a blog post that explains this:
    http://www.opersys.com/blog/extending-android-hal
    <http://www.opersys.com/blog/extending-android-hal>

    Have a look within the blog for links to the related github code.

-- Karim Yaghmour
    CEO - Opersys inc. / www.opersys.com <http://www.opersys.com>
    http://twitter.com/karimyaghmour <http://twitter.com/karimyaghmour>

--
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting


--
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to