Re: Notification LED Support



but the nleddrv in C:\WINCE500\PLATFORM\At91rm9200\Src\Gwe\Nleddrv produces
only a TARGETTYPE=LIBRARY...

i have a nleddrvr.dll from C:\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\NLEDDRVR in
the flat release dir too

i really dont know how to solve my problem: handle led with notification led
support.


"Bruce Eitman [eMVP]" wrote:

So edit your platform.bib and add it, then edit platform.reg and add the
registry settings.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

"mfuser" <mfuser@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0B5A5ADE-5B62-4E53-8C33-A5A12A968EBA@xxxxxxxxxxxxxxxx
found out that in my bsp is a folder:

C:\WINCE500\PLATFORM\At91rm9200\Src\Gwe\Nleddrv

containing nleddrv.cpp with stubs for
- NLedDriverGetDeviceInfo
- NLedDriverSetDevice
- NLedDriverInitialize
- NLedDriverDllEntry
- NLedDriverPowerDown

after reading some articles it should by possible, that the notification
led
handling can be build for using via gwes OR as driver dll

but if i edit the file frome above nothing happens - the file was compiled
but it seems, that doesnt get used in the image (i added notification led
support from catalog).

"Michel Verhagen [eMVP]" wrote:

You got it.

Good luck,

Michel Verhagen, eMVP
Check out my blog: http://GuruCE.com/blog

GuruCE
Microsoft Embedded Partner
http://GuruCE.com
Consultancy, training and development services.

mfuser wrote:
i think i know what to do:

since the nleddriver in \WINCE500\PUBLIC\COMMON\OAK\DRIVERS\NLEDDRVR is
only
a 'sample driver' ('This module contains a sample Notification LED
(NLed)
driver for windows CE'):

1) clone the above sample driver for the bsp
2) add this cloned driver to os design
3) add notification led support

is this the right way ?

thanks

"Bruce Eitman [eMVP]" wrote:

Why isn't the NLED driver and its registry settings in the OS? I
suspect
that it is becuase the sample driver doesn't actually do anything, so
this
forces you to understand that and make changes to use it.

Why should you clone the driver to make changes? Becuase:
1. Microsoft may issue a QFE for it which would cancel your
changes
2. Your changes will apply to one specific platform, not all
future
platforms

Why is this different from adding .NETCF v2? Becuase you added NLED
**SUPPORT** not an NLED driver. So it is actually the same, when you
add
..NETCF, you are adding the support for applications, not actually
adding
..NETCF apps.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

"mfuser" <mfuser@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C3E75C88-0214-47DA-B4E1-9B7040939C01@xxxxxxxxxxxxxxxx
the entries are not in the reginit.ini and the dll is not listed in
the
ce.bib file...?!?
(the notification led driver was build fine...)

if i add for eg the .net cf v2 from core os everthing gets added fine
in
the
image and i can use the .net cf v2 with success

why i can add the notification led support from core os if i dont
should
use
it from there (better : clone it to bsp) ?

the only file i would to edit is the snled.cpp for overriding the
functions:
// NLedDriverPowerDown
// NLedDriverGetDeviceInfo
// NLedDriverSetDevice
// NLedDriverInitialize
// NLedDriverDeInitialize

thank you for great help support !



"Michel Verhagen [eMVP]" wrote:

Check reginit.ini in your FLATRELEASEDIR and see if the registry
entries
are in that file. Then check ce.bib in the FLATRELEASEDIR and see if
the
dll is listed under the MODULES section.

If that's all good then the driver should be called and the
breakpoint
should break. The debugmessage probably doesn't fire because you
have to
rebuild the NLED driver before you will get that message.

If the registry or bib settings are not there you should read this:
http://guruce.com/blogpost/whattobuildwhen

I don't know if you know, but you should NEVER EVER change any code
in
the PUBLIC or PRIVATE or PLATFORM tree that is not entirely your
code.
In your case you'll have to clone the NLED driver to your BSP or to
a
workspace subproject and make changes from there.

For help on cloning read this:
http://guruce.com/blogpost/cloningpubliccodeanexample

and if that doesn't do the trick, read this:
http://guruce.com/blogpost/manualcloneofpubliccode


Good luck,

Michel Verhagen, eMVP
Check out my blog: http://GuruCE.com/blog

GuruCE
Microsoft Embedded Partner
http://GuruCE.com
Consultancy, training and development services.

mfuser wrote:
i use win ce 5.0 - debug build
from catalog i select [Core OS] -> [Windows CE devices] -> [Core OS
Services] -> [Notification LED Support]

the source is in \WINCE500\PUBLIC\COMMON\OAK\DRIVERS\NLEDDRVR

i have a breakpoint and a debugmsg in function 'Init'
(nleddrvr.cpp)
and
'NLedDriverInitialize' (snled.cpp)

nleddrvr.reg looks :

;
; Copyright (c) Microsoft Corporation. All rights reserved.
;
;
; Use of this source code is subject to the terms of the Microsoft
end-user
; license agreement (EULA) under which you licensed this SOFTWARE
PRODUCT.
; If you did not accept the terms of the EULA, you are not
authorized
to use
; this source code. For a copy of the EULA, please see the
LICENSE.RTF
on your
; install media.
;

IF BSP_NONLED !

; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE\System\Events]
"SYSTEM/NLedAPIsReady"="Notification LED APIs"

; END HIVE BOOT SECTION

; These registry entries load the NLed driver. The IClass value
must
match
; the NLED_DRIVER_CLASS definition in nled.h -- this is how the
system
; knows which device is the battery driver. Note that we are using
; DEVFLAGS_NAKEDENTRIES with this driver. This tells the device
manager
; to instantiate the device with the prefix named in the registry
but
to look
; for DLL entry points without the prefix. For example, it will
look
for Init
; instead of NLD_Init. This allows the prefix to be changed in the
registry
(if
; desired) without editing the driver code.
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\NLed]
"Prefix"="NLD"
"Dll"="nleddrvr.dll"
"Flags"=dword:8 ; DEVFLAGS_NAKEDENTRIES
"Order"=dword:0
"IClass"="{CBB4F234-F35F-485b-A490-ADC7804A4EF3}"

ENDIF BSP_NONLED !



"mike" wrote:

I am asking the same question again. Did you added the naked entry
flag in registry?

~~Mike
www.wince-india.blogspot.com







.



Relevant Pages

  • Re: Notification LED Support
    ... My BLOG http://geekswithblogs.net/bruceeitman ... a 'sample driver' ('This module contains a sample Notification LED ... // NLedDriverGetDeviceInfo ... If the registry or bib settings are not there you should read this: ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Notification LED Support
    ... The word that you are looking for is "clone". ... a 'sample driver' ('This module contains a sample Notification LED ... // NLedDriverGetDeviceInfo ... If the registry or bib settings are not there you should read ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Notification LED Support
    ... driver for windows CE'): ... clone the above sample driver for the bsp ... // NLedDriverGetDeviceInfo ... If the registry or bib settings are not there you should read this: ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Notification LED Support
    ... Why isn't the NLED driver and its registry settings in the OS? ... // NLedDriverPowerDown ...
    (microsoft.public.windowsce.platbuilder)