aklomp / radiuno Goto Github PK
View Code? Open in Web Editor NEWBare-metal cmd shell for Arduino Uno and si4735 radio shield
Bare-metal cmd shell for Arduino Uno and si4735 radio shield
Model the si4735's status byte as a bitfield, for convenient access to all of the fields. This firmware does not need to be portable, so the usual objections against bitfields do not apply.
Add a command to get/set properties of the si4735
.
Add a blocking function to get the next character from the UART. The current implementation is nonblocking (polling), which is inefficient.
This also enables a cleanup: the rx
FIFO no longer needs to be exported globally.
In the login banner, print the version string and the Git commit hash.
Add a header file with a few useful and frequently used utility macros.
Pressing Ctrl-C
in the terminal during an active seek will interrupt the seek loop and throw the user back at the prompt, but it will not actually send a cancel seek command to the chip. The result is that the chip keeps seeking in the background, instead of keeping the frequency at the time of cancellation.
Fix this by sending the proper cancellation command to the chip.
Setup a release workflow in GitHub Actions that also packages the generated .map
, .elf
and .hex
files.
Model the si4735's tune flags as a bitfield, for convenient access to all of the fields. This firmware does not need to be portable, so the usual objections against bitfields do not apply.
In the info
command, decode the status flag byte into words, and print extra band-specific information.
Setup GitHub Actions as a CI step to automatically build the software on push.
Do a round of code cleanups:
readline.c
to char *
, so that the returned buffer is compatible with the standard string functions, that all expect char pointers.extern
.Add the -flto
flag to the general flags in the Makefile
to enable link-time optimization. This will reduce the size of the firmware image by inlining functions across compilation units.
Define symbolic constants for the chip commands, to replace the numeric constants that are currently used.
Compile the banner as an object file instead of including it in the source code as a printf string. Escaping the slashes distorts the banner, and it is nicer to place resources in a separate file.
Keep one line of history in the Readline module, and allow the user to access this line with the up arrow.
Can be implemented in an elegant way with double buffering?
Refactor the seek
command implementation, which is fairly complex and contains an oversized function (seek_status
). Simplify the code by breaking it up into smaller functions.
Switch to picocom
in the Makefile
from the cumbersome and arcane minicom
. This is a personal preference.
Also fix a related issue in readline.c
: picocom
sends backspace as keycode 127 (DEL
), not 8 (BS
). Fix this by recognizing 127 as a backspace.
Add some documentation to README.md
about the various commands.
Move the argument parsing of the command line into a separate module, to split it out of the main command module. This separates concerns.
Track the chip's powerup mode (FM or AM/SW/LW) in the si4735
module. Use this information to choose the correct version (FM
/AM
) of the chip command.
This also lets us move a lot of mode-dependent commands to the si4735
module, because it now has the context to construct the right command for its mode.
Replace all shift-and-mask operations with bitfields. They are less error prone and more readable than using a shift and a mask, have no adverse performance impact, and using them has no portability impact because the code is linked to a single platform.
Fix a bug that manifests itself at higher optimization levels: variables that are modified in interrupt handlers are not marked volatile
. At higher optimization levels, the compiler will assume that the variables cannot be externally modified, and this assumption results in a nonfunctional image.
Define a proper struct
for the POWER_UP
command that exposes its contents as bitfields. Also define symbolic constants for the field values.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.