왼쪽은 golang의 touchscreen uinput 기능을 이용한 것, 오른쪽은 uinput 예제에서 설정한 것인데

UI_DEV_SETUP 대신 write로 쓰는게 좀.. 특이하다. 

그리고 write로 장치 이름을 쓰고 1116 바이트가 써졌다라..

ioctl(3, UI_SET_EVBIT, 0x1)             = 0
ioctl(3, UI_SET_KEYBIT, 0x110)          = 0
ioctl(3, UI_SET_KEYBIT, 0x111)          = 0
ioctl(3, UI_SET_KEYBIT, 0x14a)          = 0

ioctl(3, UI_SET_EVBIT, 0x3)             = 0
ioctl(3, UI_SET_ABSBIT, 0)              = 0
ioctl(3, UI_SET_ABSBIT, 0x1)            = 0

write(3, "testpad\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1116) = 1116
ioctl(3, UI_DEV_CREATE, 0)              = 0
ioctl(3, UI_SET_EVBIT, 0x1)             = 0
ioctl(3, UI_SET_KEYBIT, 0x110)          = 0
ioctl(3, UI_SET_KEYBIT, 0x111)          = 0
ioctl(3, UI_SET_KEYBIT, 0x14a)          = 0

ioctl(3, UI_SET_EVBIT, 0x3)             = 0
ioctl(3, UI_SET_ABSBIT, 0)              = 0
ioctl(3, UI_SET_ABSBIT, 0x1)            = 0

ioctl(3, UI_DEV_SETUP, 0x7ffc48a87ef0)  = 0
ioctl(3, UI_DEV_CREATE, 0)              = 0

 

struct uinput_user_dev   uinp;

            // create input device in input subsystem
            retcode = write(ufile, &uinp, sizeof(uinp));
            printf("First write returned %d.\n", retcode);

First write returned 1116.

[링크 : https://hybridego.net/1823]

 

sturct uinput_setup 은 92 바이트 길이

#define UINPUT_MAX_NAME_SIZE 80
struct uinput_setup {
struct input_id id;
char name[UINPUT_MAX_NAME_SIZE];
__u32 ff_effects_max;
};

[링크 : https://elixir.bootlin.com/linux/v4.7/source/include/uapi/linux/uinput.h#L66]

 

struct uinput_user_dev도 그리 길어 보이진 않는데..

#define UINPUT_MAX_NAME_SIZE 80
struct uinput_user_dev {
char name[UINPUT_MAX_NAME_SIZE];
struct input_id id;
__u32 ff_effects_max;
__s32 absmax[ABS_CNT];
__s32 absmin[ABS_CNT];
__s32 absfuzz[ABS_CNT];
__s32 absflat[ABS_CNT];
};

[링크 : https://elixir.bootlin.com/linux/v4.0/source/include/uapi/linux/uinput.h#L148]

 

64개까지 등록 가능하도록 되어있는건가?

#define ABS_MAX 0x3f
#define ABS_CNT (ABS_MAX+1)

[링크 : https://github.com/spotify/linux/blob/master/include/linux/input.h]

 

+

uinput old interface 로 분류된 구조체인듯..

Programs supportinf older versions of uinput interface need to fill a uinput_user_dev structure and write it to the uinput file descriptor to configure the new uinput device

[링크 : https://www.kernel.org/doc/html/v4.12/input/uinput.html]

Posted by 구차니

尹대통령 지지율 '24%'..긍정 평가 이유 1위 '모름·응답거절'

[링크 : https://news.v.daum.net/v/20220805110215751]

'개소리 왈왈 > 정치관련 신세한탄' 카테고리의 다른 글

한국 대통령 미국 의회에서 망언?  (0) 2022.09.22
어느쪽이 거짓말을 하는걸까  (4) 2022.08.29
참 투명하구만  (0) 2022.07.12
도어 스테핑?  (0) 2022.07.11
일본 아베 총 맞아  (0) 2022.07.08
Posted by 구차니

golang의 예제로는 원하는대로 절대 좌표 이동이 되는데..

C로 하는건 영 안되네 ㅠㅠ 무슨 차이냐!!!

 

[링크 : https://pkg.go.dev/github.com/bendahl/uinput#section-readme]

[링크 : https://github.com/torvalds/linux/blob/master/include/uapi/linux/uinput.h]

[링크 : https://github.com/bendahl/uinput/blob/master/touchpad.go]

Posted by 구차니

uinput에 대한 이벤트 로그를 dmesg를 통해 볼 수 있게 해주는 디버그용 모듈

 

$ sudo modprobe evbug

[링크 : https://www.linuxquestions.org/questions/debian-26/how-to-disable-the-evbug-module-478529/]

[링크 : https://copyprogramming.com/howto/simulating-absolute-mouse-movements-in-linux-using-uinput] << 링크 깨짐

'프로그램 사용 > uinput' 카테고리의 다른 글

struct uinput_setup 와 struct uinput_user_dev  (0) 2022.08.05
uinput 터치 스크린 예제  (0) 2022.08.05
uinput 장치 확인  (0) 2022.03.04
uinput absolute mouse  (0) 2022.02.23
xmodmap  (0) 2022.02.21
Posted by 구차니
프로그램 사용/vi2022. 8. 4. 11:25

ctrl-o, ctrl-i

 

오오 만세!

[링크 : https://kldp.org/node/98528]

'프로그램 사용 > vi' 카테고리의 다른 글

vi가 늦게 켜지는 이유  (0) 2022.07.28
vim 색상 바꾸기(colorscheme)  (0) 2021.01.20
vi 에서 매칭되는 갯수 확인하기  (0) 2019.12.18
vi gg=G와 set ts  (0) 2019.07.04
vi 검색 취소하기  (0) 2019.06.04
Posted by 구차니

램프라고 하니 lamp가 떠올라서 찾아봤더니 ramp 였고, sawtooth 와 동일한 파형이라고 보면 될 듯.

 

(높이가 다른 두 도로건물 등의 사이를 연결하는) 경사로, 램프
램프(화물 적재항공기 탑승 등을 위한 경사면경사 계단)

[링크 : https://en.dict.naver.com/#/entry/enko/19eee00cabdf44b38c5b05a91593296f]

The sawtooth wave (or saw wave) is a kind of non-sinusoidal waveform. It is so named based on its resemblance to the teeth of a plain-toothed saw with a zero rake angle. A single sawtooth, or an intermittently triggered sawtooth, is called a ramp waveform.
The convention is that a sawtooth wave ramps upward and then sharply drops. In a reverse (or inverse) sawtooth wave, the wave ramps downward and then sharply rises. It can also be considered the extreme case of an asymmetric triangle wave.

[링크 : https://en.wikipedia.org/wiki/Sawtooth_wave]

 

[링크 : https://rfmw.em.keysight.com/spdhelpfiles/33500/webhelp-mobile/KR/Advanced/Content/_Programming%20Examples_/03%20-%20Configure%20a%20Ramp%20Wave.htm]

 

[링크 : https://www.quora.com/Does-a-sawtooth-wave-sound-different-from-a-ramp-reverse-saw-wave]

'이론 관련 > 전기 전자' 카테고리의 다른 글

TVS 다이오드  (0) 2022.08.18
헤테로다인  (0) 2022.08.08
PID 제어... 2?  (0) 2022.06.20
12V 에서 저항으로 5V 만들...기?  (0) 2022.06.16
a/w  (0) 2022.06.02
Posted by 구차니

diode laser는 전류로 구동되는 애라

전압은 고정하고 전류를 100~150mA 로 오락가락(?)하게 보내주면

그 주기에 맞춰 레이저의 강도가 달라지는지 PD에 의해 측정된 전압이 입력된 전류와 같이 변조된다.

Channel 2 (blue trace) in Figure 1 shows the photodetector output of a laser being modulated from 100 to 150mA at 1kHz. Channel 1 is the input modulation signal. The LDC-3724B is operating in low bandwidth (CW) mode and 200mA range with a CW setpoint of 100mA.

[링크 : https://www.newport.com/medias/sys_master/images/images/h1b/heb/8797049913374/AN22-Modulating-Laser-Diodes.pdf]

[링크 : https://www.teamwavelength.com/modulation-basics/]

'이론 관련 > 사진 광학 관련' 카테고리의 다른 글

wavelength, wavenumber  (0) 2022.08.09
DFB / DBR laser  (0) 2022.08.09
lock-in amplifier (LIA)  (0) 2022.07.11
FMS(Frequency modulation spectroscopy)  (0) 2022.06.20
pantograph router (축도기)  (0) 2019.04.25
Posted by 구차니

그냥 사무실 밖, 집 밖은 위험한 듯..

나가면 아주 그냥 땀이 줄줄줄 ㅠㅠ

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

9월 그리고 2주년  (2) 2022.09.01
니퍼, 롱노우즈 구매  (0) 2022.08.21
시간만 지나간다.  (0) 2022.07.18
상큼한 월요일. 지각 -_-  (0) 2022.07.04
회사 야유회  (0) 2022.06.24
Posted by 구차니
Microsoft/Windows2022. 8. 1. 16:17

업데이트 되고 나더니 기존에는 jpg로 받던게 dng 라는 이상한(?) 확장자로 받는다.

 

찾아보니 RAW 포맷이라고.

DNG(Digital Negative)는 디지털 사진에 사용되는 RAW 파일 포맷 으로, TIFF 6.0 포맷을 기준으로 개발되었습니다. 

[링크 : https://www.adobe.com/kr/creativecloud/file-types/image/raw/dng-file.html]

 

원본은 4016x3008의 23.55MB jpg 일텐데

저장된 파일은 684x512 194KB

어딜봐서  RAW 라고 봐야하는거냐 -_-

'Microsoft > Windows' 카테고리의 다른 글

hyper-v on win home  (0) 2023.01.08
첫 WSL 설치  (0) 2023.01.07
dependency walker  (0) 2022.02.18
winPE format  (0) 2022.02.18
윈10 탐색기 복수 확장자 검색하기  (0) 2021.11.22
Posted by 구차니
프로그램 사용/VLC2022. 8. 1. 10:49

보기 - 고급 컨트롤

 

하단의 컨트롤바 위의 빨간 버튼 클릭

 

별다른 설정이 없는데, 윈도우 기준 개인 홈 - 비디오에 저장된다.

[링크 : https://www.groovypost.com/howto/record-your-webcam-vlc-media-player/]

'프로그램 사용 > VLC' 카테고리의 다른 글

http vlc protocol  (0) 2018.11.30
vlc for windows / ascii art ㅋㅋㅋ  (0) 2016.11.22
vlc 옵션 -vvv  (0) 2015.09.15
dash with VLC  (0) 2015.09.11
VLC dshow(캡쳐장비) 해상도 설정  (0) 2015.05.23
Posted by 구차니