All Forums
 Microsoft Windows CE
 CE Sample Applications and Utilities
 eVC - ADSmartIO wrapper class
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

ctacke

877 Posts

Posted - 03 Jul 2003 :  09:43:52  Show Profile  Email Poster

ADSmartIO wrapper class

This helper class wraps the ADSmartIO functions and exposes them in a class hierarchy providing a layer of object safety and the ability to validate parameters. The class constructor dynamically binds to the ADSmartIO library on the device.

Source Download

Rev 3, 31-Aug-2005 (3k zip)




For a C# version of this library, see Topic 443
For a VB.NET version of this library, see Topic 895

Key APIs Used

SIOSetSSPTimeout
SIOFirmwareVersion
SIOReadKeypad
SIOSetKeyPadSize
SIOAnalogConversion
SIOSelectOption
SIOBackLightVEEPwm
SIOBackLightPwm
SIOBackLightON
SIOBackLightOFF
SIOReadDeviceVersion
SIOReadDevicePartType
SIOWritePortA
SIOWritePortB
SIOWritePortC
SIOWritePortD
SIOInitDDRA
SIOInitDDRB
SIOInitDDRC
SIOInitDDRD
SIOReadPortA
SIOReadPortB
SIOReadPortC
SIOReadPortD
SIOReadEEPROM
SIOWriteEEPROM


Lines of Code: 270




modified Aug 31, 05 (ctacke) - rev 3 download (added WritePort[n] functions)
modified July 18, 03 (ctacke) - rev 2 download

dbrisbois

27 Posts

Posted - 07 Jul 2003 :  10:04:37  Show Profile  Email Poster
I am running OS 4.10.19 on a BitsyX (the one with file viewers). Unfortunately, the wrapper class fails to load SMARTIO.dll. I looked for the dll in the Windows directory but could not find it. I was under the impression that SMARTIO.dll was part of the build. Does it live somewhere else or is it not included in the build? If it is not included in the build, how can I get it?
Go to Top of Page

dbrisbois

27 Posts

Posted - 07 Jul 2003 :  10:15:05  Show Profile  Email Poster
I should note, keybddr.dll does load. However, when I call ADSmartIO.SetBacklightState (FALSE) I get a data abort message and the system hangs. Here is the debug output.

SMARTIO Detected : PartType=0x8535 Firmware=0x0010 Revision=2
SMARTIO : SerialClockRate=10 KBits/S(0xa7).


Microsoft Windows CE Ver. 4.10 (build 908)

BitsyX Windows CE Ver.(4.10.19)


Loading SMARTIO.DLL...

Can't find SMARTIO.DLL

Loading KEYBDDR.DLL...

KEYBDDR.DLL Loaded successfully...
Loading ADSmartIO functions . ok
CBacklighttestDlg::OnInitDialog - turning the backlight off.
Data Abort: Thread=82115a48 Proc=8174fabc 'Backlight test.exe'
AKY=00000801 PC=000d1d84 RA=000118b8 BVA=18000110 FSR=00000007
SENDING command id 0x03E8 to CDialog target.
Go to Top of Page

ctacke

877 Posts

Posted - 18 Jul 2003 :  09:58:14  Show Profile  Email Poster
Rev 2 Update

Dave,

Good catch. Rev 1 didn't have a GetProcAddress call for the BackLight functions. I've made the fixes in rev 2 as well as adding safety checks in all functions to ensure that only calls to successfully loaded functions can be made.
Go to Top of Page

colled

5 Posts

Posted - 25 Jul 2003 :  06:21:43  Show Profile  Email Poster
I would also like to know where SMARTIO.DLL is located (or installed from). I'm using a Bitsy Plus with CE.net 4.13 and don't have this dll in my windows directory.

Edited by - colled on 25 Jul 2003 06:30:19
Go to Top of Page

ctacke

877 Posts

Posted - 25 Jul 2003 :  06:54:50  Show Profile  Email Poster
Some ADS platfroms have SMARTIO.DLL, some have KEYBDDR.DLL, but none have both. The wrapper library works on all platforms, and therefore must look for both and link to whichever it finds.
Go to Top of Page

esavolle

31 Posts

Posted - 26 Sep 2003 :  07:45:04  Show Profile  Email Poster
Hi
I would like to know if the two dll provide the same functionality.
Can we configure the SmartIO ports identically with both dll ? Or is there some limitation with KEYBDDR.DLL (e.g. ports A & B locked on keypad configuration) ?

thanks for any answer

eric
Go to Top of Page

ctacke

877 Posts

Posted - 26 Sep 2003 :  09:31:02  Show Profile  Email Poster
Both SMARTIO.DLL and KEYBDDR.DLL export the same functions and have the same functionality.
Go to Top of Page

esavolle

31 Posts

Posted - 26 Sep 2003 :  09:36:48  Show Profile  Email Poster
OK thanks for the answer
I was a bit confused

eric
Go to Top of Page

akidder

1519 Posts

Posted - 26 Sep 2003 :  12:01:56  Show Profile  Email Poster
#ADSmartio_dll_name

Background information: Keybddr.dll and SmartIO.dll

On many of our products (GC Plus, AGX, Bitsy family, et al), the ADSmartIO controller handles input from the PS/2 keyboard. CE requires that the keyboard driver library be named keybddr.dll. Since we had to put the keyboard portion of the ADSmartIO functionality into that dll, we included the rest as well.

On some other products (e.g. Graphics Master), the SA-1111 handles PS/2 keyboard input. Because there was already a keybddr.dll for that driver, we had to put the ADSmartIO functions in a different library (smartio.dll).

Both DLLs have the same functionality. Only one is included in each build of CE. You can edit our sample source code to display a message that is most informative to you.
Go to Top of Page

akidder

1519 Posts

Posted - 06 Sep 2005 :  18:35:13  Show Profile  Email Poster
Rev 3 Update

We've uploaded revision 3 of this library, which adds a couple WritePort functions that were formerly missing.

Errata
- The WritePort() methods have an error. They are missing the value parameter.
- You might also remove the return statement from the WritePort() methods, since those methods don't return any values.


Edited by akidder 6-Apr-2006: Add erratum about WritePort methods
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000