Analysis of Less Common Library Functions for STM32 GPIO

1. void GPIO_DeInit(GPIO_TypeDef* GPIOx); First, let’s take a look at this function. We can see that the parameter of this function is a GPIO group parameter (GPIOB, GPIOC, GPIOA, etc.),Now, let’s enter the definition of this function in the standard peripheral library. void GPIO_DeInit(GPIO_TypeDef* GPIOx){ /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); if (GPIOx == GPIOA) … Read more

Choosing Between MCU Register Manipulation and Library Functions

Choosing Between MCU Register Manipulation and Library Functions

“ Developers who are new to microcontroller (MCU) development often find themselves confused: should they manipulate registers directly or use library functions? This is akin to choosing between manual and automatic transmission — the former offers precision but is complex, while the latter is simple but lacks a sense of control. This article uses STM32 … Read more

Fan Question | C Language: How to Define a Function with the Same Name as a Library Function and Call That Library Function

Fan Question | C Language: How to Define a Function with the Same Name as a Library Function and Call That Library Function

Ma Xiaobian HundredMillionFans CertifiedAccount By clicking follow, you not only gain a tool for finding resources but also an interesting soul ▶ ▶ ▶ Question Description: A certain function fun_1() is in the library and cannot be modified. It is used extensively in the program. Now, I want to make the original fun_1 ineffective (the … Read more

Summary and Examples of Library Functions Related to STM8 Microcontroller TIM1 (Part 1)

Summary and Examples of Library Functions Related to STM8 Microcontroller TIM1 (Part 1)

STM8 microcontroller has multiple timers, among which TIM1 is a high-performance timer (16-bit), with the most powerful functionality. There are a total of 46 library functions related to it, covering function types that generally apply to other timers, with a few being unique to it. All functions are presented in parts, and this is the … Read more

Overview of C Language Functions

Overview of C Language Functions

C Language Function Review Overview In the first chapter, it has been introduced that C source programs are composed of functions. Although the previous chapters’ programs only have one main function main(), practical programs often consist of multiple functions. Functions are the basic modules of C source programs, and specific functions are implemented through the … Read more

Introduction to C Language

Introduction to C Language

Continuing from the last time! Last time we discussed break and continue, leaving two pieces of code! The result of the first piece: 01234 Explanation: When i++ reaches 5, break is executed, and the code exits the loop, ending! The result of the second piece: 12346789 Explanation: When i++ reaches 5, continue is executed, the … Read more

Intermediate PLC Programming: Custom Library Function Development for Easier Reuse of General Functions!

Intermediate PLC Programming: Custom Library Function Development for Easier Reuse of General Functions!

Intermediate PLC Programming: Custom Library Function Development for Easier Reuse of General Functions! 🔥 Pain Points of Traditional PLC Programming: The Vicious Cycle of Duplicate Code Does your PLC program frequently contain duplicate code? Does modifying one function cause a ripple effect throughout the entire program? Is it like searching for a needle in a … Read more

Embedded Linux: Introduction to Linux Library Functions

Embedded Linux: Introduction to Linux Library Functions

1 Introduction to Linux Library Functions Linux provides a rich set of library functions that cover various domains, from file operations to network programming, graphical interfaces, mathematical operations, and more. Most of these library functions are standard C library functions, along with some that are specific to the Linux system. Linux library functions are typically … Read more