Yesterday 23:29
Forum: Proton Plus Compiler v3
Starter: Tim
Views: 0
Replies: 3
Yesterday 21:44
Forum: Proton Plus Compiler v3
Starter: IstvanK
Views: 0
Replies: 3
Yesterday 18:17
Forum: LCD module
Starter: towlerg
Views: 0
Replies: 2
Yesterday 18:06
Forum: Proton Users File Server
Starter: Dompie
Views: 0
Replies: 0
Yesterday 16:56
Forum: Proton Plus Compiler v3
Starter: Henk57
Views: 0
Replies: 10
Go to last post By: Lester
Yesterday 14:50
Forum: Website / Forum Issues
Starter: Lester
Views: 0
Replies: 16
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Select a choice of include file89 days old

  1. #1
    Member Dave-S's Avatar
    Join Date
    Sep 2004
    Posts
    260
    Thumbs Up
    Received: 5
    Given: 0
    Total Downloaded
    268.81 MB

    0 Not allowed!

    Default Select a choice of include file

    Is there any way to select a choice of a include file, ie: by holding a button connected to a Pin?

  2. #2
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,360
    Thumbs Up
    Received: 49
    Given: 124
    Total Downloaded
    2.37 GB

    0 Not allowed!

    Default Re: Select a choice of include file

    Yes of course, the only downside is that all possible include files would have to be compiled and use space in ROM.

    If you only had two include files a single button would work, if hi GOTO first label in Include A, if low GOTO first label in Include B
    George

  3. #3
    Member Dave-S's Avatar
    Join Date
    Sep 2004
    Posts
    260
    Thumbs Up
    Received: 5
    Given: 0
    Total Downloaded
    268.81 MB

    0 Not allowed!

    Default Re: Select a choice of include file

    Quote Originally Posted by towlerg View Post
    Yes of course, the only downside is that all possible include files would have to be compiled and use space in ROM.

    If you only had two include files a single button would work, if hi GOTO first label in Include A, if low GOTO first label in Include B
    This is for a USB project so there are quite a few include files, but the only one I want to be able to select is the Descriptor file.

    Thanks David

  4. #4
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,360
    Thumbs Up
    Received: 49
    Given: 124
    Total Downloaded
    2.37 GB

    0 Not allowed!

    Default Re: Select a choice of include file

    are you trying to create a composite devise?
    George

  5. #5
    Member Dave-S's Avatar
    Join Date
    Sep 2004
    Posts
    260
    Thumbs Up
    Received: 5
    Given: 0
    Total Downloaded
    268.81 MB

    0 Not allowed!

    Default Re: Select a choice of include file

    Quote Originally Posted by towlerg View Post
    are you trying to create a composite devise?
    Well yes, I have a special Keyboard system which I want to be able to access via a PC program to change layouts by changing values stored in the EEProm, and was told I need to set it up as a two device, one as Keyboard and one as a HID genetic/composite device. I cannot get that to work and found the keyboard or genetic code both work on their own so thought if I could somehow select which descriptor to load would be ok.

    Thanks David

  6. #6
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,360
    Thumbs Up
    Received: 49
    Given: 124
    Total Downloaded
    2.37 GB

    0 Not allowed!

    Default Re: Select a choice of include file

    I don't know of an example of a composite device using Proton. Essentially you need to merge the two descriptors.

    How do you select layouts?

    I don't see what the HID is doing.
    George

  7. #7
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,360
    Thumbs Up
    Received: 49
    Given: 124
    Total Downloaded
    2.37 GB

    0 Not allowed!

    Default Re: Select a choice of include file

    Any progress?
    George

  8. #8
    Member Dave-S's Avatar
    Join Date
    Sep 2004
    Posts
    260
    Thumbs Up
    Received: 5
    Given: 0
    Total Downloaded
    268.81 MB

    0 Not allowed!

    Default Re: Select a choice of include file

    Quote Originally Posted by towlerg View Post
    Any progress?
    The different layouts are selected by reading from the EEprom.

    I have merged the two descriptors and it loads two devices one keyboard and one HID Input device, but the Visual Studio programme still will not access the non Keyboard device and states "It is a Keyboard and Windows has exclusive access rights"

    Thanks DAVID

  9. #9
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,360
    Thumbs Up
    Received: 49
    Given: 124
    Total Downloaded
    2.37 GB

    0 Not allowed!

    Default Re: Select a choice of include file

    The driver software for the keyboard (and mouse) is part of the OS so the only way you can access the keyboard is through the Win API eg. GetRawInputData. If you don't want this to be the case you need to use a different class and write your own driver (and I suggest you don't want to go there).

    I still don't understand how you switch between layouts and what the HID is doing.
    George

  10. #10
    Member Dave-S's Avatar
    Join Date
    Sep 2004
    Posts
    260
    Thumbs Up
    Received: 5
    Given: 0
    Total Downloaded
    268.81 MB

    0 Not allowed!

    Default Re: Select a choice of include file

    Quote Originally Posted by towlerg View Post
    The driver software for the keyboard (and mouse) is part of the OS so the only way you can access the keyboard is through the Win API eg. GetRawInputData. If you don't want this to be the case you need to use a different class and write your own driver (and I suggest you don't want to go there).

    I still don't understand how you switch between layouts and what the HID is doing.
    The layouts USB HID Hex key codes are in variables which are looked up when keys are pressed, to change the program reads from EEPROM and updates the variables. HID Keyboard is the standard USB HID protocol, see Demo programme in Proton USB HID Stack.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Include file name
    By towlerg in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 16th July 2015, 06:48
  2. Missing Include file not detected
    By RGV250 in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 9th May 2014, 12:14
  3. Observation on PDS's choice of file locations
    By johngb in forum Proton Plus Compiler v3
    Replies: 4
    Last Post: 4th December 2010, 19:11
  4. possible problem with include file?
    By TheNewGuy in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 15th July 2007, 04:21

Members who have read this thread since 20th November 2017, 19:09 : 0

Actions :  (Set Date)  (Clear Date)

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts