Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11 Jan 2007 01:36 PM by  mikea@logicpd.com
Change disp_num runtime.
 6 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Dag
New Member
New Member
Posts:


--
02 Jan 2007 02:58 AM
    Hi,
    I have an application where I can use different displays. To select display I use the parameter disp_num when booting Windows. For the displays I use, the value of disp_num is either 0, 1 or 2. When Windows boots it is not always known what type of display I have connected. I would like to be able to first try disp_num = 0 for some seconds, and if this does not work, try disp_num = 1 for some seconds, and then disp_num = 2. When the displays looks ok the user touches the screen to accept the display. Does anybody know if this is possible? Any workarounds might also be of interrest.

    Dag
    richh@logicpd.com
    New Member
    New Member
    Posts:52


    --
    02 Jan 2007 10:10 AM
    Dag,
    I think to do what you want, you would need the source code for the drivers; our drivers don't currently support that. There are two options:

    1. License the driver code for LoCe and modify the display driver yourself.

    2. Contract with LogicPD to modify the display driver for you; you will receive the source code only for the modified driver.

    For more information, please contact Logic PD sales:

    http://www.logicpd.com/eps/sales.php

    Another possible option would be to create an application that ran under LoLo, confirmed which setting to use with the user, and then returned a value for use in a script that executed the appropriate command.
    Dag
    New Member
    New Member
    Posts:


    --
    03 Jan 2007 07:48 AM
    OK Rich,

    I have taught about making a sort of a workaround. I use a little boot script in dev/config that creates a yaffs partition. This bootscript calls the remaining boot commands from a startup file in the yaffs. The last line in the startup file might be like this:

    exec rtc:rtc_a404_int:dbg_serial:A404_UART:disp_num:0

    Now when Windows boots I check if the wakeup button is pressed. If pressed I start a display setup application. This application tries to use the display until the user accepts it before it times out. If it times out the display setup application increments the disp_num value in the startup file and then do a restart. Will the new value of disp_num be read when doing a restart from software with “SetSystemPowerState ( null, 0x00800000, 0x00000001 );”? If it doesn’t work I have to instruct the users to do a hard reset. Any comments are welcome.

    Dag
    richh@logicpd.com
    New Member
    New Member
    Posts:52


    --
    04 Jan 2007 02:04 PM
    Dag,
    I think you can do it in a better way, using return codes from a custom application that you run in LoLo. LoLo supports conditional scripting, and "jump" returns the return value of the executed code. I'm imagining a boot script more like

    jump CheckDisplayType
    if ( $? == 0 )
    exec rtc:rtc_a404_int:dbg_serial:A404_UART:disp_num:0
    endif
    if ( $? == 1 )
    exec rtc:rtc_a404_int:dbg_serial:A404_UART:disp_num:1
    endif
    if ( $? == 2 )
    exec rtc:rtc_a404_int:dbg_serial:A404_UART:disp_num:2
    endif

    #default
    exec rtc:rtc_a404_int:dbg_serial:A404_UART:disp_num:0


    You can make it really fancy by checking to see if the display type has already been checked before, etc.
    ggirzon
    New Member
    New Member
    Posts:


    --
    11 Jan 2007 11:43 AM
    What version of LoLo implements ==? I get the following in 2.0.6:

    losh> if ( $? == 0 )
    error: parser: syntax error
    error: parser: syntax error
    error: parser: syntax error
    error: parser: syntax error

    Thanks,

    Gary
    mikea@logicpd.com
    New Member
    New Member
    Posts:


    --
    11 Jan 2007 01:32 PM
    Dag,
    I would assume you are putting down the different displays in manufacturing. What I would suggest is connecting some jumper pins to GPIO from the card engine. Then, you can write a simple, short LogicLoader script that sets those GPIO up as inputs and reads the value. So, if you have 2 GPIO, you could get 4 different values (0,0 1,0 0,1 1,1) and you could use this for you if statement in LoLo to launch the correct display value.

    The jumper pins can be switched during manufacturing based on the display connected.

    I would be hesitant to have the user decide if the display is ok, it would perhaps look bad and take a while to boot if you the user had the last display on the if statement list.

    -Mike
    mikea@logicpd.com
    New Member
    New Member
    Posts:


    --
    11 Jan 2007 01:36 PM
    Gary,
    LogicLoader 2.3.x I believe is first released that will handle if(@?==1).

    We do not have a release of 2.3.x for the Sharp A40x boards yet, but I believe we will. I don't have a date on this.
    -Mike
    You are not authorized to post a reply.