Jump to content

nimaltd

Members
  • Posts

    41
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. How to start virtual keyboard in numeric mode?
  2. nimaltd

    8bit interface

    #define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_BGR565 its work .
  3. nimaltd

    8bit interface

    I try all of them. but my color is wrong .
  4. nimaltd

    8bit interface

    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; }
  5. nimaltd

    8bit interface

    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.
  6. nimaltd

    8bit interface

    and please tell me about FSMC initlizing on cubemx
  7. nimaltd

    8bit interface

    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; }
  8. Hello. How to use ILI9327 chip ?
  9. 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(.......
  10. I enter some character by keyboard and see all on text edit. How can i reset textedit for use keyboard again. I use gwinsettext(ghtext,"",true) for erase text box. But when i push keyboard my system hang.
  11. nimaltd

    update screen

    How can I update or refresh display after changing text or another value ?
  12. 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
  13. 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;
  14. I use stm32f4 . ssd1289 , ov7670 my picture is 160*120 in RGB565 mode. how can I draw my image in ram to display. I create imagebox but no display anythings gwinImageOpenMemory(ghImagebox_Camera,CameraBuffer); << this function. if I must enable pixmap , help me about it . I cant compile my project when enabled pixmap. I have 30 error. like this error ..\ugfx_library\src\gdisp/gdisp_pixmap.c(83): error: #20: identifier "GDISPVMT_pixmap" is undefined thanks a lot
  15. nimaltd

    Changing text

    How can i change text of a lable in another file exept gui.c I want to change a lable in my main file.
×
×
  • Create New...