http://embedded-lab.com/blog/stm32-gpio-ports-insights/
http://hertaville.com/stm32f0-gpio-tutorial-part-1.html
The libmaple libraries, on which STM32duino is based, provides access to registers by the syntax:
GPIOA->regs->REG
http://embedded-lab.com/blog/stm32-gpio-ports-insights/
http://hertaville.com/stm32f0-gpio-tutorial-part-1.html
The libmaple libraries, on which STM32duino is based, provides access to registers by the syntax:
GPIOA->regs->REG
This thing is a bit of a beast. People don't give it NEARLY the credit, or the documentation it deserves.
Two ways of using this thing: rfcat
directly, or write a python script for it.
Basically, writing a python script is easier. Using rfcat directly is great but often, there are just too many silly settings to configure
esphome: | |
# [...] | |
on_boot: | |
priority: -10 | |
then: | |
# enable clock effect after boot | |
- light.turn_on: | |
id: light_ring | |
brightness: 100% | |
effect: Clock |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
import serial | |
fig, ax = plt.subplots() | |
line, = ax.plot(np.random.rand(10)) | |
ax.set_ylim(-5000, 5000) | |
xdata, ydata = [0]*100, [0]*100 | |
raw = serial.Serial("/dev/ttyUSB1",9600) |
Based on Daniel Kucera's implementation of the confirmation button, adapted for a different ST Dongle using an STM32F103CBU6 microcontroller.
Order of the 4 SWD interface holes from left to right:
It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream
.)
Getting the PR code
Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37
Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37
:
$ git fetch upstream pull/37/head:pr37
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
try: | |
import tkinter as tk | |
except ImportError: | |
import Tkinter as tk | |
class VerticalScrolledFrame: | |
""" |
class Foo(object): | |
def __getattribute__(self, name): | |
print "getting attribute %s" % name | |
return object.__getattribute__(self, name) | |
def __setattr__(self, name, val): | |
print "setting attribute %s to %r" % (name, val) | |
return object.__setattr__(self, name, val) |
# see also: /lib/udev/hwdb.d/60-keyboard.hwdb | |
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*EliteBook*:pvr* | |
KEYBOARD_KEY_81=f20 # Fn+F8 on Elitebook, map to F20 | |
# KEYBOARD_KEY_81=fn_esc # org entry |