flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > Non-x86 architectures > [linux] how to arrange for the arguments ioctl? | 
  
| Author | 
  | 
              
| 
                  
                   revolution 12 Nov 2015, 11:41 
                  sergo_mat: To load arbitrary constants you need to do it in more than one instruction, or use a LDR instruction and load from memory. To access memory pointers close to the code you can use ADR.     
                  
                Code: EVIOCGKEY = 0x4518 toch_desc = 0x12345678 sys_ioctl = 0x87654321 start_key: stmfd sp!,{r1-r2,r7,lr} ldr r7,[constant_toch_desc] ldr r0,[r7] ldr r1,[constant_EVIOCGKEY] adr r2,newt ldr r7,[constant_sys_ioctl] swi 0 ldmfd sp!,{r1-r2,r7,pc} ;return constant_EVIOCGKEY: dw EVIOCGKEY constant_toch_desc: dw toch_desc constant_sys_ioctl: dw sys_ioctl newt: dw 256 dup(?)  | 
              |||
                  
  | 
              
| 
                  
                   sergo_mat 12 Nov 2015, 11:56 
                  Thank you but the question is that how to arrange for the arguments ioctl 
 
                  
                to get data from the touchscreen /dev/input/event0  | 
              |||
                  
  | 
              
| 
                  
                   revolution 12 Nov 2015, 12:09 
                  sergo_mat: Your question appears to be related to your OS. Which OS are you using? 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   sergo_mat 12 Nov 2015, 12:12 
                  Linux 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   sergo_mat 12 Nov 2015, 12:14 
                  I have successfully open  /dev/input/event0      and get fd 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   sergo_mat 12 Nov 2015, 12:18 
                  Next, we need to use the argument ioctl  EVIOCGKEY and then there is a problem ioctl returns an error FFFFFFEA 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   Picnic 23 Feb 2016, 09:16 
                  sergo_mat are you trying to get the coordinates of touchscreen?
 
                  
                If you did, can you provide an arm code sample (or give a few more information on how).  | 
              |||
                  
  | 
              
| 
                  
                   sergo_mat 20 Jun 2016, 13:34 
                  You can obtain the coordinates tochskreen well as keystrokes but you need to read the size of the virtual file to find out whether or not it was touch 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   sergo_mat 07 Feb 2021, 09:05 
                  Help, can anyone come across trying to output sound through db "/ dev / snd / pcmC0D0p", 0 when opening decryptor = 3 but I can not write the structure using SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR ('A', 0x11, struct sndrv_pcm4_hw_params
 
                  
                SNDRV_PCM_IOCTL_HW_PARAMS =0xc25c4111 FFFFFFE7-ANSWER  | 
              |||
                  
  | 
              
| 
                  
                   Melissa 27 Sep 2021, 13:56 
                  take a look at source code of driver, and modify as needed 
                  
                 | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.