Jump to content

nimaltd

Members
  • Posts

    41
  • Joined

  • Last visited

Posts posted by nimaltd

  1. 7 hours ago, inmarket said:

    This doesn't look like a rtl problem. The glyphs are not the same regardless of order. That indicates a problem with the font not its display direction.

    no. this is not RTL problem. I want to solve Farsi font by Picture.

  2. Thank you for your application and library.

    1) when I can download v0.20 ?

    2) on cubeMx we can generate new code without delete old code. i you make your studio like that, it very good.

    // begin user code

     

    // end user code

  3.  FSMC_NORSRAM_TimingTypeDef Timing;

      /** Perform the SRAM1 memory initialization sequence
      */
      hsram1.Instance = FSMC_NORSRAM_DEVICE;
      hsram1.Extended = FSMC_NORSRAM_EXTENDED_DEVICE;
      /* hsram1.Init */
      hsram1.Init.NSBank = FSMC_NORSRAM_BANK1;
      hsram1.Init.DataAddressMux = FSMC_DATA_ADDRESS_MUX_DISABLE;
      hsram1.Init.MemoryType = FSMC_MEMORY_TYPE_SRAM;
      hsram1.Init.MemoryDataWidth = FSMC_NORSRAM_MEM_BUS_WIDTH_16;                               <<<< not work in 8 bit.. I dont know why. 
      hsram1.Init.BurstAccessMode = FSMC_BURST_ACCESS_MODE_DISABLE;
      hsram1.Init.WaitSignalPolarity = FSMC_WAIT_SIGNAL_POLARITY_LOW;
      hsram1.Init.WrapMode = FSMC_WRAP_MODE_DISABLE;
      hsram1.Init.WaitSignalActive = FSMC_WAIT_TIMING_BEFORE_WS;
      hsram1.Init.WriteOperation = FSMC_WRITE_OPERATION_ENABLE;
      hsram1.Init.WaitSignal = FSMC_WAIT_SIGNAL_DISABLE;
      hsram1.Init.ExtendedMode = FSMC_EXTENDED_MODE_DISABLE;
      hsram1.Init.AsynchronousWait = FSMC_ASYNCHRONOUS_WAIT_DISABLE;
      hsram1.Init.WriteBurst = FSMC_WRITE_BURST_DISABLE;
      /* Timing */
      Timing.AddressSetupTime = 2;
      Timing.AddressHoldTime = 2;
      Timing.DataSetupTime = 5;
      Timing.BusTurnAroundDuration = 0;
      Timing.CLKDivision = 2;
      Timing.DataLatency = 2;
      Timing.AccessMode = FSMC_ACCESS_MODE_B;

     

     

    /////////////////////////////

     

     

        LLDSPEC    void gdisp_lld_write_color(GDisplay *g)
      {
            write_data(g, gdispColor2Native(g->p.color)>>8);
        write_data(g, gdispColor2Native(g->p.color));
        }

     

    /////////////////////////////

     


    static GFXINLINE void write_index(GDisplay *g, uint16_t index)
    {
        (void) g;
      GDISP_REG = index;
    }

    static GFXINLINE void write_data(GDisplay *g, uint16_t data)
    {
        (void) g;
      GDISP_RAM = data;
    }
     

     

     

     

     

     

     

  4. its true. I use lcd  module. its work fine with example.

    i drive now. but have a problem. my color is wrong.my display size is wrong.

    this is my calibration window.

    i change initlize register. but no diftrent.

    photo_2017-03-05_08-52-40.jpg

  5. I use stm32f103VE in FSMC 8bit. my lcd is ili9481 in 8 bit interface. how can config my lcd ? i cant drive it .

    its not work.

    #define GDISP_REG              ((volatile uint16_t *) 0x60000000)[0] /* RS = 0 */
    #define GDISP_RAM              ((volatile uint16_t *) 0x60FF0000)[0] /* RS = 1 */

    static GFXINLINE void init_board(GDisplay *g) {
        (void) g;
      HAL_TIM_PWM_Start(&htim2,TIM_CHANNEL_2);
      
    }

    static GFXINLINE void post_init_board(GDisplay *g) {
        (void) g;
    }

    static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
        (void) g;
        HAL_GPIO_WritePin(LCD_RST_GPIO_Port,LCD_RST_Pin,(GPIO_PinState) !state);
    }

    static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
        (void) g;
        if(percent > 99)
            percent = 99;
        htim2.Instance->CCR2 = percent;
    }

    static GFXINLINE void acquire_bus(GDisplay *g) {
        (void) g;
    }

    static GFXINLINE void release_bus(GDisplay *g) {
        (void) g;
    }

    static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
        (void) g;
      GDISP_REG = index&0x00ff;
    }

    static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
        (void) g;
      
      GDISP_RAM = (data>>8);
      GDISP_RAM = data&0x00ff;
    }

    static GFXINLINE void setreadmode(GDisplay *g) {
        (void) g;
    }

    static GFXINLINE void setwritemode(GDisplay *g) {
        (void) g;
    }

    static GFXINLINE uint16_t read_data(GDisplay *g) {
        (void) g;
      uint16_t data;

      data = (GDISP_RAM<<8);  
      data |= GDISP_RAM;

      
        return data;
    }
     

  6. use this function for create keyboard and textbox

    static void createPagePage2(void)
    {
        GWidgetInit wi;
        gwinWidgetClearInit(&wi);
    
    
        // create container widget: ghContainerPage2
        wi.g.show = FALSE;
        wi.g.x = 0;
        wi.g.y = 0;
        wi.g.width = 240;
        wi.g.height = 320;
        wi.g.parent = 0;
        wi.text = "Container";
        wi.customDraw = 0;
        wi.customParam = 0;
        wi.customStyle = 0;
        ghContainerPage2 = gwinContainerCreate(0, &wi, 0);
    
        // Create textedit widget: ghTextedit_FileName
        wi.g.show = TRUE;
        wi.g.x = 100;
        wi.g.y = 30;
        wi.g.width = 130;
        wi.g.height = 30;
        wi.g.parent = ghContainerPage2;
        wi.text = "";
        wi.customDraw = gwinTexteditDefaultDraw;
        wi.customParam = 0;
        wi.customStyle = 0;
        ghTextedit_FileName = gwinTexteditCreate(0, &wi, 8);
    
        // Create label widget: ghLabel1
        wi.g.show = TRUE;
        wi.g.x = 10;
        wi.g.y = 30;
        wi.g.width = 90;
        wi.g.height = 30;
        wi.g.parent = ghContainerPage2;
        wi.text = "File Name :";
        wi.customDraw = gwinLabelDrawJustifiedLeft;
        wi.customParam = 0;
        wi.customStyle = 0;
        ghLabel1 = gwinLabelCreate(0, &wi);
        gwinLabelSetBorder(ghLabel1, FALSE);
    
        // Create keyboard widget: ghKeyboard1
        wi.g.show = TRUE;
        wi.g.x = 0;
        wi.g.y = 110;
        wi.g.width = 250;
        wi.g.height = 180;
        wi.g.parent = ghContainerPage2;
        wi.text = "Keyboard1";
        wi.customDraw = gwinKeyboardDraw_Normal;
        wi.customParam = 0;
        wi.customStyle = 0;
        ghKeyboard1 = gwinKeyboardCreate(0, &wi);
    }

    I have no problem in first time use.

    but when I want use again this keyboard , I must be empty text box and use again , I call   gwinsettext(ghTextedit_FileName,"",TRUE)   for emty text box.

    and  I call this page , Now when I push any key on keyboard system Hang . call assert(.......

  7. gwinCheckboxIsChecked(ghCheckbox_RunMode)

    I think  this function cant return (TRUE==1)

    see my test function . return FALSE correctly but cant return TRUE correctly.

    when I use (else) work correctly   

  8. this code works ::

        case GEVENT_GWIN_CHECKBOX:
                    if(((GEventGWinCheckbox*)pe)->gwin == ghCheckbox_RunMode)
                    {
                        
                        if( gwinCheckboxIsChecked(ghCheckbox_RunMode) == FALSE )
                        {
                            RunMode = false;
                            Stop();
                            gwinSetText(ghLabelPlayingItem," Stop!",true);
                        }
                        else
                        {
                            RunMode = true;
                            gwinSetText(ghLabelPlayingItem,"" ,true);
                        }
                        
                    }
    
                break;

     

    but this code do not work :: 

        case GEVENT_GWIN_CHECKBOX:
                    if(((GEventGWinCheckbox*)pe)->gwin == ghCheckbox_RunMode)
                    {
                        
                        if( gwinCheckboxIsChecked(ghCheckbox_RunMode) == FALSE )
                        {
                            RunMode = false;
                            Stop();
                            gwinSetText(ghLabelPlayingItem," Stop!",true);
                        }
                         if( gwinCheckboxIsChecked(ghCheckbox_RunMode) == TRUE )
                        {
                            RunMode = true;
                            gwinSetText(ghLabelPlayingItem,"" ,true);
                        }
                        
                    }
    
                break;

     

×
×
  • Create New...