Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulating BluePill pins from Linux #34

Closed
exebook opened this issue Feb 18, 2020 · 1 comment
Closed

Emulating BluePill pins from Linux #34

exebook opened this issue Feb 18, 2020 · 1 comment

Comments

@exebook
Copy link

exebook commented Feb 18, 2020

Hey, I want to develop a mechanical keyboard controller based on BluePill, but I want to develop on Qemu STM32. The question is how do I emulate contact on pins that will be connected to actual keyboard switches on the hardware? I already figured, thanks to someone on Stack Overflow I can do send-keys { b } to emulate the onboard button. But pins are probably GPIO but I am still learning this.

This is what I've been able to do so far with QMP:

sleep 0.1s
echo '{ "execute": "qmp_capabilities" }'
sleep 0.1s
echo '{"execute":"send-key","arguments":{"hold-time": 1000, "keys":[{ "type": "qcode", "data": "b" }]}}'
echo '{"execute":"qom-list","arguments":{"path":"/machine/stm32/gpio[c]"}}'
sleep 0.1s
echo '{"execute":"qom-get","arguments":{"path":"/machine/stm32/gpio[c]","property":"gpio[0]"}}'
sleep 0.1s
echo '{"execute":"qom-get","arguments":{"path":"/machine/stm32/gpio[c]","property":"periph"}}'
sleep 0.1s
echo '{"execute":"qom-get","arguments":{"path":"/machine/stm32/gpio[c]","property":"legacy-stm32_rcc"}}'
sleep 0.1s
echo '{"execute":"quit","arguments":{}}'
sleep 0.1s
@beckus
Copy link
Owner

beckus commented Sep 12, 2021

Sorry I never responded @exebook, I hope you were able to figure this out. Given how much time has passed, I am going to close the issue...

@beckus beckus closed this as completed Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants