2024-04-09 |
|
2023-04-23 |
Clock: Add ability to convert from microseconds to kernel time
...
This functionality allows us to ask the kernel to schedule events
based on a high resolution real-time clock.
An example in main waits until the next second.
Jookia
committed
on 23 Apr 2023
|
Clock: Combine clocks to create a high resolution real-time clock
...
The kernel clock is high resolution but only tracks uptime.
The RTC clock is low resolution but tracks real time.
The NTP clock is high resolution but costly to access.
We can combine the kernel clock with a real-time clock of any type
by sporadically calculating the time the system was booted at then
adding the kernel's uptime to it whenever we need a new clock.
Jookia
committed
on 23 Apr 2023
|
2023-04-22 |
Clock: Clean up and document the code
Jookia
committed
on 22 Apr 2023
|
Clock: Use microseconds instead of struct timeval
...
timevals are a little annoying to work with compared to just microseconds,
so switch to using them for our clock API.
Jookia
committed
on 22 Apr 2023
|
Clock: Add _now suffix and variants for clock functions
...
Currently the clock code implicitly grabs the current time.
Add variants that let you pass in your own time value, and specify
extra _now functions that use the current time.
Jookia
committed
on 22 Apr 2023
|
2023-04-04 |
Clock: Add our clock
...
This clock is intended to be used to get a timeval with sub-second
accuracy and convert it back and forth between kernel and real time.
Jookia
committed
on 4 Apr 2023
|
NetworkHandler: All access to the underlying NetworkInterface
...
We need this to actually use the network.
Jookia
committed
on 4 Apr 2023
|
2023-03-31 |
NetworkHandler: added a new function to check weather we're connected
...
This now uses an atomic boolean to be thread safe.
Xogium
committed
on 31 Mar 2023
|
Added networking support
...
Networking is handled by the NetworkHandler portion of the code, which
provides a few functions for use by other parts of the program, and a
status callback to monitor for connectivity changes. Connectivity is
also handled in an asynchronous mode, to avoid freezing the entire OS
while actions are performed.
* network_connect should be called by any part of the program wishing to
establish connectivity
* network_disconnect should be called to disconnect the network once
done
* network_init is a special function which should only be called by
main. It is responsible for setting the network interface in
asynchronous mode as well as attaching the status monitor callback. No
other part of the program should ever call this.
Lwip is used for the network stack, and IPv6 support has been enabled,
and prefered over IPv4 if available.
Xogium
committed
on 31 Mar 2023
|
2023-03-30 |
Make use of the mbed tracing subsystem instead of basic printing
...
This enables use of the mbed tracing subsystem for the entire source
code of the project. All the uses of printfs are now appropriately
tagged and assigned a trace level, as in the following example:
[INFO][FS]: Unmounting the filesystem...
[INFO][FS]: OK
[INFO][USBM]: Switching to the usb mass storage mode...
[INFO][USBM]: Disconnecting the usb mass storage device...
[INFO][USBM]: Switched usb mass storage mode off.
[INFO][FS]: Mounting the filesystem...
[INFO][FS]: OK
This was also done in a way that the tracing is thread safe, using a
mutex to lock and unlock as needed.
Note that this cannot be turned on or off yet during build. It is
currently always enabled.
Xogium
committed
on 30 Mar 2023
|
2023-03-23 |
ButtonThread: Remove private functions from include
Jookia
committed
on 23 Mar 2023
|
src: Don't pass FileSystem to doErase and doUSBMSD
...
They don't need the filesystem now, so get rid of this arg.
Jookia
committed
on 23 Mar 2023
|
Filesystem: Refer to mbed::FileSystem not LittleFileSystem2
...
Functions don't need to know about what kind of filesystem we pass it,
so just tell them it's a mbed::FileSystem.
Jookia
committed
on 23 Mar 2023
|
MyUSBMSD: Include Filesystem.h
Jookia
committed
on 23 Mar 2023
|
2023-03-20 |
Added SPDX license informations to all files.
...
The only files where this isn't present are the LICENSE.md for obvious
reasons and the mbed_app.json, as comments are not allowed in json.
---
Changes v1 -> v2:
- fixed capitalisation of the copyright word in the script directory and in the cmake list
- modified the source code and header files so the SPDX info is
in a multi-line comment block
Xogium
authored
on 20 Mar 2023
Jookia
committed
on 20 Mar 2023
|
include/MainFilesystem.h: fix header guard
...
Just noticed this header used MAINFS_H, and standard for c++ is
to use the full name of the file, replacing any symbols with _. Let's fix this.
Xogium
committed
on 20 Mar 2023
|
Merge branch 'main' into jookia/cleanup
Xogium
committed
on 20 Mar 2023
|
2023-03-19 |
include: Fix header guard
Jookia
committed
on 19 Mar 2023
|
Code format
Jookia
committed
on 19 Mar 2023
|
Initial commit
Jookia
committed
on 19 Mar 2023
|