Skip to main content

Questions tagged [embedded]

For code that targets an embedded device or some severely resource-constrained environment.

8 votes
4 answers
462 views

Split flap clock stepper code

I've built a Split Flap Clock, and the code has grown quite a lot, and although it does work in its current state, I am wondering if it could be cleaned up. The whole thing runs on an ESP32 and is ...
Besi's user avatar
  • 245
4 votes
2 answers
240 views

C++ wrapper for FreeRTOS blocking queue that can handle complex objects

The FreeRTOS queue is a convenient way for intertask communication on FreeRTOS. But it is written in pain C and therefore it feels a little uncomfortable for C++ programmers. But the main problem is, ...
Mr. Clear's user avatar
  • 143
2 votes
0 answers
109 views

compile time, but Not inlined function in C and C++

We have a graphics library for the Ti84CE, which uses the 24bit eZ80. It has a 16bit 1555 screen, so we have a gfx_Darken function that will darken a 16bit 1555 ...
Vortex 2728182818's user avatar
1 vote
1 answer
104 views

Ensuring data integrity with dual memory structures while using the `offsetof` macro [closed]

I am working with a fairly large data structure that needs to be maintained in RAM in two forms: a standard version and an inverted version. Whenever an element is updated, it must be written to the ...
user avatar
3 votes
1 answer
243 views

Implements a READ ID command between the iCE40 HX8K and the AT25SF0818 in Verilog

Question How can I improve my Verilog code? Context Flash Read ID Operation This project is an implimentation of the Read Manufacturer and Device ID (9Fh) operation ...
K_T's user avatar
  • 163
2 votes
1 answer
69 views

Synchronizing an embedded system with RTOS

I wrote this code for a make-up assignment to pass one of my college class and graduate from my program in the field of electronic and embedded system. It's pretty much the realization of a solar ...
Null_DreiAcht's user avatar
3 votes
1 answer
72 views

A generic queue that transfers data from interrupt to main program

This code aims to implement a queue, which transfers data from interrupt to main program in a bare metal embedded system. There are two execution points, the main program and the irq handler. Both ...
Jackoo's user avatar
  • 131
1 vote
0 answers
77 views

C# like Dependency injection for C++ on embedded device

I was wondering if it would be possible to create a C# like syntax for dependency injection. My device is running constantly and acting more or less like a service. I came up with the following. My ...
Bas Visscher's user avatar
2 votes
1 answer
111 views

How to interface a "pull" library with a "push" library using callbacks

I am using a driver that retrieves data from HW (Driver) and a display (Viewer) that will output data to the user. The user calls a trigger function to initiate the getting of data from the Driver. ...
Orange J's user avatar
3 votes
2 answers
152 views

Defining hardware components structure

I'm writing firmware for my Arduino project, and I'm struggling with a clean, scalable hardware mapping structure. Initially, I had the following namespace: ...
Dead1nside's user avatar
4 votes
1 answer
120 views

Arm GPIO driver

I'm new to bare-metal programming. I'm currently developing some drivers for my first project. This is a simple GPIO driver. I tested it and it's working fine. What do you guys think of it, and how ...
Double-Amphibian's user avatar
3 votes
5 answers
258 views

Calculate a math sequence that converges

Thanks for taking the time to read this. I could use a few pointers. I have written much better code but wrote this as a quick test. There is obviously a major issue/s somewhere except for the ...
J123's user avatar
  • 33
3 votes
1 answer
143 views

Raspberry Pi/PySimpleGUI based resistance test system

Hardware: Raspberry Pi 3B+, Elecrow touchscreen, DFR0660 Barcode Scanner, ADS1115 ADC I would like any bad practices/possible failure points pointed out specifically in the ...
Isaias_EE's user avatar
14 votes
2 answers
1k views

Arcsine function for a real-time control program

I have been developing control software for a three-phase induction motor. The main task of this C++ code is to control the torque of the motor. In one part of the algorithm (The control algorithm is ...
Steve's user avatar
  • 355
7 votes
2 answers
698 views

Arduino library to simplify differential drive robots

I've written code for an Arduino library to abstract away some of the underlying logic in a particular way of moving robots. Code is posted after explanations. I'm not assuming a high degree of ...
eccentricOrange's user avatar

15 30 50 per page
1
2 3 4 5
10