Common Implementation Methods of Software Timers in MCUs

Common Implementation Methods of Software Timers in MCUs

Follow+Star PublicAccount, don’t miss out on exciting contentSource | Internet In general embedded product design, due to cost, power consumption, etc., the selected MCU is usually resource-constrained, and the number of timers inside is also limited. In our software design, there are often various timing requirements, such as pulse output, key detection, LCD screen switching … Read more

C Language Interview: Project Experience and Code Examples Sharing

C Language Interview: Project Experience and Code Examples Sharing

C Language Interview: Project Experience and Code Examples Sharing In C language interviews, project experience and practical coding skills are crucial assessment components. This article will help foundational users understand relevant concepts and improve their performance in interviews through some common project cases and corresponding code examples. 1. Professional Background and Project Experience As a … Read more

Implementing Linked List Data Structure in C++

Implementing Linked List Data Structure in C++

Implementing Linked List Data Structure in C++ A linked list is a type of linear data structure consisting of a series of nodes. Each node contains two parts: a data field and a pointer to the next node. Unlike arrays, linked lists do not require contiguous memory space, making them more efficient for insertion and … Read more

Key Elements for Embedded Engineers to Master Programming

Key Elements for Embedded Engineers to Master Programming

Follow+Star Public Account Number, don’t miss out on exciting content Source | Internet As an embedded engineer, how can you write efficient and clear C language programs? You need to build the program structure using the C language’s way of thinking. You should have a solid foundation in C language algorithms to implement the program’s … Read more

How to Write Maintainable Embedded Programming Code?

How to Write Maintainable Embedded Programming Code?

1 Object-Oriented C Object-oriented languages are closer to human thinking patterns, significantly reducing code complexity while enhancing code readability and maintainability. Traditional C code can also be designed to be readable, maintainable, and of lower complexity. This article will illustrate this through a practical example. 2 Basic Knowledge 2.1 Structures In addition to providing basic … Read more

Zephyr Kernel Data Structures – Singly Linked List

Zephyr Kernel Data Structures - Singly Linked List

Singly Linked List The Zephyr singly linked list is implemented in the following file: zephyr/include/zephyr/sys/slist.h. Zephyr stores singly linked list data in sys_slist_t (i.e., each list element stores a pointer to the next element, rather than the data of the previous element). /** @cond INTERNAL_HIDDEN */ struct _slist { sys_snode_t *head; sys_snode_t *tail; }; /** … Read more

Common Data Structures in Zephyr Kernel

Common Data Structures in Zephyr Kernel

This article provides an overview without technical details or usage instructions. The Zephyr kernel uses a generic data structure library, which can also be utilized in applications. The data structures include: Linked List Packet Buffer Red-Black Tree Circular Buffer It is important to note that the APIs for accessing these data structures are not thread-safe. … Read more

How to Communicate Between Threads in C Language

How to Communicate Between Threads in C Language

First, there is no communication issue between threads within the same process. You can access data however you want; thus, we actually need to do something to actively “isolate” different threads to avoid dirty reads and writes. Second, multi-threaded programming (as well as multi-process programming) requires a foundation in operating systems. Without understanding the operating … Read more

Getting Started with FreeRTOS: A Guide to Writing Doubly Linked Lists

Getting Started with FreeRTOS: A Guide to Writing Doubly Linked Lists

Abstract: A few days ago, I talked about single linked lists, today I will discuss doubly linked lists in conjunction with the FreeRTOS linked list source code. Note: A linked list item is a node, and a node is a linked list item, they refer to the same thing, it doesn’t matter what you call … Read more

Mastering FreeRTOS: A Comprehensive Guide to Doubly Linked Lists

Mastering FreeRTOS: A Comprehensive Guide to Doubly Linked Lists

Abstract: Today, we will discuss the doubly linked list by combining the source code of FreeRTOS’s linked list. Note: A linked list item is a node, and a node is a linked list item; they refer to the same thing, and it doesn’t matter what you call it. 1. Defining the Linked List Structure // … Read more