this post was submitted on 04 Aug 2023
18 points (90.9% liked)

Linux

48746 readers
1183 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Otherwise I have to write one myself. In which case anybody have a good guide on writing Linux kernel drivers in rust? Maybe specifically catered towards controllers

Otherwise I guess I can get chat gpt to do it

The thing has three ‘modes’ Pc,ps4, and ps5. But just connecting it to Pc doesn’t work

all 8 comments
sorted by: hot top controversial new old
[–] frostphunk 8 points 1 year ago* (last edited 1 year ago)

Hey guys,

Seems I had a bad USB port. Looks like ChatGPT won’t be coding us a driver anytime soon

I do concede my lack of sleep has led to bad judgement

[–] [email protected] 4 points 1 year ago (1 children)

Asking ChatGPT to write a kernel module would be hilarious. I'd love to see what would happen with your kernel from a safe distance.

That being said, it's a usb controller, right? Chance that you don't need new kernel module for it and you'll just need to define a button mapping.

https://wiki.archlinux.org/title/Gamepad

[–] frostphunk 1 points 1 year ago

Someone’s gotta do it

——

Ahh nice I will try this

[–] [email protected] 3 points 1 year ago (1 children)

If you want to write drivers you'll need some really good documentation on how to interact with the device.

Then when you have that ask ChatGPT how to write a driver, it'll most likely not do the best job on writing it in Rush so for a sample code asking for C code will give better result.

[–] frostphunk 2 points 1 year ago* (last edited 1 year ago)

You’re right, I didn’t consider documentation being a problem never written a driver . I just assumed it was pretty easy for something with just 12 buttons. Any pointers on REing. I’m assuming victrix doesn’t put out any docs on their sticks

[–] mvirts 2 points 1 year ago

I would bet that you just need to add the USB device id to the right driver and it will work. It's PlayStation compatible and Windows compatible, so it should work as either a dual shock USB device or a generic hid controller of some sort.