Switching Embedded GUI Pages Using Linked List Accounting Method

Switching Embedded GUI Pages Using Linked List Accounting Method

For those engaged in embedded GUI development, have you ever encountered the confusion of needing to rely on global variables to remember the state after writing three or four pages? As you add more pages, the code becomes increasingly chaotic, and you might even experience “page stuttering” during transitions? Here, I share a method from … Read more

Code Sharing: Simplest Linked List Template in C Language

// Simple linked list example, but without freeing memory #include <stdio.h> #include <stdlib.h> // For malloc memory allocation // Define a type as a structure pointer, which has a member that is a pointer to another structure of the same type, forming a linked structure called a linked list typedef struct node { int number; … Read more

AI Apprentice Diary | GPT Teaches Me C++ (02): Linked List – A Mental Leap from Structs to STL

As a computer science student, I once learned about data structures, C language, linked lists, stacks, queues… But to be honest, over time, I almost forgot everything. This semester, I started learning C++, and I decided not to “grind through the textbooks” anymore, but to let GPT be my “companion AI tutor” to gradually rebuild … Read more

Understanding Linked Lists in C Language

1. Significance and Function of Linked Lists Significance: Linked lists provide the capability for dynamic memory management, allowing the creation and release of data elements as needed during program execution, thus overcoming the limitations of arrays that require a predetermined size. Main Functions: Dynamic Memory Allocation: No need to know the size of the data … Read more

FreeRTOS Source Code Analysis – Implementation of Linked Lists

FreeRTOS Source Code Analysis – Implementation of Linked Lists In the previous chapter, Embedded Operating System: FreeRTOS Source Code Analysis Part Three – Task Startup and Switching, we officially started tasks. In FreeRTOS, tasks can also be referred to as threads. Next, we will introduce inter-thread synchronization mechanisms (semaphores, mutexes, event groups, etc.) and inter-thread … Read more

Understanding Rust’s Option with Box: How to Unwrap Data

This is the sixth article in the series of Rust’s challenges. Previously, I wrote an introduction to using & and Box pointers, but I was still a bit confused when encountering Option. For example, <span>Option<Box<T>></span>, how do the as_mut methods of Option and Box work together, and what is their relationship? What are the use … Read more

Three Key Elements for Embedded Engineers to Master C Language

Three Key Elements for Embedded Engineers to Master C Language

As an embedded engineer, how can one write efficient and clear C language programs? Utilize the C language mindset for program structure construction Have a solid foundation in C language algorithms to implement the program’s logical structure Flexibly use pointer operations in C language Although the above statements may seem abstract and confusing, they essentially … Read more

Mastering FreeRTOS from Scratch (2): Definition of List Node

Mastering FreeRTOS from Scratch (2): Definition of List Node

In the previous article, we completed the porting of FreeRTOS. In FreeRTOS, all functionalities are divided into tasks, which need to be mounted on a linked list. In this chapter, we will master the various types of nodes in a linked list. Before creating tasks, we need to understand the operating mechanism of FreeRTOS. FreeRTOS … Read more

Exploring Pointers in C Language (Part 5) — Linked Lists: A Perfect Interpretation of Pointer Art

Exploring Pointers in C Language (Part 5) — Linked Lists: A Perfect Interpretation of Pointer Art

After a few busy days, I haven’t had the chance to focus on this topic. Today, on my business trip back to Beijing, I reflected on it and thought it was necessary to back up the linked list. 1. What is a Linked List? A linked list is a data structure composed of a series … Read more

GDB Debugging Method (9) – Printing Linked Lists

GDB Debugging Method (9) - Printing Linked Lists

When debugging issues, it is common to encounter linked lists, and manually calculating and filling in linked lists with GDB can be quite cumbersome. However, pwndbg provides a very useful command called telescope that helps us automatically parse linked lists. Conditions for Printing Linked Lists with Telescope When programmers design linked lists, the structures can … Read more