Todos Nuevo

user:thomas gists creados por el usuario

title:mygist gists con el título indicado

filename:myfile.txt gists que contienen archivos con el nombre indicado

extension:yml gists que contienen archivos con la extensión indicada

language:go gists que contienen archivos con el lenguaje indicado

topic:homelab gists with given topic

Iniciar sesión


Todos Nuevo Iniciar sesión

All gists matching topic freertos

Recientemente creado
Menos reciente creado
Recientemente actualizado
Menos reciente actualizado

PowLu / 嵌入式C非阻塞周期执行宏

0 gustos
0 bifurcaciones
2 archivos
Última actividad 1776395259
一个轻量级、可移植的C宏,用于按固定时间间隔执行代码,不阻塞主循环。适用于裸机STM32或FreeRTOS等嵌入式项目。
c embedded freertos macro stm32
1 // 例1:每500ms翻转一次LED
2 void main_loop(void) {
3 RUN_EVERY(500, led_tick, {
4 HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
5 });
6
7 // 其他非阻塞任务
8 read_sensor();
9 process_data();
10 }

PowLu / Freertos获取任务运行态参数

0 gustos
0 bifurcaciones
2 archivos
Última actividad 1776394742
获取任务运行时间、运行计数、栈占用
c embedded freertos stm32
1 /**
2 ******************************************************************************
3 * @file user\global\g_runtime.c
4 * @author luhuaishuai
5 * @version v0.1
6 * @date 2026-1-12
7 * @brief Briefly describe the function of your function
8 ******************************************************************************
9 */
Siguiente Anterior

Desarrollado por Opengist ⋅ Load: 19ms⋅

Español
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文